REDHAT-BUG-2553616: High severity OpenPrinting CUPS vulnerability
OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. Prior to 2.4.20, the backend/ipp.c quotestring() function preserves carriage-return and line-feed characters in a remote printer-controlled marker-message before reportattr() writes the value to the scheduler status stream. The scheduler can parse an injected newline as a separate PPD: control line and persist an attacker-selected PPD keyword. The reporter demonstrated that a later print job on a Foomatic-backed queue could consume an injected FoomaticRIPCommandLine value and execute in the filter context as lp. This issue is fixed in version 2.4.20.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.4.20
Event History
Frequently Asked Questions
What conditions are required for exploitation?
An attacker needs control of a remote printer's marker-message so it can include carriage-return or line-feed characters. The injected status data must then be interpreted as a PPD control line, and a later print job must use a Foomatic-backed queue that consumes the attacker-selected FoomaticRIPCommandLine value.
Which environments are most exposed?
Systems running OpenPrinting CUPS before 2.4.20 are affected when they use remote printers whose marker messages may be attacker-controlled. The demonstrated command-execution path specifically involves Foomatic-backed print queues.
What is the impact of a successful exploit?
A successful injection can persist an attacker-selected PPD keyword. In the demonstrated Foomatic-backed queue scenario, a subsequent print job can execute the injected command in the filter context as the lp user.
What can be done if updating immediately is not possible?
The provided information identifies remote printer-controlled marker messages and Foomatic-backed queues as the relevant exposure points. Restricting use of untrusted remote printers and avoiding Foomatic-backed queues would reduce exposure, but the data does not provide a complete workaround.