[Poppler-bugs] [Bug 91200] New: invalid input will cause out of bounds heap read in function Hints::getPageObjectNum
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Jul 2 14:36:27 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=91200
Bug ID: 91200
Summary: invalid input will cause out of bounds heap read in
function Hints::getPageObjectNum
Product: poppler
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: poppler-bugs at lists.freedesktop.org
Reporter: hanno at hboeck.de
Created attachment 116894
--> https://bugs.freedesktop.org/attachment.cgi?id=116894&action=edit
sample input causing out of bounds access
The attached file will cause an invalid read access in poppler. Can be tested
with either address sanitizer or valgrind.
This is the address sanitizer output with pdftoppm:
==31074==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x60200000fc74 at pc 0x0000008aaaaf bp 0x7fffdd7b1f00 sp 0x7fffdd7b1ef8
READ of size 4 at 0x60200000fc74 thread T0
#0 0x8aaaae in Hints::getPageObjectNum(int)
/f/poppler-0.33.0/poppler/Hints.cc:449:12
#1 0x68807d in PDFDoc::parsePage(int)
/f/poppler-0.33.0/poppler/PDFDoc.cc:1888:17
#2 0x673518 in PDFDoc::getPage(int)
/f/poppler-0.33.0/poppler/PDFDoc.cc:1929:27
#3 0x522284 in PDFDoc::getPageMediaWidth(int)
/f/poppler-0.33.0/utils/../poppler/PDFDoc.h:126:14
#4 0x522284 in main /f/poppler-0.33.0/utils/pdftoppm.cc:492
#5 0x7f9403dbdf9f in __libc_start_main
/var/tmp/portage/sys-libs/glibc-2.20-r2/work/glibc-2.20/csu/libc-start.c:289
#6 0x47a0cb in _start (/mnt/ram/poppler/pdftoppm+0x47a0cb)
0x60200000fc74 is located 0 bytes to the right of 4-byte region
[0x60200000fc70,0x60200000fc74)
allocated by thread T0 here:
#0 0x501092 in __interceptor_malloc (/mnt/ram/poppler/pdftoppm+0x501092)
#1 0x708812 in gmalloc(unsigned long, bool)
/f/poppler-0.33.0/goo/gmem.cc:110:13
#2 0x708812 in gmallocn(int, int, bool) /f/poppler-0.33.0/goo/gmem.cc:192
#3 0x708812 in gmallocn_checkoverflow /f/poppler-0.33.0/goo/gmem.cc:200
SUMMARY: AddressSanitizer: heap-buffer-overflow
/f/poppler-0.33.0/poppler/Hints.cc:449 Hints::getPageObjectNum(int)
Shadow bytes around the buggy address:
0x0c047fff9f30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9f40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9f50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9f60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9f70: fa fa fa fa fa fa fa fa fa fa 00 fa fa fa 04 fa
=>0x0c047fff9f80: fa fa 00 fa fa fa 04 fa fa fa 04 fa fa fa[04]fa
0x0c047fff9f90: fa fa 04 fa fa fa 00 fa fa fa 04 fa fa fa 00 00
0x0c047fff9fa0: fa fa 00 00 fa fa 01 fa fa fa 04 fa fa fa fd fa
0x0c047fff9fb0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x0c047fff9fc0: fa fa 05 fa fa fa fd fa fa fa fd fa fa fa fd fa
0x0c047fff9fd0: fa fa fd fa fa fa fd fa fa fa 05 fa fa fa fd fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==31074==ABORTING
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150702/072cf2c0/attachment.html>
More information about the Poppler-bugs
mailing list