Multiple Vendor CUPS texttops Integer Overflow Vulnerability #2919
Comments
|
CUPS.org User: mike OK, added range checked for cpi, lpi, and columns. |
|
CUPS.org User: mike Fixed in Subversion repository. |
|
"str2919.patch": Index: texttops.c--- texttops.c (revision 936)
Page = calloc(sizeof(lchar_t *), SizeLines);
/*
if ((val = cupsGetOption("cpi", num_options, options)) != NULL)
if ((val = cupsGetOption("lpi", num_options, options)) != NULL)
if (PrettyPrint) |
Version: 1.3-current
CUPS.org User: mike
Remote exploitation of an integer overflow vulnerability in CUPS, as included in various vendors' operating system distributions, could allow an attacker to execute arbitrary code with the privileges of the affected service.
The Common Unix Printing System, more commonly referred to as CUPS, provides a standard printer interface for various Unix-based operating systems. 'texttops' is a part of CUPS responsible for creating PostScript representations of text files.
The vulnerability exists within the WriteProlog() function in the 'texttops' application. When calculating the page size used for storing PostScript data, multiple values that are derived from attacker controlled content are used in a multiplication operation. This calculation can overflow, resulting in an incorrect result for the total page size. This value is then used to allocate a heap buffer that is later filled with attacker controlled content, resulting in a heap buffer overflow.
Analysis:
Exploitation of this vulnerability results in the execution of arbitrary code with the privileges of the affected service. Depending on the underlying operating system and distribution, CUPS may run as the lp, daemon, or a different user.
Exploiting heap overflow vulnerabilities on modern Unix systems can be difficult due to various heap protection schemes. However, iDefense has proof-of-concept exploit code that demonstrates code execution is possible.
To exploit this vulnerability remotely, the targeted host must be sharing a printer(s) on the network. If a printer is not being shared, CUPS only listens on the localhost interface, and the scope of this vulnerability would be limited to local privilege escalation.
Credit: regenrecht
The text was updated successfully, but these errors were encountered: