Bug 471422 - Okular crashes when opening specific PDF files
Summary: Okular crashes when opening specific PDF files
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 21.12.3
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-25 07:14 UTC by Yann Salmon
Modified: 2023-06-25 22:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Salmon 2023-06-25 07:14:41 UTC
SUMMARY

Okular crashes when I try to open some specific PDF files. It does not with other files.


STEPS TO REPRODUCE
1. Download file from <https://www.citescolaire-emilezola-rennes.ac-rennes.fr/sites/citescolaire-emilezola-rennes.ac-rennes.fr/IMG/pdf/2019-2020_lycee_acte_no_1_admission_en_non-valeur_.pdf>
2. Open file in Okular.

OBSERVED RESULT

Immediate crash.

EXPECTED RESULT

PDF file to be rendered, or an error message to be displayed if file is faulty.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-75-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Xeon® CPU E3-1245 v5 @ 3.50GHz
Memory: 15.5 Gio of RAM
Graphics Processor: NVIDIA GeForce GTX 1650/PCIe/SSE2

ADDITIONAL INFORMATION

The crash happens with all the files the link to which is labelled "Acte n°" on <https://www.citescolaire-emilezola-rennes.ac-rennes.fr/spip.php?article623> but with no other file from that page or other pages. I suspect there is some kind of signature (the files are acts from an high school administrative board) that is buggy.

The bug system suggested possible duplicates, and I tried to open the related PDF files, but none of them triggers a crash, so I suspect this is not the same problem.
Comment 1 Oliver Sander 2023-06-25 19:16:44 UTC
Backtrace:

#0  getCertificateInfoFromCERT (cert=0x55555679e5e0)
    at /home/sander/poppler/poppler/NSSCryptoSignBackend.cc:619
#1  0x00007fffa946d674 in NSSSignatureVerification::getCertificateInfo (this=0x5555567776a0)
    at /home/sander/poppler/poppler/NSSCryptoSignBackend.cc:658
#2  0x00007fffa934bf29 in FormFieldSignature::validateSignature (this=0x555555bade30, 
    doVerifyCert=doVerifyCert@entry=true, forceRevalidation=forceRevalidation@entry=false, 
    validationTime=-1, ocspRevocationCheck=<optimized out>, enableAIA=enableAIA@entry=false)
    at /home/sander/poppler/poppler/Form.cc:2419
#3  0x00007fffa934bfd8 in FormWidgetSignature::validateSignature (this=this@entry=0x5555567789b0, 
    doVerifyCert=doVerifyCert@entry=true, forceRevalidation=forceRevalidation@entry=false, 
    validationTime=<optimized out>, ocspRevocationCheck=<optimized out>, 
    enableAIA=enableAIA@entry=false) at /home/sander/poppler/poppler/Form.cc:578
#4  0x00007fffbda685ff in Poppler::FormFieldSignature::validate (this=this@entry=0x5555567779b0, 
    opt=opt@entry=1, validationTime=...) at /home/sander/poppler/qt5/src/poppler-form.cc:1021
#5  0x00007fffbda688f1 in Poppler::FormFieldSignature::validate (this=0x5555567779b0, 
    opt=Poppler::FormFieldSignature::ValidateVerifyCertificate)
    at /home/sander/poppler/qt5/src/poppler-form.cc:971
#6  0x00007fffbdb11d9d in PopplerFormFieldSignature::PopplerFormFieldSignature (this=0x555556786fc0, 
    field=std::unique_ptr<Poppler::FormFieldSignature> = {...})
    at /home/sander/kde-invent/okular/generators/poppler/formfields.cpp:400
#7  0x00007fffbdafe571 in PDFGenerator::getFormFields (this=0x555555aaba90, popplerPage=0x5555567782c0)
    at /home/sander/kde-invent/okular/generators/poppler/generator_pdf.cpp:1934
#8  0x00007fffbdaf8603 in PDFGenerator::loadPages (this=0x555555aaba90, pagesVector=..., rotation=0, 
    clear=false) at /home/sander/kde-invent/okular/generators/poppler/generator_pdf.cpp:873
--Type <RET> for more, q to quit, c to continue without paging--c
#9  0x00007fffbdaf7cca in PDFGenerator::init (this=0x555555aaba90, pagesVector=..., password=...)
    at /home/sander/kde-invent/okular/generators/poppler/generator_pdf.cpp:734
#10 0x00007fffbdaf789a in PDFGenerator::loadDocumentWithPassword (this=0x555555aaba90, filePath=..., 
    pagesVector=..., password=...)
    at /home/sander/kde-invent/okular/generators/poppler/generator_pdf.cpp:678
#11 0x00007fffe8207abb in Okular::DocumentPrivate::openDocumentInternal (this=0x5555557d8c40, 
    offer=..., isstdin=false, docFile=..., filedata=..., password=...)
    at /home/sander/kde-invent/okular/core/document.cpp:942
#12 0x00007fffe8211571 in Okular::Document::openDocument (this=0x5555557af760, docFile=..., url=..., 
    _mime=..., password=...) at /home/sander/kde-invent/okular/core/document.cpp:2460
#13 0x00007fffe04d1184 in Okular::Part::doOpenFile (this=0x5555556254f0, mimeA=..., 
    fileNameToOpenA=..., isCompressedFile=0x7fffffffd077)
    at /home/sander/kde-invent/okular/part/part.cpp:1465
#14 0x00007fffe04d20e6 in Okular::Part::openFile (this=0x5555556254f0)
    at /home/sander/kde-invent/okular/part/part.cpp:1599
#15 0x00007ffff7f50785 in ?? () from /lib/x86_64-linux-gnu/libKF5Parts.so.5
#16 0x00007ffff7f5187e in KParts::ReadOnlyPart::openUrl(QUrl const&) ()
   from /lib/x86_64-linux-gnu/libKF5Parts.so.5
#17 0x00007fffe04d3a86 in Okular::Part::openUrl (this=0x5555556254f0, _url=..., 
    swapInsteadOfOpening=false) at /home/sander/kde-invent/okular/part/part.cpp:1825
#18 0x00007fffe04d363a in Okular::Part::openUrl (this=0x5555556254f0, url=...)
    at /home/sander/kde-invent/okular/part/part.cpp:1773
#19 0x0000555555572980 in Shell::openUrl (this=0x55555578d2c0, url=..., serializedOptions=...)
    at /home/sander/kde-invent/okular/shell/shell.cpp:418
#20 0x00005555555724e0 in Shell::openDocument (this=0x55555578d2c0, url=..., serializedOptions=...)
    at /home/sander/kde-invent/okular/shell/shell.cpp:362
#21 0x000055555556e290 in Okular::main (paths=..., serializedOptions=...)
    at /home/sander/kde-invent/okular/shell/okular_main.cpp:216
#22 0x000055555556b4fc in main (argc=2, argv=0x7fffffffdc08)
    at /home/sander/kde-invent/okular/shell/main.cpp:97
(gdb)
Comment 2 Albert Astals Cid 2023-06-25 22:52:50 UTC
Poppler bug https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1414