Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 22 Jun 2023 12:02:39 +0200
From: Zdenek Dohnal <>
Subject: CVE-2023-34241: CUPS: use-after-free in cupsdAcceptClient()

Hi all,

there is currently the embargoed CVE-2023-34241 in CUPS project:


Cups logs data of free memory to the logging service AFTER the 
connection has been closed, when it should have logged the data right 


The exact cause of this issue is the function httpClose(con->http) being 
called in scheduler/client.c before

|httpClose(con->http); cupsdLogClient(con, CUPSDLOGWARN, "IP lookup 
failed - connection from %s closed!", httpGetHostname(con->http, NULL, 0));|

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|.


None provided


This is a use-after-free bug, that impacts the entire cupsd process.

If you need an exploit scenario, consider: local (unprivileged) attacker 
who happens to be able to read the log using it to exfiltrate private 
keys and info from a privileged cups daemon
or simply denial-of-service by making it crash.


Committed as

For OpenPrinting CUPS community,

Zdenek Dohnal (CUPS 2.4.x release manager)

Zdenek Dohnal
Senior Software Engineer

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.