-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Linux abstract sockets are insecure as they lack any form of filesystem permissions so their use allows anyone on the system to inject code into the process. This removes the default preference for abstract sockets in multiprocessing introduced in Python 3.9+ via #18866 while fixing #84031. Explicit use of an abstract socket by a user now generates a RuntimeWarning. If we choose to keep this warning, it should be backported to the 3.7 and 3.8 branches.
- Loading branch information
Showing
2 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Misc/NEWS.d/next/Security/2022-09-07-10-42-00.gh-issue-97514.Yggdsl.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
On Linux the :mod:`multiprocessing` module returns to using filesystem backed | ||
unix domain sockets for communication with the *forkserver* process instead of | ||
the Linux abstract socket namespace. Only code that chooses to use the | ||
:ref:`"forkserver" start method <multiprocessing-start-methods>` is affected. | ||
|
||
Abstract sockets have no permissions and could allow any user on the system in | ||
the same `network namespace | ||
<https://man7.org/linux/man-pages/man7/network_namespaces.7.html>`_ (often the | ||
whole system) to inject code into the multiprocessing *forkserver* process. | ||
This was a potential privilege escalation. Filesystem based socket permissions | ||
restrict this to the *forkserver* process user as was the default in Python 3.8 | ||
and earlier. | ||
|
||
This prevents Linux `CVE-2022-42919 | ||
<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-42919>`_. |