CVE-2024-35235: Cupsd Listen arbitrary chmod 0140777
Cupsd Listen arbitrary chmod 0140777
Other sources
OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. In versions 2.4.8 and earlier, when starting the cupsd server with a Listen configuration item pointing to a symbolic link, the cupsd process can be caused to perform an arbitrary chmod of the provided argument, providing world-writable access to the target. Given that cupsd is often running as root, this can result in the change of permission of any user or system files to be world writable. Given the aforementioned Ubuntu AppArmor context, on such systems this vulnerability is limited to those files modifiable by the cupsd process. In that specific case it was found to be possible to turn the configuration of the Listen argument into full control over the cupsd.conf and cups-files.conf configuration files. By later setting the User and Group arguments in cups-files.conf, and printing with a printer configured by PPD with a FoomaticRIPCommandLine argument, arbitrary user and group (not root) command execution could be achieved, which can further be used on Ubuntu systems to achieve full root command execution. Commit ff1f8a623e090dee8a8aadf12a6a4b25efac143d contains a patch for the issue.
— NVD
When starting the cupsd server with a Listen configuration item pointing to a symbolic link, the cupsd process can be caused to perform an arbitrary chmod of the provided argument, providing world-writable access to the target.
When setting up the bind for unix sockets configured in the Listen parameters of the configuration file, the code does not check for a successful call to unlink and bind prior to performing the call to chmod. A sufficiently fast attacker could place a symbolic link at the configured location after the call to unlink, causing the bind to fail once again and performing a successful chmod.
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-35235?
CVE-2024-35235 has been classified as a medium severity vulnerability.
How do I fix CVE-2024-35235?
To fix CVE-2024-35235, upgrade to CUPS version 2.4.9 or later for Red Hat, or to specific Debian versions: 2.3.3op2-3+deb11u8, 2.4.2-3+deb12u7, or 2.4.10-1.
What systems are affected by CVE-2024-35235?
CVE-2024-35235 affects CUPS versions 2.4.8 and earlier on Linux and other Unix-like operating systems.
What is the impact of CVE-2024-35235?
The impact of CVE-2024-35235 could potentially allow an attacker to manipulate the cupsd process through a symbolic link.
When was CVE-2024-35235 disclosed?
CVE-2024-35235 was disclosed on June 11, 2024.