[okular] [Bug 416055] New: PDF document with weird signature makes okular crash

Northsoft bugzilla_noreply at kde.org
Thu Jan 9 16:22:00 GMT 2020


https://bugs.kde.org/show_bug.cgi?id=416055

            Bug ID: 416055
           Summary: PDF document with weird signature makes okular crash
           Product: okular
           Version: 1.7.0
          Platform: Mageia RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel at kde.org
          Reporter: avas80 at contbay.com
  Target Milestone: ---

Created attachment 125003
  --> https://bugs.kde.org/attachment.cgi?id=125003&action=edit
Bad pdf file

SUMMARY
PDF document with weird signature makes okular crash
Dereferencing a null pointer at libnss source

STEPS TO REPRODUCE
1. Open an attachment in okular

OBSERVED RESULT
1. Segmentation fäult

EXPECTED RESULT
1. Opened document and a message «error processing signature»

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.4.6-desktop-2.mga7 x86_64
KDE Plasma Version: plasmashell 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.6

ADDITIONAL INFORMATION
See bad pdf file in attachment. GDB output:
(gdb) run doc.pdf
Starting program: /usr/bin/okular doc.pdf
Missing separate debuginfos, use: debuginfo-install glibc-2.29-19.mga7.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff0b9e700 (LWP 25581)]
[New Thread 0x7fffeb28f700 (LWP 25582)]
Missing separate debuginfo for /lib64/libOkular5Core.so.9
Try: dnf --enablerepo='*debug*' install
/usr/lib/debug/.build-id/fe/7b6a079bde5ccc1e08158c15046b9e6a06c1be.debug
Or try: urpmi 
/usr/lib/debug/.build-id/fe/7b6a079bde5ccc1e08158c15046b9e6a06c1be.debug
[New Thread 0x7fffe337f700 (LWP 25583)]
[New Thread 0x7fffe2b7e700 (LWP 25584)]
[New Thread 0x7fffe237d700 (LWP 25585)]
[New Thread 0x7fffe1b7c700 (LWP 25586)]
ERROR: Unrecognized Hash ID

Thread 1 "okular" received signal SIGSEGV, Segmentation fault.
0x00007fffe0f968d3 in HASH_End (context=0x0, result=0xc62360 "\360",
<incomplete sequence \306>, result_len=0x7fffffffcbac, max_result_len=0)
    at sechash.c:462
462         (*context->hashobj->end)(context->hash_context, result, result_len,
(gdb) bt
#0  0x00007fffe0f968d3 in HASH_End (context=0x0, result=0xc62360 "\360",
<incomplete sequence \306>, result_len=0x7fffffffcbac, max_result_len=0)
    at sechash.c:462
#1  0x00007fffe12b0118 in SignatureHandler::validateSignature() () from
/lib64/libpoppler.so.85
#2  0x00007fffe11ae19b in FormFieldSignature::validateSignature(bool, bool,
long) () from /lib64/libpoppler.so.85
#3  0x00007fffe82ccaa5 in Poppler::FormFieldSignature::validate(int, QDateTime
const&) const () from /lib64/libpoppler-qt5.so.1
#4  0x00007fffe82cd591 in
Poppler::FormFieldSignature::validate(Poppler::FormFieldSignature::ValidateOptions)
const ()
   from /lib64/libpoppler-qt5.so.1
#5  0x00007fffe851c4c0 in PopplerFormFieldSignature::PopplerFormFieldSignature
(this=0xaf9df0, field=0xaf95d0)
    at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/generators/poppler/formfields.cpp:387
#6  0x00007fffe8516848 in PDFGenerator::addFormFields (this=<optimized out>,
popplerPage=<optimized out>, page=<optimized out>)
    at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/generators/poppler/generator_pdf.cpp:1978
#7  0x00007fffe8516ca0 in PDFGenerator::loadPages (this=this at entry=0x674180,
pagesVector=..., rotation=rotation at entry=0, clear=clear at entry=false)
    at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/generators/poppler/generator_pdf.cpp:787
#8  0x00007fffe8516fee in PDFGenerator::init (this=this at entry=0x674180,
pagesVector=..., password=...)
    at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/generators/poppler/generator_pdf.cpp:683
#9  0x00007fffe8517184 in PDFGenerator::loadDocumentWithPassword
(this=0x674180, filePath=..., pagesVector=..., password=...)
    at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/generators/poppler/generator_pdf.cpp:638
#10 0x00007fffe9de6755 in
Okular::DocumentPrivate::openDocumentInternal(KPluginMetaData const&, bool,
QString const&, QByteArray const&, QString const&) () from
/lib64/libOkular5Core.so.9
#11 0x00007fffe9de6d5a in Okular::Document::openDocument(QString const&, QUrl
const&, QMimeType const&, QString const&) ()
   from /lib64/libOkular5Core.so.9
#12 0x00007fffe9f5115b in Okular::Part::doOpenFile (this=this at entry=0x437440,
mimeA=..., fileNameToOpenA=..., 
    isCompressedFile=isCompressedFile at entry=0x7fffffffd397) at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/part.cpp:1415
#13 0x00007fffe9f5150e in Okular::Part::openFile (this=0x437440) at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/part.cpp:1549
#14 0x00007ffff7f5a3ac in ?? () from /lib64/libKF5Parts.so.5
#15 0x00007ffff7f5b22e in KParts::ReadOnlyPart::openUrl(QUrl const&) () from
/lib64/libKF5Parts.so.5
#16 0x00007fffe9f43d1e in Okular::Part::openUrl (this=0x437440, _url=...,
swapInsteadOfOpening=<optimized out>)
    at /usr/src/debug/okular-19.04.0-1.mga7.x86_64/part.cpp:1755
#17 0x00000000004144d8 in Shell::openUrl (this=0x4dbea0, url=...,
serializedOptions=...)
    at /usr/src/debug/okular-19.04.0-1.mga7.x86_64/shell/shell.cpp:280
#18 0x0000000000414736 in Shell::openDocument (this=0x4dbea0, url=...,
serializedOptions=...)
    at /usr/src/debug/okular-19.04.0-1.mga7.x86_64/shell/shell.cpp:221
#19 0x000000000040d20f in Okular::main (paths=..., serializedOptions=...) at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/shell/okular_main.cpp:176
#20 0x000000000040c955 in main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/okular-19.04.0-1.mga7.x86_64/shell/main.cpp:74
(gdb) l
457     HASH_End(HASHContext *context,
458              unsigned char *result,
459              unsigned int *result_len,
460              unsigned int max_result_len)
461     {
462         (*context->hashobj->end)(context->hash_context, result, result_len,
463                                  max_result_len);
464         return;
465     }
466
(gdb) p context
$1 = (HASHContext *) 0x0
(gdb)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list