Bug 466307 - Okular crashes after, and sometimes when, opening signed PDF files
Summary: Okular crashes after, and sometimes when, opening signed PDF files
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 22.12.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2023-02-23 14:37 UTC by Joost Cassee
Modified: 2023-05-05 03:46 UTC (History)
1 user (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 Joost Cassee 2023-02-23 14:37:31 UTC
Application: okular (22.12.2)

Qt Version: 5.15.8
Frameworks Version: 5.103.0
Operating System: Linux 6.1.12-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.27.1 [KCrashBackend]

-- Information about the crash:
I opened a signed PDF document, and when I closed it, Okular crashed. A signed document from the same series caused Okular to crash while opening it. Unfortunately, I cannot include the documents because they contain personal information.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  __memcmp_evex_movbe () at ../sysdeps/x86_64/multiarch/memcmp-evex-movbe.S:164
#7  0x00007f43640111a4 in SECITEM_CompareItem_Util (a=<optimized out>, b=<optimized out>) at ../../lib/util/secitem.c:202
#8  0x00007f4364160326 in CERT_CompareCerts (c1=<optimized out>, c2=<optimized out>) at ../../lib/certdb/certdb.c:1829
#9  0x00007f43641bf7c2 in pkix_pl_Cert_Equals (firstObject=0x5639aa26f2d8, secondObject=0x5639aa2fc238, pResult=0x7ffd7edd1a68, plContext=0x5639aa13cc50) at ../../lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c:1292
#10 0x00007f43641d2ef4 in PKIX_PL_Object_Equals (firstObject=0x5639aa26f2d8, secondObject=0x5639aa2fc238, pResult=0x7ffd7edd1a68, plContext=0x5639aa13cc50) at ../../lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c:996
#11 0x00007f43641a09ab in pkix_List_Equals (first=first@entry=0x5639a9f272c8, second=0x5639a9fd3978, pResult=pResult@entry=0x7ffd7edd1b34, plContext=plContext@entry=0x5639aa13cc50) at ../../lib/libpkix/pkix/util/pkix_list.c:347
#12 0x00007f43641d4c0d in pkix_pl_PrimHashTable_Lookup (plContext=0x5639aa13cc50, pResult=<synthetic pointer>, keyComp=0x7f43641a0710 <pkix_List_Equals>, hashCode=1541928911, key=0x5639a9f272c8, ht=<optimized out>) at ../../lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c:400
#13 PKIX_PL_HashTable_Lookup (ht=0x5639aa052648, key=0x5639a9f272c8, pResult=0x7ffd7edd1dc0, plContext=0x5639aa13cc50) at ../../lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c:364
#14 0x00007f43641e0bb1 in pkix_CacheCertChain_Lookup (plContext=0x5639aa13cc50, pBuildResult=0x7ffd7edd1d90, pFound=<synthetic pointer>, testDate=0x5639aa3c49f8, anchors=0x5639aaec5c08, targetCert=0x5639aa26f2d8) at ../../lib/libpkix/pkix/util/pkix_tools.c:601
#15 pkix_Build_CheckInCache (plContext=0x5639aa13cc50, pNBIOContext=0x7ffd7edd1d58, pBuildResult=0x7ffd7edd1d70, state=0x5639a9fcac38) at ../../lib/libpkix/pkix/top/pkix_build.c:2948
#16 pkix_Build_InitiateBuildChain.constprop.0 (procParams=<optimized out>, pNBIOContext=pNBIOContext@entry=0x7ffd7edd1f30, pState=pState@entry=0x7ffd7edd1f40, pBuildResult=pBuildResult@entry=0x7ffd7edd1f38, pVerifyNode=0x7ffd7edd20b0, plContext=plContext@entry=0x5639aa13cc50) at ../../lib/libpkix/pkix/top/pkix_build.c:3495
#17 0x00007f43641ab421 in PKIX_BuildChain (procParams=<optimized out>, pNBIOContext=0x7ffd7edd20c8, pState=0x7ffd7edd20c0, pBuildResult=0x7ffd7edd20d0, pVerifyNode=<optimized out>, plContext=0x5639aa13cc50) at ../../lib/libpkix/pkix/top/pkix_build.c:3704
#18 0x00007f4364122ce5 in CERT_PKIXVerifyCert (cert=0x5639aae1a890, usages=<optimized out>, paramsIn=<optimized out>, paramsOut=<optimized out>, wincx=<optimized out>) at ../../lib/certhigh/certvfypkix.c:2164
#19 0x00007f434c6748fa in SignatureHandler::validateCertificate (this=0x7ffd7edd22e0, validation_time=-1, ocspRevocationCheck=<optimized out>, useAIACertFetch=<optimized out>) at /usr/src/debug/poppler/poppler-23.02.0/poppler/SignatureHandler.cc:1036
#20 0x00007f434c54d8b7 in FormFieldSignature::validateSignature (this=0x5639a9fa0510, doVerifyCert=<optimized out>, forceRevalidation=<optimized out>, validationTime=-1, ocspRevocationCheck=<optimized out>, enableAIA=<optimized out>) at /usr/src/debug/poppler/poppler-23.02.0/poppler/Form.cc:2405
#21 0x00007f43643c38e3 in Poppler::FormFieldSignature::validate (this=<optimized out>, opt=1, validationTime=...) at /usr/src/debug/poppler/poppler-23.02.0/qt5/src/poppler-form.cc:1017
#22 0x00007f43643c3da5 in Poppler::FormFieldSignature::validate (this=0x5639aa405830, opt=opt@entry=Poppler::FormFieldSignature::ValidateVerifyCertificate) at /usr/src/debug/poppler/poppler-23.02.0/qt5/src/poppler-form.cc:967
#23 0x00007f4364483365 in PopplerFormFieldSignature::PopplerFormFieldSignature (this=<optimized out>, field=..., this=<optimized out>, field=...) at /usr/src/debug/okular/okular-22.12.2/generators/poppler/formfields.cpp:404
#24 0x00007f4364487f66 in PDFGenerator::getFormFields(Poppler::Page*) [clone .constprop.0] (popplerPage=<optimized out>, this=<optimized out>) at /usr/src/debug/okular/okular-22.12.2/generators/poppler/generator_pdf.cpp:1940
#25 0x00007f43644790b6 in PDFGenerator::loadPages (rotation=0, clear=false, pagesVector=..., this=0x5639aa2207e0) at /usr/src/debug/okular/okular-22.12.2/generators/poppler/generator_pdf.cpp:859
#26 PDFGenerator::init (this=0x5639aa2207e0, pagesVector=..., password=...) at /usr/src/debug/okular/okular-22.12.2/generators/poppler/generator_pdf.cpp:715
#27 0x00007f43800a035a in Okular::DocumentPrivate::openDocumentInternal (this=0x5639a9c37150, offer=..., isstdin=<optimized out>, docFile=..., filedata=..., password=...) at /usr/src/debug/okular/okular-22.12.2/core/document.cpp:937
#28 0x00007f43800ac641 in Okular::Document::openDocument (this=this@entry=0x5639a9ca98f0, docFile=..., url=..., _mime=..., password=...) at /usr/src/debug/okular/okular-22.12.2/core/document.cpp:2452
#29 0x00007f43802446e5 in Okular::Part::doOpenFile (this=this@entry=0x5639a9c829e0, mimeA=..., fileNameToOpenA=..., isCompressedFile=isCompressedFile@entry=0x7ffd7edd2b27) at /usr/src/debug/okular/okular-22.12.2/part/part.cpp:1471
#30 0x00007f4380245f82 in Okular::Part::openFile (this=<optimized out>) at /usr/src/debug/okular/okular-22.12.2/part/part.cpp:1605
#31 0x00007f4390027cad in KParts::ReadOnlyPartPrivate::openLocalFile (this=this@entry=0x5639a9ab5930) at /usr/src/debug/kparts/kparts-5.103.0/src/readonlypart.cpp:184
#32 0x00007f439002c600 in KParts::ReadOnlyPart::openUrl (this=this@entry=0x5639a9c829e0, url=...) at /usr/src/debug/kparts/kparts-5.103.0/src/readonlypart.cpp:145
#33 0x00007f4380242add in Okular::Part::openUrl (this=<optimized out>, _url=..., swapInsteadOfOpening=<optimized out>) at /usr/src/debug/okular/okular-22.12.2/part/part.cpp:1831
#34 0x00005639a7d4c671 in Shell::openUrl (this=<optimized out>, url=..., serializedOptions=...) at /usr/src/debug/okular/okular-22.12.2/shell/shell.cpp:321
#35 0x00005639a7d4eaa6 in Shell::openDocument (this=0x5639a9944740, url=..., serializedOptions=...) at /usr/src/debug/okular/okular-22.12.2/shell/shell.cpp:265
#36 0x00005639a7d45d0e in Okular::main (serializedOptions=..., paths=...) at /usr/src/debug/okular/okular-22.12.2/shell/okular_main.cpp:193
#37 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/okular/okular-22.12.2/shell/main.cpp:99
[Inferior 1 (process 73651) detached]

Reported using DrKonqi
Comment 1 Albert Astals Cid 2023-02-23 22:18:56 UTC
not much we can do without the file really.

Can you please run in a terminal

   valgrind okular yourfile.pdf

and attach the output of that? (be patient valgrind makes everything much slower)
Comment 2 Albert Astals Cid 2023-04-05 21:15:19 UTC
Please provide the requested information
Comment 3 Bug Janitor Service 2023-04-20 03:45:44 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2023-05-05 03:46:11 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!