Multiple Vendor CUPS texttops Integer Overflow Vulnerability #2919
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.
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.
The text was updated successfully, but these errors were encountered:
--- 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)