Name | CVE-2018-1000030 |
Description | Python 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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
python2.7 (PTS) | jessie, jessie (lts) | 2.7.9-2-ds1-1+deb8u12 | vulnerable |
stretch (security) | 2.7.13-2+deb9u6 | vulnerable | |
stretch (lts), stretch | 2.7.13-2+deb9u9 | vulnerable | |
buster (security), buster, buster (lts) | 2.7.16-2+deb10u4 | fixed | |
bullseye | 2.7.18-8+deb11u1 | fixed | |
python3.4 (PTS) | jessie, jessie (lts) | 3.4.2-1+deb8u18 | fixed |
python3.5 (PTS) | stretch (security) | 3.5.3-1+deb9u5 | fixed |
stretch (lts), stretch | 3.5.3-1+deb9u10 | fixed | |
python3.7 (PTS) | buster, buster (lts) | 3.7.3-2+deb10u8 | fixed |
buster (security) | 3.7.3-2+deb10u7 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
python2.6 | source | (unstable) | (unfixed) | unimportant | ||
python2.7 | source | (unstable) | 2.7.14-5 | unimportant | ||
python3.2 | source | (unstable) | (not affected) | |||
python3.4 | source | (unstable) | (not affected) | |||
python3.5 | source | (unstable) | (not affected) | |||
python3.6 | source | (unstable) | (not affected) | |||
python3.7 | source | (unstable) | (not affected) |
- 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