Skip to content

Commit 1036c4b

Browse files
AdrianBunkmcepl
authored andcommitted
[CVE-2024-5642] Switch off NPN support
Fixes: gh#python#121227 Fixes: bsc#1227233 (CVE-2024-5642) Fixes: https://security-tracker.debian.org/tracker/CVE-2024-5642 From-PR: gh#python#121227#issuecomment-2245302832 Patch: CVE-2024-5642-switch-off-NPN.patch
1 parent cdffb9f commit 1036c4b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Modules/_ssl.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,10 @@ struct py_ssl_library_code {
148148
* reasons. The check for TLSEXT_TYPE_next_proto_neg works with
149149
* OpenSSL 1.0.1+ and LibreSSL.
150150
* OpenSSL 1.1.1-pre1 dropped NPN but still has TLSEXT_TYPE_next_proto_neg.
151+
*
152+
* Fix for CVE-2024-5642: we just switch NPN completely
151153
*/
152-
#ifdef OPENSSL_NO_NEXTPROTONEG
153154
# define HAVE_NPN 0
154-
#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
155-
# define HAVE_NPN 0
156-
#elif defined(TLSEXT_TYPE_next_proto_neg)
157-
# define HAVE_NPN 1
158-
#else
159-
# define HAVE_NPN 0
160-
#endif
161155

162156
#ifndef INVALID_SOCKET /* MS defines this */
163157
#define INVALID_SOCKET (-1)

0 commit comments

Comments
 (0)