Summary: | gs pdf parsing buffer overflow | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | knud <kokanin> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex, jackie.rosen |
Priority: | P4 | Keywords: | bountiable |
Version: | 0.00 | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | Word Size: | --- |
Description
knud
2009-06-08 09:51:48 UTC
Created attachment 5080 [details]
poc
This is a perl script that can be used to create the malformed file. It has
been tested on ver. 8.64 as well. The offsets differ, but the bug is the same
so it is just a matter of tweaking the buffer / addresses to get code
execution.
Alex we have agreed to let kokanin@gmail.com (knud) work on this and collect the bounty, please confirm the bug and review any subsequent patches. Interesting that the /BaseFont name is just a skosh over 6800 bytes. This does not correspond to any buffer sizes, and the maximum name length in the scanner is supposed to be 16,383 (if EXTEND_NAMES is 0) or 1,023 (if EXTEND_NAMES is 4, which I _think_ is the default). Since the PS/PDF scanner is part of the interpreter, Alex is definitely the correct person for this assignment. Fix memory corruption caused by long names. The length of name in the scanner buffer may exceed the maximum name size and should be checked. The following patch has been committed as a rev. 9797. http://ghostscript.com/pipermail/gs-cvs/2009-June/009430.html Regression testing shows no differences. *** Bug 690522 has been marked as a duplicate of this bug. *** |