[3.9] gh-97514: Don't use Linux abstract sockets for multiprocessing (GH-98501) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 28 Oct 2022 10:08:30 +0000 (03:08 -0700)
committerAdrian Bunk <bunk@debian.org>
Sun, 1 Dec 2024 12:12:57 +0000 (14:12 +0200)
commita5682ef492da12d9f02eb51f1fe06aa40a4dde5c
treed8d7fff51d14885d0cfc5a4add8c015e345587c3
parent2c20c73044b5881f91e3207172ebca945db1dd86
[3.9] gh-97514: Don't use Linux abstract sockets for multiprocessing (GH-98501) (#98504)

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
https://github.com/python/cpython/pull/18866 while fixing
https://github.com/python/cpython/issues/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.
(cherry picked from commit 49f61068f49747164988ffc5a442d2a63874fc17)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Gbp-Pq: Name 0010-3.9-gh-97514-Don-t-use-Linux-abstract-sockets-for-mu.patch
Lib/multiprocessing/connection.py