Wednesday, February 27, 2008

Buffer overflow in Ghostscript

Given the huge amount of attention given to xpdf (and derivatives), it is surprising that not as much attention has been given to Ghostscript. Most Linux desktops will render both PDF and PS files directly from the web.

The attack surface of Ghostscript is huge. Not only is it a Turing Complete language[*], but it has a rich set of runtime operators and APIs. Many of these operators and APIs stray into areas of functionality that might be integer overflow prone: decompressors, image parsers, graphics rending, canvas handing, etc.

I've placed technical details of a buffer overflow at:

[*] Client-side execution of such languages has never gone particularly well from a security perspective. Think Java applets, or Javascript.


Anonymous said...

This is fixed by Ghostscript svn revision 8520 and will be in the revision 8.62 release coming out today (Feb 29, 2008).

The attempted exploit will now throw a 'rangecheck' PS error prior to attemting to fill the buffer from the Range array.

Anonymous said...

Does this really work on x86_64?

pammi said...

pammi said...

Acesoftech is one of the leading Kolkata based website design company. The kolkata web design company provides high-quality, and professional services at affordable rates. We have clients from different parts of the world because of our quality works.Kolkata web design company