CVE-2024-12254 Unbounded memory buffering in SelectorSocketTransport.writelines()
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
Description
Starting in Python 3.12.0, the asyncio._SelectorSocketTransport.writelines()
method would not "pause" writing and signal to the Protocol to drain
the buffer to the wire once the write buffer reached the "high-water
mark". Because of this, Protocols would not periodically drain the write
buffer potentially leading to memory exhaustion.
This
vulnerability likely impacts a small number of users, you must be using
Python 3.12.0 or later, on macOS or Linux, using the asyncio module
with protocols, and using .writelines() method which had new
zero-copy-on-write behavior in Python 3.12.0 and later. If not all of
these factors are true then your usage of Python is unaffected.
Upgrade path
9 packages: 9 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/python3(Alpine v3.20) | < 3.12.8-r1 | 3.12.8-r1 | Fixed |
| alpine/python3(Alpine v3.21) | < 3.12.8-r1 | 3.12.8-r1 | Fixed |
| alpine/python3(Alpine v3.22) | < 3.12.8-r1 | 3.12.8-r1 | Fixed |
| alpine/python3(Alpine v3.23) | < 3.12.8-r1 | 3.12.8-r1 | Fixed |
| alpine/python3(Alpine v3.24) | < 3.12.8-r1 | 3.12.8-r1 | Fixed |
| azure linux python3(Azure Linux 3.0) | < 3.12.3-5 | 3.12.3-5 | Fixed |
| debian/python3.13(Debian 13) | < 3.13.1-2 | 3.13.1-2 | Fixed |
| Python Software Foundation CPython | < 3.12.9; >= 3.12.0, < 3.14.0a1; >= 3.13.0, < 3.13.2; >= 3.14.0a1, < 3.14.0a3 | 3.12.9, 3.13.2, 3.14.0a1, 3.14.0a3 | Fixed |
| ubuntu/python3.12(Ubuntu 24.04) | < 3.12.3-1ubuntu0.4; = 3.12.0-1; = 3.12.0-5; = 3.12.0-6 +10 more | 3.12.3-1ubuntu0.4 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux python3(Azure Linux:3.0) | < 3.12.3-5 | 3.12.3-5 |
| debian/python3.13(Debian:13) | < 3.13.1-2 | 3.13.1-2 |
| Python Software Foundation CPython | < 3.12.9 | 3.12.9 |
| Python Software Foundation CPython | >= 3.13.0, < 3.13.2 | 3.13.2 |
| Python Software Foundation CPython | >= 3.14.0a1, < 3.14.0a3 | 3.14.0a3 |
| Python Software Foundation CPython | >= 3.12.0, < 3.14.0a1 | 3.14.0a1 |
| alpine/python3(Alpine:v3.20) | < 3.12.8-r1 | 3.12.8-r1 |
| alpine/python3(Alpine:v3.21) | < 3.12.8-r1 | 3.12.8-r1 |
| alpine/python3(Alpine:v3.22) | < 3.12.8-r1 | 3.12.8-r1 |
| alpine/python3(Alpine:v3.23) | < 3.12.8-r1 | 3.12.8-r1 |
| alpine/python3(Alpine:v3.24) | < 3.12.8-r1 | 3.12.8-r1 |
| ubuntu/python3.12(Ubuntu:24.04) | < 3.12.3-1ubuntu0.4 | 3.12.3-1ubuntu0.4 |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.0-1 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.0-5 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.0-6 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.0-7 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.1-2 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.2-1 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.2-4build3 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.2-4build4 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.2-5ubuntu3 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.3-1 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.3-1ubuntu0.1 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.3-1ubuntu0.2 | No fix listed |
| ubuntu/python3.12(Ubuntu:24.04) | = 3.12.3-1ubuntu0.3 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2024-12254 vendor-advisory
- github.com issue-tracking
- github.com issue-tracking patch
- mail.python.org issue-tracking vendor-advisory
- github.com patch
- github.com patch
- github.com patch
- www.openwall.com issue-tracking
- security.netapp.com
- security.alpinelinux.org vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-7219-1 vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking