Bug 469882 - The pdf file does not open and closes with an error.
Summary: The pdf file does not open and closes with an error.
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 23.04.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2023-05-17 08:46 UTC by ilirius
Modified: 2023-05-22 22:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The file with which the application crashes (261.63 KB, application/pdf)
2023-05-17 10:23 UTC, ilirius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ilirius 2023-05-17 08:46:38 UTC
Application: okular (23.04.1)

Qt Version: 5.15.9
Frameworks Version: 5.106.0
Operating System: Linux 6.3.2-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 5.27.5 [KCrashBackend]

-- Information about the crash:
It was checked on the other files, everything opens normally, but with one file it crashes. Although if you try to open the same file in the browser, it all happens in normal mode

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  HASH_Update (context=0x0, src=0x7fffb5abc0e0 "%PDF-1.7\r\n%\241\263\305\327\r\n1 0 obj\r\n<</Pages 2 0 R /Type/Catalog>>\r\nendobj\r\n2 0 obj\r\n<</Count 3/Kids[ 4 0 R  21 0 R  24 0 R ]/Type/Pages>>\r\nendobj\r\n3 0 obj\r\n<</CreationDate(D:)/Creator(Samsung Electronics)/ModD"..., len=4096) at ../../lib/cryptohi/sechash.c:452
#7  0x00007fd40db55e92 in HashContext::updateHash (data_len=4096, data_block=0x7fffb5abc0e0 "%PDF-1.7\r\n%\241\263\305\327\r\n1 0 obj\r\n<</Pages 2 0 R /Type/Catalog>>\r\nendobj\r\n2 0 obj\r\n<</Count 3/Kids[ 4 0 R  21 0 R  24 0 R ]/Type/Pages>>\r\nendobj\r\n3 0 obj\r\n<</CreationDate(D:)/Creator(Samsung Electronics)/ModD"..., this=<optimized out>) at /usr/include/c++/13.1.1/bits/unique_ptr.h:199
#8  SignatureVerificationHandler::addData (data_len=4096, data_block=0x7fffb5abc0e0 "%PDF-1.7\r\n%\241\263\305\327\r\n1 0 obj\r\n<</Pages 2 0 R /Type/Catalog>>\r\nendobj\r\n2 0 obj\r\n<</Count 3/Kids[ 4 0 R  21 0 R  24 0 R ]/Type/Pages>>\r\nendobj\r\n3 0 obj\r\n<</CreationDate(D:)/Creator(Samsung Electronics)/ModD"..., this=0x55b2a85039f0) at /usr/src/debug/poppler/poppler-23.05.0/poppler/SignatureHandler.cc:793
#9  FormFieldSignature::hashSignedDataBlock (this=0x55b2a852b990, handler=0x55b2a85039f0, block_len=<optimized out>) at /usr/src/debug/poppler/poppler-23.05.0/poppler/Form.cc:2327
#10 0x00007fd40db54c90 in FormFieldSignature::validateSignature (this=0x55b2a852b990, doVerifyCert=<optimized out>, forceRevalidation=<optimized out>, validationTime=-1, ocspRevocationCheck=true, enableAIA=false) at /usr/include/c++/13.1.1/bits/unique_ptr.h:199
#11 0x00007fd41c5beb95 in Poppler::FormFieldSignature::validate (this=this@entry=0x55b2a8536630, opt=opt@entry=1, validationTime=...) at /usr/src/debug/poppler/poppler-23.05.0/qt5/src/poppler-form.cc:1021
#12 0x00007fd41c5bf0a5 in Poppler::FormFieldSignature::validate (this=0x55b2a8536630, opt=opt@entry=Poppler::FormFieldSignature::ValidateVerifyCertificate) at /usr/src/debug/poppler/poppler-23.05.0/qt5/src/poppler-form.cc:971
#13 0x00007fd41c9ed1e5 in PopplerFormFieldSignature::PopplerFormFieldSignature (this=<optimized out>, field=..., this=<optimized out>, field=...) at /usr/src/debug/okular/okular-23.04.1/generators/poppler/formfields.cpp:400
#14 0x00007fd41c9f2099 in PDFGenerator::getFormFields(Poppler::Page*) [clone .isra.0] (popplerPage=<optimized out>, this=<optimized out>) at /usr/src/debug/okular/okular-23.04.1/generators/poppler/generator_pdf.cpp:1915
#15 0x00007fd41c9e378d in PDFGenerator::loadPages (rotation=0, clear=false, pagesVector=..., this=0x55b2a8fa2290) at /usr/src/debug/okular/okular-23.04.1/generators/poppler/generator_pdf.cpp:830
#16 PDFGenerator::init (this=0x55b2a8fa2290, pagesVector=..., password=...) at /usr/src/debug/okular/okular-23.04.1/generators/poppler/generator_pdf.cpp:718
#17 0x00007fd42ff594d7 in Okular::DocumentPrivate::openDocumentInternal (this=0x55b2a834c9a0, offer=..., isstdin=false, docFile=..., filedata=..., password=...) at /usr/src/debug/okular/okular-23.04.1/core/document.cpp:943
#18 0x00007fd42ff65e01 in Okular::Document::openDocument (this=this@entry=0x55b2a834c920, docFile=..., url=..., _mime=..., password=...) at /usr/src/debug/okular/okular-23.04.1/core/document.cpp:2461
#19 0x00007fd4264e6df5 in Okular::Part::doOpenFile (this=this@entry=0x55b2a8386620, mimeA=..., fileNameToOpenA=..., isCompressedFile=isCompressedFile@entry=0x7fffb5abd9b7) at /usr/src/debug/okular/okular-23.04.1/part/part.cpp:1459
#20 0x00007fd4264e8692 in Okular::Part::openFile (this=<optimized out>) at /usr/src/debug/okular/okular-23.04.1/part/part.cpp:1593
#21 0x00007fd44c408bad in KParts::ReadOnlyPartPrivate::openLocalFile (this=this@entry=0x55b2a8393250) at /usr/src/debug/kparts/kparts-5.106.0/src/readonlypart.cpp:184
#22 0x00007fd44c40d610 in KParts::ReadOnlyPart::openUrl (this=this@entry=0x55b2a8386620, url=...) at /usr/src/debug/kparts/kparts-5.106.0/src/readonlypart.cpp:145
#23 0x00007fd4264e51dd in Okular::Part::openUrl (this=0x55b2a8386620, _url=..., swapInsteadOfOpening=<optimized out>) at /usr/src/debug/okular/okular-23.04.1/part/part.cpp:1819
#24 0x000055b2a6502455 in Shell::openUrl (this=<optimized out>, url=..., serializedOptions=...) at /usr/src/debug/okular/okular-23.04.1/shell/shell.cpp:416
#25 0x000055b2a6506d02 in Shell::handleDroppedUrls (this=0x55b2a80f1f10, urls=...) at /usr/src/debug/okular/okular-23.04.1/shell/shell.cpp:1044
#26 0x000055b2a64fe7fa in Shell::eventFilter (this=0x55b2a80f1f10, obj=0x55b2a8c141e0, event=<optimized out>) at /usr/src/debug/okular/okular-23.04.1/shell/shell.cpp:298
#27 0x00007fd44a88dc92 in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x55b2a8c141e0, event=event@entry=0x7fffb5abe130) at kernel/qcoreapplication.cpp:1190
#28 0x00007fd44b578b4c in QApplicationPrivate::notify_helper (this=this@entry=0x55b2a7f520e0, receiver=receiver@entry=0x55b2a8c141e0, e=e@entry=0x7fffb5abe130) at kernel/qapplication.cpp:3634
#29 0x00007fd44b57f056 in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffb5abe130) at kernel/qapplication.cpp:3386
#30 0x00007fd44a88e028 in QCoreApplication::notifyInternal2 (receiver=0x55b2a8c141e0, event=0x7fffb5abe130) at kernel/qcoreapplication.cpp:1064
#31 0x00007fd44a88e077 in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at kernel/qcoreapplication.cpp:1079
#32 0x00007fd44b5cfc54 in QWidgetWindow::handleDropEvent (event=0x7fffb5abe2d0, this=0x55b2a8e982e0) at kernel/qwidgetwindow.cpp:986
#33 QWidgetWindow::event (this=0x55b2a8e982e0, event=0x7fffb5abe2d0) at kernel/qwidgetwindow.cpp:342
#34 0x00007fd44b578b5c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55b2a8e982e0, e=0x7fffb5abe2d0) at kernel/qapplication.cpp:3640
#35 0x00007fd44a88e028 in QCoreApplication::notifyInternal2 (receiver=0x55b2a8e982e0, event=0x7fffb5abe2d0) at kernel/qcoreapplication.cpp:1064
#36 0x00007fd44a88e093 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#37 0x00007fd44ad4af6f in QGuiApplicationPrivate::processDrop (w=0x55b2a8e982e0, dropData=<optimized out>, p=..., supportedActions=..., buttons=..., modifiers=...) at kernel/qguiapplication.cpp:3333
#38 0x00007fd44ad29106 in QWindowSystemInterface::handleDrop (window=0x55b2a8e982e0, dropData=dropData@entry=0x55b2a8d465e0, p=..., supportedActions=supportedActions@entry=..., buttons=..., modifiers=modifiers@entry=...) at kernel/qwindowsysteminterface.cpp:938
#39 0x00007fd448f07c0b in QtWaylandClient::QWaylandDataDevice::data_device_drop (this=0x55b2a7f976e0) at /usr/src/debug/qt5-wayland/qtwayland/src/client/qwaylanddatadevice.cpp:183
#40 0x00007fd4463f54f6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#41 0x00007fd4463f1f5e in ffi_call_int (cif=cif@entry=0x7fffb5abe590, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#42 0x00007fd4463f4b73 in ffi_call (cif=cif@entry=0x7fffb5abe590, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffb5abe660) at ../src/x86/ffi64.c:710
#43 0x00007fd44a484645 in wl_closure_invoke (closure=closure@entry=0x7fd430002cc0, target=<optimized out>, target@entry=0x55b2a7f5d1f0, opcode=opcode@entry=4, data=<optimized out>, flags=1) at ../wayland-1.22.0/src/connection.c:1025
#44 0x00007fd44a484e73 in dispatch_event (display=display@entry=0x55b2a7f58e00, queue=0x55b2a7f58ef0) at ../wayland-1.22.0/src/wayland-client.c:1631
#45 0x00007fd44a48513c in dispatch_queue (queue=0x55b2a7f58ef0, display=0x55b2a7f58e00) at ../wayland-1.22.0/src/wayland-client.c:1777
#46 wl_display_dispatch_queue_pending (display=0x55b2a7f58e00, queue=0x55b2a7f58ef0) at ../wayland-1.22.0/src/wayland-client.c:2019
#47 0x00007fd448ee3c06 in QtWaylandClient::QWaylandDisplay::flushRequests (this=<optimized out>) at /usr/src/debug/qt5-wayland/qtwayland/src/client/qwaylanddisplay.cpp:255
#48 0x00007fd44a8b1c80 in QObject::event (this=0x55b2a7f548b0, e=0x7fd438001e40) at kernel/qobject.cpp:1347
#49 0x00007fd44b578b5c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55b2a7f548b0, e=0x7fd438001e40) at kernel/qapplication.cpp:3640
#50 0x00007fd44a88e028 in QCoreApplication::notifyInternal2 (receiver=0x55b2a7f548b0, event=0x7fd438001e40) at kernel/qcoreapplication.cpp:1064
#51 0x00007fd44a88e093 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#52 0x00007fd44a88eb33 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55b2a7f49470) at kernel/qcoreapplication.cpp:1821
#53 0x00007fd44a8d4f58 in postEventSourceDispatch (s=0x55b2a7f9a670) at kernel/qeventdispatcher_glib.cpp:277
#54 0x00007fd44910f53b in g_main_dispatch (context=0x7fd440000ee0) at ../glib/glib/gmain.c:3460
#55 g_main_context_dispatch (context=0x7fd440000ee0) at ../glib/glib/gmain.c:4200
#56 0x00007fd44916c219 in g_main_context_iterate.constprop.0 (context=0x7fd440000ee0, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4276
#57 0x00007fd44910e1a2 in g_main_context_iteration (context=0x7fd440000ee0, may_block=1) at ../glib/glib/gmain.c:4343
#58 0x00007fd44a8d8d3c in QEventDispatcherGlib::processEvents (this=0x55b2a7f9b710, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#59 0x00007fd44a88668c in QEventLoop::exec (this=0x7fffb5abec40, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#60 0x00007fd44a8912f9 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#61 0x00007fd44ad3b052 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#62 0x00007fd44b576f2a in QApplication::exec () at kernel/qapplication.cpp:2832
#63 0x000055b2a64fc4ca in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/okular/okular-23.04.1/shell/main.cpp:109
[Inferior 1 (process 8917) detached]

Reported using DrKonqi
Comment 1 Sune Vuorela 2023-05-17 10:18:50 UTC
Any chance you can share the file ? in the bug report, preferred, alternatively privately.
Comment 2 ilirius 2023-05-17 10:21:55 UTC
(In reply to Sune Vuorela from comment #1)
> Any chance you can share the file ? in the bug report, preferred,
> alternatively privately.

Yes of course. Added to attached
Comment 3 ilirius 2023-05-17 10:23:23 UTC
Created attachment 159029 [details]
The file with which the application crashes
Comment 4 Sune Vuorela 2023-05-17 15:05:35 UTC
Thanks. Crash happens in poppler. Merge-request submitted. 

Neither the current NSS backend nor the upcoming GPG backend supports GOST as a hash algorithm though, so neither can validate the signature. I also don't see it mentioned in 

GOST also isn't mentioned in neither ISO 32000-2:2020, nor in the extenisons adding more hash algorithms.
Comment 5 ilirius 2023-05-18 05:48:37 UTC
(In reply to Sune Vuorela from comment #4)
> Thanks. Crash happens in poppler. Merge-request submitted. 
> 
> Neither the current NSS backend nor the upcoming GPG backend supports GOST
> as a hash algorithm though, so neither can validate the signature. I also
> don't see it mentioned in 
> 
> GOST also isn't mentioned in neither ISO 32000-2:2020, nor in the extenisons
> adding more hash algorithms.

Я пробовал открыть libreoffice, он открыл нормально но вывел сообщение "Подпись документа недействительна." Может быть стоит такое добавить и в Okular?
Comment 6 ilirius 2023-05-18 05:48:57 UTC
(In reply to ilirius from comment #5)
> (In reply to Sune Vuorela from comment #4)
> > Thanks. Crash happens in poppler. Merge-request submitted. 
> > 
> > Neither the current NSS backend nor the upcoming GPG backend supports GOST
> > as a hash algorithm though, so neither can validate the signature. I also
> > don't see it mentioned in 
> > 
> > GOST also isn't mentioned in neither ISO 32000-2:2020, nor in the extenisons
> > adding more hash algorithms.
> 
I tried to open libreoffice, it opened normally but displayed the message "The document signature is invalid." Maybe it's worth adding this to Okular?
Comment 7 Sune Vuorela 2023-05-18 18:22:17 UTC
With a fixed poppler, it is also some degree of "cannot validate signature"