search menu icon-carat-right cmu-wordmark

CERT Coordination Center

CUPS buffer overflow vulnerability

Vulnerability Note VU#446897

Original Release Date: 2007-11-01 | Last Revised: 2007-12-18

Overview

The Common Unix Printing System contains a buffer overflow vulnerability. This vulnerability may allow a remote attacker to execute arbitrary code.

Description

The Common Unix Printing System (CUPS) is a printing service used by many Linux and Unix operating systems. CUPS uses a print scheduling process that dispatches print jobs and provides the printer's status to local and remote programs.

The Internet Printing Protocol (IPP) is a standard protocol that defines printing and managing print ques. As specified in RFC 2910, the IPP transport layer consists of an HTTP/1.1 request or response. Section 3.5 of RFC 2910 specifies two different types of tags that can either delimit sections of protocols (delimiter tags) or specify the type of each attribute value (value tags). textWithLanguage tags are defined in section 4.1.1.2 and nameWithLanguage is defined in section 4.1.2.2.

Per Secunia Advisory 2007-76:

Secunia Research has discovered a vulnerability in CUPS, which can be exploited by malicious people to compromise a vulnerable system.

The vulnerability is caused due to a boundary error within the "ippReadIO()" function in cups/ipp.c when processing IPP (Internet Printing Protocol) tags. This can be exploited to overwrite one byte on the stack with a zero by sending an IPP request containing specially crafted "textWithLanguage" or "nameWithLanguage" tags.

Successful exploitation allows execution of arbitrary code.

Impact

A remote, unauthenticated attacker may be able to execute arbitrary code with the privileges of the user running the CUPS server or cause the server to crash. The cupsd daemon may run with root privileges.

Solution

Administrators and users should see the systems affected portion of this document for a partial list of affected vendors. Users who compile CUPS from source should see CUPS Article #508: Common UNIX Printing System 1.3.4 for information about obtaining fixed software.

Restrict access

Restricting access to CUPS servers by using the CUPS configuration directives, firewall rules, or access control lists may mitigate this vulnerability. By default, cupsd listens on port 631/udp. Systems that use CUPS exclusively for local printing should set the Listen directive to localhost:631 in the cupsd configuration file to prevent remote systems from exploiting this vulnerability.

Vendor Information

446897
 

View all 42 vendors View less vendors


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

This vulnerability was published in Secunia Advisory 2007-76.

This document was written by Ryan Giobbi.

Other Information

CVE IDs: CVE-2007-4351
Severity Metric: 11.88
Date Public: 2007-10-31
Date First Published: 2007-11-01
Date Last Updated: 2007-12-18 18:24 UTC
Document Revision: 23

Sponsored by CISA.