summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2023-08-22 19:03:20 (GMT)
committerGitHub <noreply@github.com>2023-08-22 19:03:20 (GMT)
commit256586ab8776e4526ca594b4866b9a3492e628f1 (patch)
tree51a42bb9c4a541778b29ed0d84cde79414e54362 /Misc
parent1dbf11814f32c7d4c1fc66cb0a29aa3667962b0d (diff)
downloadcpython-256586ab8776e4526ca594b4866b9a3492e628f1.zip
cpython-256586ab8776e4526ca594b4866b9a3492e628f1.tar.gz
cpython-256586ab8776e4526ca594b4866b9a3492e628f1.tar.bz2
[3.12] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (#108316)
Instances of `ssl.SSLSocket` were vulnerable to a bypass of the TLS handshake and included protections (like certificate verification) and treating sent unencrypted data as if it were post-handshake TLS encrypted data. The vulnerability is caused when a socket is connected, data is sent by the malicious peer and stored in a buffer, and then the malicious peer closes the socket within a small timing window before the other peers’ TLS handshake can begin. After this sequence of events the closed socket will not immediately attempt a TLS handshake due to not being connected but will also allow the buffered data to be read as if a successful TLS handshake had occurred. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Security/2023-08-22-17-39-12.gh-issue-108310.fVM3sg.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Security/2023-08-22-17-39-12.gh-issue-108310.fVM3sg.rst b/Misc/NEWS.d/next/Security/2023-08-22-17-39-12.gh-issue-108310.fVM3sg.rst
new file mode 100644
index 0000000..403c77a
--- /dev/null
+++ b/Misc/NEWS.d/next/Security/2023-08-22-17-39-12.gh-issue-108310.fVM3sg.rst
@@ -0,0 +1,7 @@
+Fixed an issue where instances of :class:`ssl.SSLSocket` were vulnerable to
+a bypass of the TLS handshake and included protections (like certificate
+verification) and treating sent unencrypted data as if it were
+post-handshake TLS encrypted data. Security issue reported as
+`CVE-2023-40217
+<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40217>`_ by
+Aapo Oksman. Patch by Gregory P. Smith.