Vulnerability · Published Jun 11, 2024 · Assigned by GitHub_M
CVE-2024-35235Cupsd Listen arbitrary chmod 0140777
Medium 4.4
In plain English
A medium-severity security flaw in cups from OpenPrinting. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.4% (higher than 84% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | cups | 1:2.2.6-60.el8_10 | ALSA-2024:4265 |
| AlmaLinux:9 | cups | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| AlmaLinux:8 | cups-client | 1:2.2.6-60.el8_10 | ALSA-2024:4265 |
| AlmaLinux:9 | cups-client | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| AlmaLinux:8 | cups-devel | 1:2.2.6-60.el8_10 | ALSA-2024:4265 |
| AlmaLinux:9 | cups-devel | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| AlmaLinux:8 | cups-filesystem | 1:2.2.6-60.el8_10 | ALSA-2024:4265 |
| AlmaLinux:9 | cups-filesystem | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| AlmaLinux:8 | cups-ipptool | 1:2.2.6-60.el8_10 | ALSA-2024:4265 |
| AlmaLinux:9 | cups-ipptool | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| AlmaLinux:8 | cups-libs | 1:2.2.6-60.el8_10 | ALSA-2024:4265 |
| AlmaLinux:9 | cups-libs | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| AlmaLinux:8 | cups-lpd | 1:2.2.6-60.el8_10 | ALSA-2024:4265 |
| AlmaLinux:9 | cups-lpd | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| AlmaLinux:9 | cups-printerapp | 1:2.3.3op2-27.el9_4 | ALSA-2024:4776 |
| Alpine:v3.20 | cups | 2.4.9-r0 | ALPINE-CVE-2024-35235 |
| Alpine:v3.21 | cups | 2.4.9-r0 | ALPINE-CVE-2024-35235 |
| Alpine:v3.22 | cups | 2.4.9-r0 | ALPINE-CVE-2024-35235 |
| Alpine:v3.23 | cups | 2.4.9-r0 | ALPINE-CVE-2024-35235 |
| Alpine:v3.24 | cups | 2.4.9-r0 | ALPINE-CVE-2024-35235 |
| Debian:12 | cups | 2.4.2-3+deb12u6 | DEBIAN-CVE-2024-35235 |
| Debian:13 | cups | 2.4.7-2 | DEBIAN-CVE-2024-35235 |
| Debian:14 | cups | 2.4.7-2 | DEBIAN-CVE-2024-35235 |
| Rocky Linux:8 | cups | 1:2.2.6-60.el8_10 | RLSA-2024:4265 |
| Ubuntu:22.04:LTS | cups | 2.4.1op1-1ubuntu4.9 | USN-6844-1 |
| Ubuntu:22.04:LTS | cups | 2.4.1op1-1ubuntu4.9 | UBUNTU-CVE-2024-35235 |
| Ubuntu:24.04:LTS | cups | 2.4.7-1.2ubuntu7.1 | USN-6844-1 |
| Ubuntu:24.04:LTS | cups | 2.4.7-1.2ubuntu7.1 | UBUNTU-CVE-2024-35235 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| OpenPrinting | cups | <= 2.4.8 |
Weakness: CWE-59, CWE-252 · Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/OpenPrinting/cups/security/advisories/GHSA-vvwp-mv6j-hw6f x_refsource_CONFIRM
- https://github.com/OpenPrinting/cups/commit/ff1f8a623e090dee8a8aadf12a6a4b25efac143d x_refsource_MISC
- https://git.launchpad.net/ubuntu/+source/apparmor/tree/profiles/apparmor.d/abstractions/user-tmp#n21 x_refsource_MISC
- https://github.com/OpenPrinting/cups/blob/aba917003c8de55e5bf85010f0ecf1f1ddd1408e/cups/http-addr.c#L229-L240 x_refsource_MISC
- http://www.openwall.com/lists/oss-security/2024/06/11/1
- http://www.openwall.com/lists/oss-security/2024/06/12/4
- http://www.openwall.com/lists/oss-security/2024/06/12/5
- https://lists.debian.org/debian-lts-announce/2024/06/msg00001.html
- http://www.openwall.com/lists/oss-security/2024/11/08/3