8000 gh-97514: Don't use Linux abstract sockets for multiprocessing by gpshead · Pull Request #98501 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-97514: Don't use Linux abstract sockets for multiprocessing #98501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reword NEWS, refer to CVE-2022-42919.
  • Loading branch information
gpshead committed Oct 14, 2022
commit 8c5071403d6a7b254a7fc9e0e3875eff26fe55e1
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
On Linux :mod:`multiprocessing` no longer uses Linux specific abstract socket
namespace sockets by default for inter-process communication as they have no
permissions and thus allowed anyone on the system to inject code into the
multiprocessing server process.
On Linux the :mod:`multiprocessing` module when configured to use the
``"forkserver"`` start method has switched back to using filesystem backed unix
domain sockets by default for communication with the fork server. No longer
using Linux's abstract socket namespace by default. Abstract sockets have no
permissions and could thus 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 as a potential privilege escalation. Filesystem based socket
permissions are restricted to the forkserver user as with Python 3.8 and
earlier.

This prevents Linux `CVE-2022-42919
<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-42919>`_ in code that
chooses to use the *forkserver* start method as documented in
:ref:`multiprocessing contexts and start methods
<multiprocessing-start-methods>`.
0