CVE-2023-34241 CUPS vulnerable to use-after-free in cupsdAcceptClient()
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
Description
OpenPrinting CUPS is a standards-based, open source printing system for Linux and other Unix-like operating systems. Starting in version 2.0.0 and prior to version 2.4.6, CUPS logs data of free memory to the logging service AFTER the connection has been closed, when it should have logged the data right before. This is a use-after-free bug that impacts the entire cupsd process.
The exact cause of this issue is the function httpClose(con->http) being called in scheduler/client.c. The problem is that httpClose always, provided its argument is not null, frees the pointer at the end of the call, only for cupsdLogClient to pass the pointer to httpGetHostname. This issue happens in function cupsdAcceptClient if LogLevel is warn or higher and in two scenarios: there is a double-lookup for the IP Address (HostNameLookups Double is set in cupsd.conf) which fails to resolve, or if CUPS is compiled with TCP wrappers and the connection is refused by rules from /etc/hosts.allow and /etc/hosts.deny.
Version 2.4.6 has a patch for this issue.
Upgrade path
14 packages: 12 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/cups(Alpine v3.15) | >= 2.2.0, < 2.3.3-r8 | 2.3.3-r8 | Fixed |
| alpine/cups(Alpine v3.16) | >= 2.2.0, < 2.4.2-r2 | 2.4.2-r2 | Fixed |
| alpine/cups(Alpine v3.17) | >= 2.2.0, < 2.4.2-r3 | 2.4.2-r3 | Fixed |
| apple macos | < 11.7.9; >= 12.0.0, < 12.6.8; >= 13.0, < 13.5 | 11.7.9, 12.6.8, 13.5 | Fixed |
| debian/cups(Debian 12) | < 2.4.2-3+deb12u1; = 2.4.2-3 | 2.4.2-3+deb12u1 | Fixed |
| debian/cups(Debian 13) | < 2.4.2-5 | 2.4.2-5 | Fixed |
| debian/cups(Debian 14) | < 2.4.2-5 | 2.4.2-5 | Fixed |
| OpenPrinting cups | = >= 2.0.0, < 2.4.6; >= 2.2.0, < 2.4.6 | 2.4.6 | Fixed |
| ubuntu/cups(Ubuntu 20.04) | < 2.3.1-9ubuntu1.4; = 2.2.12-2ubuntu1; = 2.3.0-6; = 2.3.0-7 +9 more | 2.3.1-9ubuntu1.4 | Fixed |
| ubuntu/cups(Ubuntu 22.04) | < 2.4.1op1-1ubuntu4.4; = 2.3.3op2-7ubuntu2; = 2.4.1op1-1ubuntu1; = 2.4.1op1-1ubuntu2 +4 more | 2.4.1op1-1ubuntu4.4 | Fixed |
| ubuntu/cups(Ubuntu Pro 16.04) | < 2.1.3-4ubuntu0.11+esm3; = 2.1.0-4ubuntu3; = 2.1.0-5; = 2.1.0-6 +20 more | 2.1.3-4ubuntu0.11+esm3 | Fixed |
| ubuntu/cups(Ubuntu Pro 18.04) | < 2.2.7-1ubuntu2.10+esm1; = 2.2.4-7ubuntu2; = 2.2.5-2; = 2.2.6-2 +15 more | 2.2.7-1ubuntu2.10+esm1 | Fixed |
| debian linux | = 10.0 | No fix listed | Versions listed |
| fedoraproject fedora | = 37; = 38 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/cups(Debian:12) | < 2.4.2-3+deb12u1 | 2.4.2-3+deb12u1 |
| debian/cups(Debian:12) | = 2.4.2-3 | No fix listed |
| debian/cups(Debian:13) | < 2.4.2-5 | 2.4.2-5 |
| debian/cups(Debian:14) | < 2.4.2-5 | 2.4.2-5 |
| OpenPrinting cups | = >= 2.0.0, < 2.4.6 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | < 2.4.1op1-1ubuntu4.4 | 2.4.1op1-1ubuntu4.4 |
| alpine/cups(Alpine:v3.15) | >= 2.2.0, < 2.3.3-r8 | 2.3.3-r8 |
| alpine/cups(Alpine:v3.16) | >= 2.2.0, < 2.4.2-r2 | 2.4.2-r2 |
| alpine/cups(Alpine:v3.17) | >= 2.2.0, < 2.4.2-r3 | 2.4.2-r3 |
| OpenPrinting cups | >= 2.2.0, < 2.4.6 | 2.4.6 |
| fedoraproject fedora | = 37 | No fix listed |
| fedoraproject fedora | = 38 | No fix listed |
| debian linux | = 10.0 | No fix listed |
| apple macos | < 11.7.9 | 11.7.9 |
| apple macos | >= 12.0.0, < 12.6.8 | 12.6.8 |
| apple macos | >= 13.0, < 13.5 | 13.5 |
| ubuntu/cups(Ubuntu:Pro:16.04) | < 2.1.3-4ubuntu0.11+esm3 | 2.1.3-4ubuntu0.11+esm3 |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.0-4ubuntu3 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.0-5 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.0-6 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.0-6ubuntu1 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.0-7 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.2-1 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.2-2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-1 | No fix listed |
Show 54 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-1build1 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-3 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.3 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.4 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.5 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.6 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.7 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.8 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.9 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.10 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.11 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.11+esm1 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:16.04) | = 2.1.3-4ubuntu0.11+esm2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | < 2.2.7-1ubuntu2.10+esm1 | 2.2.7-1ubuntu2.10+esm1 |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.4-7ubuntu2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.5-2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.6-2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.6-3 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.6-4 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.6-5 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu1 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.1 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.2 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.3 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.4 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.5 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.6 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.7 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.8 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.9 | No fix listed |
| ubuntu/cups(Ubuntu:Pro:18.04) | = 2.2.7-1ubuntu2.10 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | < 2.3.1-9ubuntu1.4 | 2.3.1-9ubuntu1.4 |
| ubuntu/cups(Ubuntu:20.04) | = 2.2.12-2ubuntu1 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.0-6 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.0-7 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.0-7ubuntu1 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-1ubuntu1 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-2 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-4 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-7 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-9ubuntu1 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-9ubuntu1.1 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-9ubuntu1.2 | No fix listed |
| ubuntu/cups(Ubuntu:20.04) | = 2.3.1-9ubuntu1.3 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | = 2.3.3op2-7ubuntu2 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | = 2.4.1op1-1ubuntu1 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | = 2.4.1op1-1ubuntu2 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | = 2.4.1op1-1ubuntu3 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | = 2.4.1op1-1ubuntu4 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | = 2.4.1op1-1ubuntu4.1 | No fix listed |
| ubuntu/cups(Ubuntu:22.04) | = 2.4.1op1-1ubuntu4.2 | No fix listed |
References
- Debian Security Tracker CVE-2023-34241 vendor-advisory
- https://github.com/OpenPrinting/cups/security/advisories/GHSA-qjgh-5hcq-5f25 exploit patch vendor-advisory
- https://github.com/OpenPrinting/cups/commit/9809947a959e18409dcf562a3466ef246cb90cb2 patch
- https://github.com/OpenPrinting/cups/releases/tag/v2.4.6 release-notes
- www.openwall.com mailing-list third-party-advisory
- www.openwall.com mailing-list third-party-advisory
- lists.fedoraproject.org mailing-list third-party-advisory
- lists.debian.org mailing-list
- lists.fedoraproject.org mailing-list
- support.apple.com third-party-advisory
- support.apple.com third-party-advisory
- support.apple.com third-party-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-6184-1 vendor-advisory
- USN-6184-2 vendor-advisory
- www.cve.org issue-tracking
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking