Skip to content

NULL-pointer-dereference-ObjectStream-getObject #3

@Aurorainfinity

Description

@Aurorainfinity

A issues were found in pdftohtml in all versions.

$ ./pdftohtml 00-NULL-pointer-dereference-ObjectStream-getObject

==112953==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000046165f bp 0x7ffc5b3b07e0 sp 0x7ffc5b3b07c0 T0)
    #0 0x46165e in ObjectStream::getObject(int, int, Object*) /home/test/pdftohtml_tmp/xpdf/XRef.cc:183
    #1 0x463a46 in XRef::fetch(int, int, Object*) /home/test/pdftohtml_tmp/xpdf/XRef.cc:833
    #2 0x43c761 in Object::fetch(XRef*, Object*) /home/test/pdftohtml_tmp/xpdf/Object.cc:106
    #3 0x41faa7 in Dict::lookup(char*, Object*) /home/test/pdftohtml_tmp/xpdf/Dict.cc:76
    #4 0x41447f in Object::dictLookup(char*, Object*) (/home/test/pdftohtml_tmp/src/pdftohtml+0x41447f)
    #5 0x41e2b2 in Catalog::Catalog(XRef*) /home/test/pdftohtml_tmp/xpdf/Catalog.cc:50
    #6 0x43f340 in PDFDoc::setup(GString*, GString*) /home/test/pdftohtml_tmp/xpdf/PDFDoc.cc:200
    #7 0x43f13e in PDFDoc::PDFDoc(GString*, GString*, GString*, void*) /home/test/pdftohtml_tmp/xpdf/PDFDoc.cc:102
    #8 0x41c42a in main /home/test/pdftohtml_tmp/src/pdftohtml.cc:172
    #9 0x7ff84751483f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
    #10 0x4028a8 in _start (/home/test/pdftohtml_tmp/src/pdftohtml+0x4028a8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/test/pdftohtml_tmp/xpdf/XRef.cc:183 ObjectStream::getObject(int, int, Object*)
==112953==ABORTING

ref:https://github.com/Aurorainfinity/Poc/tree/master/pdftohtml
00-NULL-pointer-dereference-ObjectStream-getObject.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions