GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Linux specific local privilege escalation via the multiprocessing forkserver start method - CVE-2022-42919 · Issue #97514 · python/cpython Closed Labels 3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.9 (EOL)end of lifeend of liferelease-blockerstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue DescriptionTL;DRPython 3.9, 3.10, and 3.11.0rc2 on Linux may allow for a local privilege escalation attack in a non-default configuration when code uses the DetailsThe Python 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. This issue has been assigned CVE-2022-42919. Credit: This issue was discovered by Devin Jeanpierre (@ssbr) of Google. Are Python 3.7 and 3.8 affected?Not by default. Support for users manually specifying an abstract namespace AF_UNIX socket was added as a bugfix in 3.7.8 and 3.8.3, but users would need to make specific uncommon What about code that explicitly asks for an abstract socket?Applications found to be making the uncommon WorkaroundsFrom Python application or library code:import multiprocessing.util multiprocessing.util.abstract_sockets_supported = False This disables their use by default. You must execute that before anything else in your process has started making use of multiprocessing. If you can patch your CPython runtime itself:Remove these two lines from CPython's - if util.abstract_sockets_supported: - return f"\0listener-{os.getpid()}-{next(_mmap_counter)}" (that is what our security bug fix commits do). Or, similar to the application level fix, edit - abstract_sockets_supported = _platform_supports_abstract_sockets() + abstract_sockets_supported = False Alternatives to avoid the problemIf your Linux Python application can be switched from multiprocessing's Scope of the bug fixesWe are changing the default in Python 3.9 and higher to not use the Linux abstract namespace sockets by default. It would be ideal to add authentication to the forkserver control socket so that it isn't even relying on filesystem permissions. This is a more complicated change and is expected to be done as a feature in 3.12. Tasks
Linked PRsReacted by TErry CHao and Sajad F. Maghrebi Activity
MetadataMetadataLabels3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.9 (EOL)end of lifeend of liferelease-blockerstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |