CVEfocus › CVE database › CVE-2023-34241

CVE-2023-34241CUPS vulnerable to use-after-free in cupsdAcceptClient()

CVSS 5.3 MediumEPSS 1.4% (higher than 72% of CVEs)Published 2023-06-22Updated 2025-02-13Assigner: GitHub_M

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.

CWE-416

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

38Fixed
3Fix pending
12Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04cupsFixed2.4.1op1-1ubuntu4.4UBUNTU-CVE-2023-34241
Ubuntu 20.04cupsFixed2.3.1-9ubuntu1.4UBUNTU-CVE-2023-34241
Ubuntu 18.04cupsFix pending2.2.7-1ubuntu2.10+esm1 (Ubuntu Pro)UBUNTU-CVE-2023-34241
Ubuntu 16.04cupsFix pending2.1.3-4ubuntu0.11+esm3 (Ubuntu Pro)UBUNTU-CVE-2023-34241
Ubuntu 14.04cupsFix pending
Debian 14cupsFixed2.4.2-5DEBIAN-CVE-2023-34241
Debian 13cupsFixed2.4.2-5DEBIAN-CVE-2023-34241
Debian 12cupsFixed2.4.2-3+deb12u1DEBIAN-CVE-2023-34241
Red Hat Enterprise Linux 9cupsFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 9cups-clientFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 9cups-develFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 9cups-filesystemFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 9cups-ipptoolFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 9cups-libsFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 9cups-lpdFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 9cups-printerappFixed1:2.3.3op2-21.el9RHSA-2023:6596
Red Hat Enterprise Linux 8cupsFixed1:2.2.6-54.el8_9RHSA-2023:7165
Red Hat Enterprise Linux 8cups-clientFixed1:2.2.6-54.el8_9RHSA-2023:7165
Red Hat Enterprise Linux 8cups-develFixed1:2.2.6-54.el8_9RHSA-2023:7165
Red Hat Enterprise Linux 8cups-filesystemFixed1:2.2.6-54.el8_9RHSA-2023:7165
Red Hat Enterprise Linux 8cups-ipptoolFixed1:2.2.6-54.el8_9RHSA-2023:7165
Red Hat Enterprise Linux 8cups-libsFixed1:2.2.6-54.el8_9RHSA-2023:7165
Red Hat Enterprise Linux 8cups-lpdFixed1:2.2.6-54.el8_9RHSA-2023:7165
Red Hat Enterprise Linux 7cupsWill not fix
Out of support scope
Red Hat Enterprise Linux 7cups-clientWill not fix
Out of support scope
Red Hat Enterprise Linux 7cups-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7cups-filesystemWill not fix
Out of support scope
Red Hat Enterprise Linux 7cups-ipptoolWill not fix
Out of support scope
Red Hat Enterprise Linux 7cups-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 7cups-lpdWill not fix
Out of support scope
Red Hat Enterprise Linux 6cupsWill not fix
Out of support scope
Red Hat Enterprise Linux 6cups-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6cups-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6cups-lpdWill not fix
Out of support scope
Red Hat Enterprise Linux 6cups-phpWill not fix
Out of support scope
AlmaLinux 9cupsFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 9cups-clientFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 9cups-develFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 9cups-filesystemFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 9cups-ipptoolFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 9cups-libsFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 9cups-lpdFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 9cups-printerappFixed1:2.3.3op2-21.el9ALSA-2023:6596
AlmaLinux 8cupsFixed1:2.2.6-54.el8_9ALSA-2023:7165
AlmaLinux 8cups-clientFixed1:2.2.6-54.el8_9ALSA-2023:7165
AlmaLinux 8cups-develFixed1:2.2.6-54.el8_9ALSA-2023:7165
AlmaLinux 8cups-filesystemFixed1:2.2.6-54.el8_9ALSA-2023:7165
AlmaLinux 8cups-ipptoolFixed1:2.2.6-54.el8_9ALSA-2023:7165
AlmaLinux 8cups-libsFixed1:2.2.6-54.el8_9ALSA-2023:7165
AlmaLinux 8cups-lpdFixed1:2.2.6-54.el8_9ALSA-2023:7165
Alpine Linux 3.17cupsFixed2.4.2-r3ALPINE-CVE-2023-34241
Alpine Linux 3.16cupsFixed2.4.2-r2ALPINE-CVE-2023-34241
Alpine Linux 3.15cupsFixed2.3.3-r8ALPINE-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.

References

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.