Created attachment 119916 [details] Digitally signed documents (one gives the segmentation fault) SUMMARY I use the code portablesigner to digitally sign a document, and Okular can read the generated document no problem (see example sample-sig.pdf attached). My colleagues, who uses ADOBE Acrobat Reader DC Version 2019.010.20099 in a Mac signs the same document, and Okular can read it no problem (see example sample_victor.pdf attached). But if he signs the file previously signed by me (so as to have it signed by both of us), then Okular segfaults when trying to open the file (see example sample_sig_victor.pdf). This might not be a problem specific to Okular, since trying to see the signatures with pdfsig (v. 0.76.1), also segfaults: [angelv@bug]$ pdfsig sample_sig_victor.pdf Digital Signature Info of: sample_sig_victor.pdf Signature #1: - Signer Certificate Common Name: DE VICENTE GARRIDO ANGEL MANUEL - 30660835H - Signer full Distinguished Name: CN=DE VICENTE GARRIDO ANGEL MANUEL - 30660835H,SN=DE VICENTE GARRIDO,givenName=ANGEL MANUEL,serialNumber=IDCES-30660835H,C=ES - Signing Time: May 08 2019 12:16:59 - Signing Hash Algorithm: SHA1 - Signature Type: adbe.pkcs7.sha1 - Signed Ranges: [0 - 13426], [18278 - 24071] - Not total document signed - Signature Validation: Signature is Valid. - Certificate Validation: Certificate is Trusted. Segmentation fault (core dumped) [angelv@bug]$ SOFTWARE/OS VERSIONS Linux: ArchLinux ADDITIONAL INFORMATION
Backtrace: #0 0x00007fffe0181c1f in PL_HashTableLookupConst () from /usr/lib/x86_64-linux-gnu/libplds4.so #1 0x00007fffe01a3818 in SECOID_FindOID_Util () from /usr/lib/x86_64-linux-gnu/libnssutil3.so #2 0x00007fffe0ffec59 in NSS_CMSContentInfo_GetContentTypeTag () from /usr/lib/x86_64-linux-gnu/libsmime3.so #3 0x00007fffe0fffe40 in ?? () from /usr/lib/x86_64-linux-gnu/libsmime3.so #4 0x00007fffe019f7ee in SEC_ASN1DecoderUpdate_Util () from /usr/lib/x86_64-linux-gnu/libnssutil3.so #5 0x00007fffe0fffc6b in NSS_CMSDecoder_Update () from /usr/lib/x86_64-linux-gnu/libsmime3.so #6 0x00007fffe100046d in NSS_CMSMessage_CreateFromDER () from /usr/lib/x86_64-linux-gnu/libsmime3.so #7 0x00007fffe0d7cea3 in SignatureHandler::CMS_MessageCreate (this=this@entry=0x7fffffffc920, cms_item=cms_item@entry=0x7fffffffc928) at /home/sander/gitlab/poppler/poppler/SignatureHandler.cc:316 #8 0x00007fffe0d7d6a7 in SignatureHandler::SignatureHandler (this=0x7fffffffc920, p7=0x555555e26380 "0\202$\270\006\t*\206H\206\367\r\001\a\002\240\202$\251\060\202$\245\002\001\001\061\017\060\r\006\t`\206H\001e\003\004\002\001\005", p7_length=10285) at /home/sander/gitlab/poppler/poppler/SignatureHandler.cc:273 #9 0x00007fffe0c82ec8 in FormFieldSignature::validateSignature (this=0x555555d97800, doVerifyCert=doVerifyCert@entry=true, forceRevalidation=forceRevalidation@entry=false, validationTime=4294967295) at /home/sander/gitlab/poppler/poppler/Form.cc:1731 #10 0x00007fffe0c831c0 in FormWidgetSignature::validateSignature (this=this@entry=0x555555d54b90, doVerifyCert=doVerifyCert@entry=true, forceRevalidation=forceRevalidation@entry=false, validationTime=<optimized out>) at /home/sander/gitlab/poppler/poppler/Form.cc:461 #11 0x00007fffe0ef4d3e in Poppler::FormFieldSignature::validate (this=this@entry=0x555555e42f90, opt=opt@entry=1, validationTime=...) at /home/sander/gitlab/poppler/qt5/src/poppler-form.cc:871 #12 0x00007fffe0ef52d1 in Poppler::FormFieldSignature::validate (this=0x555555e42f90, opt=Poppler::FormFieldSignature::ValidateVerifyCertificate) at /home/sander/gitlab/poppler/qt5/src/poppler-form.cc:864 #13 0x00007fffe1052bae in PopplerFormFieldSignature::PopplerFormFieldSignature(Poppler::FormFieldSignature*) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okular/generators/okularGenerator_poppler.so #14 0x00007fffe104337c in PDFGenerator::addFormFields(Poppler::Page*, Okular::Page*) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okular/generators/okularGenerator_poppler.so #15 0x00007fffe103d704 in PDFGenerator::loadPages(QVector<Okular::Page*>&, int, bool) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okular/generators/okularGenerator_poppler.so #16 0x00007fffe103d077 in PDFGenerator::init(QVector<Okular::Page*>&, QString const&) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okular/generators/okularGenerator_poppler.so #17 0x00007fffe103cdc1 in PDFGenerator::loadDocumentWithPassword(QString const&, QVector<Okular::Page*>&, QString const&) () --Type <RET> for more, q to quit, c to continue without paging--c from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okular/generators/okularGenerator_poppler.so #18 0x00007fffe96698a7 in Okular::DocumentPrivate::openDocumentInternal(KPluginMetaData const&, bool, QString const&, QByteArray const&, QString const&) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/libOkular5Core.so.9 #19 0x00007fffe9672efb in Okular::Document::openDocument(QString const&, QUrl const&, QMimeType const&, QString const&) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/libOkular5Core.so.9 #20 0x00007fffe981843a in Okular::Part::doOpenFile(QMimeType const&, QString const&, bool*) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okularpart.so #21 0x00007fffe98191bb in Okular::Part::openFile() () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okularpart.so #22 0x00007ffff7f3e9f1 in ?? () from /usr/lib/x86_64-linux-gnu/libKF5Parts.so.5 #23 0x00007ffff7f3f986 in KParts::ReadOnlyPart::openUrl(QUrl const&) () from /usr/lib/x86_64-linux-gnu/libKF5Parts.so.5 #24 0x00007fffe981a893 in Okular::Part::openUrl(QUrl const&, bool) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okularpart.so #25 0x00007fffe981a6c2 in Okular::Part::openUrl(QUrl const&) () from /home/sander/okular-inst/lib/x86_64-linux-gnu/plugins/okularpart.so #26 0x0000555555568642 in Shell::openUrl(QUrl const&, QString const&) () #27 0x0000555555568113 in Shell::openDocument(QUrl const&, QString const&) () #28 0x00005555555655e8 in Okular::main(QStringList const&, QString const&) () #29 0x00005555555620e2 in main ()
Yes, it's a bug in poppler. Can you please report it to https://gitlab.freedesktop.org/poppler/poppler/issues ?
Reported upstream https://gitlab.freedesktop.org/poppler/poppler/issues/766
*** Bug 407670 has been marked as a duplicate of this bug. ***
*** Bug 407369 has been marked as a duplicate of this bug. ***
*** Bug 408576 has been marked as a duplicate of this bug. ***
*** Bug 409258 has been marked as a duplicate of this bug. ***
*** Bug 409283 has been marked as a duplicate of this bug. ***
*** Bug 409684 has been marked as a duplicate of this bug. ***
*** Bug 416077 has been marked as a duplicate of this bug. ***
*** Bug 416637 has been marked as a duplicate of this bug. ***
*** Bug 417241 has been marked as a duplicate of this bug. ***
*** Bug 418738 has been marked as a duplicate of this bug. ***
*** Bug 420656 has been marked as a duplicate of this bug. ***