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

[3.14] gh-134698: Hold a lock when the thread state is detached inssl (GH-134724)#137107

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
ZeroIntensity merged 3 commits intopython:3.14fromgpshead:backport-e047a35-3.14
Oct 7, 2025

Conversation

@gpshead
Copy link
Member

@gpsheadgpshead commentedJul 25, 2025
edited by bedevere-appbot
Loading

Lock when the thread state is detached.
(cherry picked from commite047a35)

… in `ssl` (pythonGH-134724)Lock when the thread state is detached.(cherry picked from commite047a35)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>Co-authored-by: Gregory P. Smith <greg@krypto.org>
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for doing the backport.

@gpshead
Copy link
MemberAuthor

@hugovk - up to you when this should merge for 3.14. it is a bug, but it has been around for a while. Traditionally RMs pick and choose what go in an RC to minimize changes to reduce release surprises, leaving whatever they deem less urgent as bug fixes for the .1 release. Your call.

@gpshead
Copy link
MemberAuthor

intentionallynot marking this as a release blocker as it doesn't seem that fundamental.

@Conobi
Copy link

Conobi commentedJul 26, 2025
edited
Loading

it doesn't seem that fundamental

I'm not sure I understand the basis for this reasoning@gpshead, as the direct consequence of this is that any application that takes advantage of concurrency (for e.g FastAPI/Django Channels/LiteStart/Celery with Eventelet) and uses mTLS authentication for calling an API (for example with Requests,which hasn't released a fix yet), is then vulnerable. As the mTLS authentication pattern is very common in banking/finance/governemental apps, it means that Python apps in these orgs are very likely to vulnerable to DOS attacks.

It was the case for our app, I'm sure it's the case for a lot of others one in the nature.

@Conobi
Copy link

As of a consequence of not backporting it@gpshead, is that no app can be fixed (unless a manual monkeypatch) until the Requests nor Python 3.14 release. It means thousands of apps vulnerables in the nature to a very simple DOS attack until then.

@gpshead
Copy link
MemberAuthor

rationale: The bug this fixes has existed for a very long time and seems likely to be present in all basically all Python releases. Not something thatneeds to be a priority release blocker during our release candidate phase. ie: It isn't a regression in behavior or compatibility present only in 3.14.

If you want it to be considered a security bug, please report it with some form of proof of concept of being able to trigger the hang or crash remotely tosecurity@python.org.(without that, we won't be back porting this to anything earlier than 3.13)

@ZeroIntensity
Copy link
Member

Please hold off on merging this until#137583 has been addressed.

hugovk reacted with thumbs up emoji

@gpshead
Copy link
MemberAuthor

yay getting lucky! :)

This solves a deadlock when a socket is blocked while waiting on data,which ended up causing a major regression in 3.13.6 (seepythongh-137583).
@ZeroIntensityZeroIntensity added 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section and removed DO-NOT-MERGE labelsAug 12, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@ZeroIntensity for commit8ff02f8 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F137107%2Fmerge

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelAug 12, 2025
@ZeroIntensity
Copy link
Member

I've pushed the fix from#137588 to prevent the deadlocks from hitting 3.14. This is now safe to merge (assuming the buildbots pass), but I would totally understand if Hugo doesn't want to touch this with a ten-foot pole.

@hugovk
Copy link
Member

Yeah, let's wait for 3.14.1 for this one.

gpshead reacted with thumbs up emoji

@ZeroIntensity
Copy link
Member

It seems 3.13.7 went well with the fix, so let's go ahead and land this for 3.14.1. Let's hope we don't break any major downstream packages this time!

@ZeroIntensityZeroIntensityenabled auto-merge (squash)October 7, 2025 18:32
@ZeroIntensityZeroIntensity merged commite51acb3 intopython:3.14Oct 7, 2025
46 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz approved these changes

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

Assignees

@gpsheadgpshead

Labels

topic-SSLtype-bugAn unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@gpshead@Conobi@ZeroIntensity@bedevere-bot@hugovk@picnixz

[8]ページ先頭

©2009-2025 Movatter.jp