Name | CVE-2021-3177 |
Description | Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Python applications that accept floating-point numbers as untrusted input, as demonstrated by a 1e300 argument to c_double.from_param. This occurs because sprintf is used unsafely. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-2619-1, DLA-2919-1, DLA-3432-1, ELA-572-1, ELA-598-1, ELA-997-1 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
pypy (PTS) | jessie | 2.4.0+dfsg-3 | fixed |
stretch | 5.6.0+dfsg-4 | fixed | |
buster | 7.0.0+dfsg-3 | fixed | |
bullseye | 7.3.3+dfsg-2 | fixed | |
python2.7 (PTS) | jessie, jessie (lts) | 2.7.9-2-ds1-1+deb8u12 | fixed |
stretch (security) | 2.7.13-2+deb9u6 | fixed | |
stretch (lts), stretch | 2.7.13-2+deb9u9 | fixed | |
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+deb8u19 | fixed |
python3.5 (PTS) | stretch (security) | 3.5.3-1+deb9u5 | vulnerable |
stretch (lts), stretch | 3.5.3-1+deb9u11 | fixed | |
python3.7 (PTS) | buster, buster (lts) | 3.7.3-2+deb10u9 | fixed |
buster (security) | 3.7.3-2+deb10u7 | fixed | |
python3.9 (PTS) | bullseye | 3.9.2-1 | fixed |
bullseye (security) | 3.9.2-1+deb11u2 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
pypy | source | (unstable) | (not affected) | |||
python2.7 | source | jessie | 2.7.9-2-ds1-1+deb8u9 | ELA-598-1 | ||
python2.7 | source | stretch | 2.7.13-2+deb9u6 | DLA-2919-1 | ||
python2.7 | source | buster | 2.7.16-2+deb10u2 | DLA-3432-1 | ||
python2.7 | source | (unstable) | 2.7.18-2 | |||
python3.4 | source | jessie | 3.4.2-1+deb8u12 | ELA-572-1 | ||
python3.4 | source | (unstable) | (unfixed) | |||
python3.5 | source | stretch | 3.5.3-1+deb9u8 | ELA-997-1 | ||
python3.5 | source | (unstable) | (unfixed) | |||
python3.7 | source | buster | 3.7.3-2+deb10u3 | |||
python3.7 | source | (unstable) | (unfixed) | |||
python3.8 | source | (unstable) | (unfixed) | |||
python3.9 | source | (unstable) | 3.9.1-3 |
[stretch] - python3.7 <no-dsa> (Minor issue)
https://bugs.python.org/issue42938
https://github.com/python/cpython/pull/24239
https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html
https://github.com/python/cpython/commit/916610ef90a0d0761f08747f7b0905541f0977c7 (master)
https://github.com/python/cpython/commit/c347cbe694743cee120457aa6626712f7799a932 (3.9)
https://github.com/python/cpython/commit/ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f (3.8)
https://github.com/python/cpython/commit/d9b8f138b7df3b455b54653ca59f491b4840d6fa (3.7)
https://github.com/python/cpython/commit/34df10a9a16b38d54421eeeaf73ec89828563be7 (3.6)
- pypy <not-affected> (Vulnerable code not present)