CVE-2018-1000030

NameCVE-2018-1000030
DescriptionPython 2.7.14 is vulnerable to a Heap-Buffer-Overflow as well as a Heap-Use-After-Free. Python versions prior to 2.7.14 may also be vulnerable and it appears that Python 2.7.17 and prior may also be vulnerable however this has not been confirmed. The vulnerability lies when multiply threads are handling large amounts of data. In both cases there is essentially a race condition that occurs. For the Heap-Buffer-Overflow, Thread 2 is creating the size for a buffer, but Thread1 is already writing to the buffer without knowing how much to write. So when a large amount of data is being processed, it is very easy to cause memory corruption using a Heap-Buffer-Overflow. As for the Use-After-Free, Thread3->Malloc->Thread1->Free's->Thread2-Re-uses-Free'd Memory. The PSRT has stated that this is not a security vulnerability due to the fact that the attacker must be able to run code, however in some situations, such as function as a service, this vulnerability can potentially be used by an attacker to violate a trust boundary, as such the DWF feels this issue deserves a CVE.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python2.7 (PTS)buster2.7.16-2+deb10u1fixed
buster (security)2.7.16-2+deb10u4fixed
bullseye2.7.18-8+deb11u1fixed
python3.7 (PTS)buster3.7.3-2+deb10u3fixed
buster (security)3.7.3-2+deb10u7fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python2.6source(unstable)(unfixed)unimportant
python2.7source(unstable)2.7.14-5unimportant
python3.2source(unstable)(not affected)
python3.4source(unstable)(not affected)
python3.5source(unstable)(not affected)
python3.6source(unstable)(not affected)
python3.7source(unstable)(not affected)

Notes

- python3.7 <not-affected> (Reading ahead of file objects implemented differently)
- python3.6 <not-affected> (Reading ahead of file objects implemented differently)
- python3.5 <not-affected> (Reading ahead of file objects implemented differently)
- python3.4 <not-affected> (Reading ahead of file objects implemented differently)
- python3.2 <not-affected> (Reading ahead of file objects implemented differently)
Original report: https://bugs.python.org/issue31530
https://bugs.python.org/file47157/0001-stop-crashes-when-iterating-over-a-file-on-multiple-.patch
which was followed by a pull request to fix the issue:
https://github.com/python/cpython/pull/3670
https://github.com/python/cpython/pull/3672
https://github.com/python/cpython/commit/6401e5671781eb217ee1afb4603cc0d1b0367ae6
The original approach caused a regression leading to
https://github.com/python/cpython/pull/5060
https://bugs.python.org/msg309265
where the 6401e56 commit was mostly reverted again.
Needed: https://github.com/python/cpython/commit/dbf52e02f18dac6f5f0a64f78932f3dc6efc056b
No practical security impact, why DWF assigned a CVE ID is hard to tell

Search for package or bug name: Reporting problems