Name | CVE-2022-42919 |
Description | Python 3.9.x before 3.9.16 and 3.10.x before 3.10.9 on Linux allows local privilege escalation in a non-default configuration. The Python multiprocessing library, when used with the forkserver start method on Linux, allows pickles to be deserialized from any user in the same machine local network namespace, which in many system configurations means any user on the same machine. Pickles can execute arbitrary code. Thus, this allows for local user privilege escalation to the user that any forkserver process is running as. Setting multiprocessing.util.abstract_sockets_supported to False is a workaround. The forkserver start method for multiprocessing is not the default start method. This issue is Linux specific because only Linux supports abstract namespace sockets. CPython before 3.9 does not make use of Linux abstract namespace sockets by default. Support for users manually specifying an abstract namespace socket was added as a bugfix in 3.7.8 and 3.8.3, but users would need to make specific uncommon API calls in order to do that in CPython before 3.9. |
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-3980-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 | |
pypy3 (PTS) | buster | 7.0.0+dfsg-3 | vulnerable |
bullseye | 7.3.5+dfsg-2+deb11u2 | vulnerable | |
bullseye (security) | 7.3.5+dfsg-2+deb11u4 | vulnerable | |
bookworm | 7.3.11+dfsg-2+deb12u2 | fixed | |
sid, trixie | 7.3.17+dfsg-3 | 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.11 (PTS) | bookworm | 3.11.2-6+deb12u4 | fixed |
bookworm (security) | 3.11.2-6+deb12u3 | fixed | |
python3.4 (PTS) | jessie, jessie (lts) | 3.4.2-1+deb8u19 | fixed |
python3.5 (PTS) | stretch (security) | 3.5.3-1+deb9u5 | fixed |
stretch (lts), stretch | 3.5.3-1+deb9u11 | fixed | |
python3.7 (PTS) | buster, buster (lts) | 3.7.3-2+deb10u9 | vulnerable |
buster (security) | 3.7.3-2+deb10u7 | vulnerable | |
python3.9 (PTS) | bullseye | 3.9.2-1 | vulnerable |
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) | |||
pypy3 | source | (unstable) | 7.3.11+dfsg-1 | |||
python2.7 | source | (unstable) | (not affected) | |||
python3.10 | source | (unstable) | 3.10.8-2 | |||
python3.11 | source | (unstable) | 3.11.0-2 | |||
python3.4 | source | (unstable) | (not affected) | |||
python3.5 | source | (unstable) | (not affected) | |||
python3.7 | source | (unstable) | (unfixed) | |||
python3.9 | source | bullseye | 3.9.2-1+deb11u2 | DLA-3980-1 | ||
python3.9 | source | (unstable) | (unfixed) |
[buster] - python3.7 <ignored> (The issue is complex to trigger before 3.7.8)
- python2.7 <not-affected> (Vulnerable code introduced later)
[bullseye] - pypy3 <ignored> (The issue is complex to trigger before 7.3.8)
[buster] - pypy3 <ignored> (The issue is complex to trigger before 7.3.8)
https://github.com/python/cpython/issues/97514
https://github.com/python/cpython/commit/4686d77a04570a663164c03193d9def23c89b122 (3.11-branch)
https://github.com/python/cpython/commit/eae692eed18892309bcc25a2c0f8980038305ea2 (3.10-branch)
https://github.com/python/cpython/commit/b43496c01a554cf41ae654a0379efae18609ad39 (3.9-branch)
Introduced in pypy3 by: https://github.com/pypy/pypy/commit/0a83d30478b34c4efd9486dbf6ae8bdf9807f136 (release-pypy3.9-v7.3.8rc1)
Fixed in pypy3 by: https://github.com/pypy/pypy/commit/f2618dff16cc9ac06413633533b60b4f0a02aa0d (release-pypy3.9-v7.3.10rc1)
The patch for 3.9 and later only removes the default preference for abstract sockets which
prevents CVE-2022-42919. Versions 3.8.4 and 3.7.8 are not vulnerable by default (but issue present)
though users would need to make specific uncommon multiprocessing API calls specifying their own
forkserver control socket path. Earlier 3.x versions are not vulnerable.
- pypy <not-affected> (Vulnerable code introduced later)
- python3.4 <not-affected> (Vulnerable code introduced later)
- python3.5 <not-affected> (Vulnerable code introduced later)