-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
SSLObject does not raise SSLEOFError on OpenSSL 3 #90471
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
Comments
PR bpo-25309 (#25309) changed OpenSSL behavior so that it ignores unexpected EOFs by default. This was detected by the test suites of both trio and AnyIO when running on OpenSSL 3. We worked around the problem by explicitly unsetting the SSL_OP_IGNORE_UNEXPECTED_EOF flag and then checking if the "strerror" attribute of SSLError contains the text "UNEXPECTED_EOF_WHILE_READING". The remedy in the standard library would be twofold:
As SSLSockets ignore SSLEOFError by default, this fix should work fine for those too. |
This is a security issue because it exposes users to TLS truncation attacks that weren't possible before because such attempts would raise SSLEOFError. |
This is not a security issue because OpenSSL 3.0.0 is not officially supported yet. OpenSSL 3.0.0 support is prelimiary, experimental, and provisional. From https://docs.python.org/3/whatsnew/3.10.html#ssl
|
I hope the Fedora maintainers/packagers know this because on Rawhide, Python is being compiled against OpenSSL 3 (which is how we discovered the problem). F36 is due out in a little over 3 months. |
Petr and Charis are aware that there are issues with OpenSSL 3.0 support. RHEL 9 FIPS support is broken as well. It's also documented in the release notes and I just wrote an email to python-dev, too. |
Good to see that this is being handled. I could try to write a patch to do what I suggested above, if you're willing to review it. |
I just noticed that Ubuntu 22.04 LTS also uses OpenSSL 3 with their Python builds. I hope somebody has told them too about the state of affairs. |
That's not how OSS work. Python core development does not have resources to provide proactive support for all Linux distros in the world. We provide documentation and guidance. I assume that paid package maintainers of a commercial Linux vendor perform their due diligence, read the release notes, and follow upstream development discussions. PS: I'm unsubscribing from this bpo now. |
duplicate of #95494 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: