Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Yhg1s merged 5 commits intopython:mainfromgpshead:multiprocessing-abstract
Oct 20, 2022

Conversation

@gpshead
Copy link
Member

@gpsheadgpshead commentedOct 20, 2022
edited
Loading

Linux abstract sockets lack any form of permissions so their use allows any process in the same host-local network namespace (which means any user on the system in many default configurations) to inject code into the process. A "same machine Remote Code Execution RCE" vulnerability.

This removes the default preference for abstract sockets in multiprocessing introduced in Python 3.9+ via
#18866 while fixing#84031.

This issue was reported to the PSRT on 2022-09-07 by Devin Jeanpierre@ssbr from Google.@gpshead requested the CVE.

More good reasoning on why to avoid abstract AF_UNIX sockets on Linux:https://web.archive.org/web/20220107100548/https://utcc.utoronto.ca/~cks/space/blog/linux/SocketAbstractNamespace?showcomments#comments

This is intended for backporting to apply to 3.9 - 3.12.


Urgency: The Release Manager@pablogsal has approved having this in 3.11.0. As the issue is Linux only,there is NO urgent need for new Windows or macOS package builds. So even if a new 3.10.x and 3.9.x release is not officially cut while making it public, this small change is trivially back-ported by all involved Linux Python binary package distributors whom we assume will bevery interested in having it.


PSRT report & discussion:https://mail.python.org/archives/list/psrt@python.org/thread/WMFW2T2I4P3I7SQHYJEBZTSHRVJT44F6/

gpsheadand others added5 commitsOctober 13, 2022 23:39
Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ viapython#18866 while fixingpython#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.
The right people won't see it and it won't blame the right code.
@gpsheadgpshead added type-bugAn unexpected behavior, bug, or error type-securityA security issue needs backport to 3.9 needs backport to 3.10only security fixes release-blocker needs backport to 3.11only security fixes labelsOct 20, 2022
@gpsheadgpshead self-assigned thisOct 20, 2022
@gpsheadgpshead marked this pull request as ready for reviewOctober 20, 2022 21:59
@gpsheadgpshead requested a review fromYhg1sOctober 20, 2022 22:21
@miss-islington
Copy link
Contributor

Thanks@gpshead for the PR, and@Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10, 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-98502 is a backport of this pull request to the3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 20, 2022
…ythonGH-98501)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ viapython#18866 while fixingpython#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelOct 20, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 20, 2022
…ythonGH-98501)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ viapython#18866 while fixingpython#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-bot
Copy link

GH-98503 is a backport of this pull request to the3.10 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.10only security fixes labelOct 20, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 20, 2022
…ythonGH-98501)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ viapython#18866 while fixingpython#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>
@gpsheadgpshead deleted the multiprocessing-abstract branchOctober 20, 2022 23:11
@miss-islington
Copy link
Contributor

Thanks@gpshead for the PR, and@Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 20, 2022
…ythonGH-98501)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ viapython#18866 while fixingpython#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>
@gpshead
Copy link
MemberAuthor

GH-98504 is the backport of this pull request to the3.9 branch.(miss-islington created the PR but some how fell over applying labels to it and posting this message here)

miss-islington added a commit that referenced this pull requestOct 20, 2022
…GH-98501) (GH-98503)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ via#18866 while fixing#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>Automerge-Triggered-By: GH:gpshead
miss-islington added a commit that referenced this pull requestOct 20, 2022
…GH-98501) (GH-98502)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ via#18866 while fixing#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>Automerge-Triggered-By: GH:gpshead
pablogsal pushed a commit that referenced this pull requestOct 22, 2022
…GH-98501) (GH-98502)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ via#18866 while fixing#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>Automerge-Triggered-By: GH:gpshead
ambv pushed a commit that referenced this pull requestOct 28, 2022
…H-98501) (#98504)Linux abstract sockets are insecure as they lack any form of filesystempermissions so their use allows anyone on the system to inject code intothe process.This removes the default preference for abstract sockets inmultiprocessing introduced in Python 3.9+ via#18866 while fixing#84031.Explicit use of an abstract socket by a user now generates aRuntimeWarning.  If we choose to keep this warning, it should bebackported to the 3.7 and 3.8 branches.(cherry picked from commit49f6106)Co-authored-by: Gregory P. Smith <greg@krypto.org>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@Yhg1sYhg1sYhg1s approved these changes

@pablogsalpablogsalAwaiting requested review from pablogsal

Assignees

@gpsheadgpshead

Labels

release-blockertype-bugAn unexpected behavior, bug, or errortype-securityA security issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gpshead@miss-islington@bedevere-bot@Yhg1s

[8]ページ先頭

©2009-2025 Movatter.jp