CVE-2024-5642 Buffer overread when using an empty list with SSLContext.set_npn_protocols()
MediumCVSS 6.5
EPSS 0.74%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- OpenSSLUbuntuDebian
Description
CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used (see CVE-2024-5535 for OpenSSL). This vulnerability is of low severity due to NPN being not widely used and specifying an empty list likely being uncommon in-practice (typically a protocol name would be configured).
Upgrade path
5 packages: 4 fixed, 1 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/python2.7(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| debian/pypy3(Debian 12) | < 7.3.10+dfsg-1 | 7.3.10+dfsg-1 | Fixed |
| debian/pypy3(Debian 13) | < 7.3.10+dfsg-1 | 7.3.10+dfsg-1 | Fixed |
| debian/pypy3(Debian 14) | < 7.3.10+dfsg-1 | 7.3.10+dfsg-1 | Fixed |
| Python Software Foundation CPython | < 3.9.24; >= 3.10.0a1, < 3.10.0b1 | 3.9.24, 3.10.0b1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/pypy3(Debian:12) | < 7.3.10+dfsg-1 | 7.3.10+dfsg-1 |
| debian/pypy3(Debian:13) | < 7.3.10+dfsg-1 | 7.3.10+dfsg-1 |
| debian/pypy3(Debian:14) | < 7.3.10+dfsg-1 | 7.3.10+dfsg-1 |
| ubuntu/python2.7(Ubuntu:22.04) | All versions | No fix listed |
| Python Software Foundation CPython | < 3.9.24 | 3.9.24 |
| Python Software Foundation CPython | >= 3.10.0a1, < 3.10.0b1 | 3.10.0b1 |
References
- Debian Security Tracker CVE-2024-5642 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- jbp.io third-party-advisory
- github.com mitigation
- mail.python.org vendor-advisory
- github.com patch
- www.openwall.com
- github.com issue-tracking
- security.netapp.com
- github.com patch