CVE-2023-34241CUPS vulnerable to use-after-free in cupsdAcceptClient()
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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | cups | Fixed | 2.4.1op1-1ubuntu4.4 | UBUNTU-CVE-2023-34241 |
| Ubuntu 20.04 | cups | Fixed | 2.3.1-9ubuntu1.4 | UBUNTU-CVE-2023-34241 |
| Ubuntu 18.04 | cups | Fix pending | 2.2.7-1ubuntu2.10+esm1 (Ubuntu Pro) | UBUNTU-CVE-2023-34241 |
| Ubuntu 16.04 | cups | Fix pending | 2.1.3-4ubuntu0.11+esm3 (Ubuntu Pro) | UBUNTU-CVE-2023-34241 |
| Ubuntu 14.04 | cups | Fix pending | ||
| Debian 14 | cups | Fixed | 2.4.2-5 | DEBIAN-CVE-2023-34241 |
| Debian 13 | cups | Fixed | 2.4.2-5 | DEBIAN-CVE-2023-34241 |
| Debian 12 | cups | Fixed | 2.4.2-3+deb12u1 | DEBIAN-CVE-2023-34241 |
| Red Hat Enterprise Linux 9 | cups | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 9 | cups-client | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 9 | cups-devel | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 9 | cups-filesystem | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 9 | cups-ipptool | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 9 | cups-libs | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 9 | cups-lpd | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 9 | cups-printerapp | Fixed | 1:2.3.3op2-21.el9 | RHSA-2023:6596 |
| Red Hat Enterprise Linux 8 | cups | Fixed | 1:2.2.6-54.el8_9 | RHSA-2023:7165 |
| Red Hat Enterprise Linux 8 | cups-client | Fixed | 1:2.2.6-54.el8_9 | RHSA-2023:7165 |
| Red Hat Enterprise Linux 8 | cups-devel | Fixed | 1:2.2.6-54.el8_9 | RHSA-2023:7165 |
| Red Hat Enterprise Linux 8 | cups-filesystem | Fixed | 1:2.2.6-54.el8_9 | RHSA-2023:7165 |
| Red Hat Enterprise Linux 8 | cups-ipptool | Fixed | 1:2.2.6-54.el8_9 | RHSA-2023:7165 |
| Red Hat Enterprise Linux 8 | cups-libs | Fixed | 1:2.2.6-54.el8_9 | RHSA-2023:7165 |
| Red Hat Enterprise Linux 8 | cups-lpd | Fixed | 1:2.2.6-54.el8_9 | RHSA-2023:7165 |
| Red Hat Enterprise Linux 7 | cups | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | cups-client | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | cups-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | cups-filesystem | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | cups-ipptool | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | cups-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | cups-lpd | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | cups | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | cups-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | cups-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | cups-lpd | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | cups-php | Will not fix Out of support scope | ||
| AlmaLinux 9 | cups | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 9 | cups-client | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 9 | cups-devel | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 9 | cups-filesystem | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 9 | cups-ipptool | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 9 | cups-libs | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 9 | cups-lpd | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 9 | cups-printerapp | Fixed | 1:2.3.3op2-21.el9 | ALSA-2023:6596 |
| AlmaLinux 8 | cups | Fixed | 1:2.2.6-54.el8_9 | ALSA-2023:7165 |
| AlmaLinux 8 | cups-client | Fixed | 1:2.2.6-54.el8_9 | ALSA-2023:7165 |
| AlmaLinux 8 | cups-devel | Fixed | 1:2.2.6-54.el8_9 | ALSA-2023:7165 |
| AlmaLinux 8 | cups-filesystem | Fixed | 1:2.2.6-54.el8_9 | ALSA-2023:7165 |
| AlmaLinux 8 | cups-ipptool | Fixed | 1:2.2.6-54.el8_9 | ALSA-2023:7165 |
| AlmaLinux 8 | cups-libs | Fixed | 1:2.2.6-54.el8_9 | ALSA-2023:7165 |
| AlmaLinux 8 | cups-lpd | Fixed | 1:2.2.6-54.el8_9 | ALSA-2023:7165 |
| Alpine Linux 3.17 | cups | Fixed | 2.4.2-r3 | ALPINE-CVE-2023-34241 |
| Alpine Linux 3.16 | cups | Fixed | 2.4.2-r2 | ALPINE-CVE-2023-34241 |
| Alpine Linux 3.15 | cups | Fixed | 2.3.3-r8 | ALPINE-CVE-2023-34241 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- OpenPrinting cups: affected: >= 2.0.0, < 2.4.6
References
- https://github.com/OpenPrinting/cups/security/advisories/GHSA-qjgh-5hcq-5f25
- https://github.com/OpenPrinting/cups/commit/9809947a959e18409dcf562a3466ef246cb90cb2
- https://github.com/OpenPrinting/cups/releases/tag/v2.4.6
- http://www.openwall.com/lists/oss-security/2023/06/23/10
- http://www.openwall.com/lists/oss-security/2023/06/26/1
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TBIYKDS3UG3W4Z7YOHTR2AWFNBRYPNYY/
- https://lists.debian.org/debian-lts-announce/2023/06/msg00038.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7I7DWGYGEMBNLZF5UQBMF3SONR37YUBN/
- https://support.apple.com/kb/HT213843
- https://support.apple.com/kb/HT213844
- https://support.apple.com/kb/HT213845
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.