Leuca / CIE-Middleware-RPM-Package

CIE Middleware RPM package source
0 stars 0 forks source link

Crash when signing a document with PADES #1

Open Leuca opened 5 days ago

Leuca commented 5 days ago

Caused by using the version of PoDoFo shipped by Fedora/RHEL. A patch allows the code to link against a shared version of the library but it is not enough to support PADES.

Leuca commented 4 days ago

The culprit seems to be PoDoFo::PdfPagesTree::GetTotalNumberOfPages()

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f205099edb4, pid=620852, tid=620940
#
# JRE version: OpenJDK Runtime Environment (Red_Hat-11.0.24.0.8-2) (11.0.24+8) (build 11.0.24+8-LTS)
# Java VM: OpenJDK 64-Bit Server VM (Red_Hat-11.0.24.0.8-2) (11.0.24+8-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libcie-pkcs11.so+0x19edb4]  PoDoFo::PdfPagesTree::GetTotalNumberOfPages() const+0x4
Leuca commented 14 hours ago

After some changes that should improve the broken part of library there is a new problematic frame:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f7e2d39a5e3, pid=1595317, tid=1595814
#
# JRE version: OpenJDK Runtime Environment (Red_Hat-11.0.24.0.8-2) (11.0.24+8) (build 11.0.24+8-LTS)
# Java VM: OpenJDK 64-Bit Server VM (Red_Hat-11.0.24.0.8-2) (11.0.24+8-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libcie-pkcs11.so+0x19a5e3]  PoDoFo::PdfImage::LoadFromPngHandle(PoDoFo::PdfFileInputStream*)+0x2d3

Note: This crash happens when signing with graphical signature

Leuca commented 14 hours ago

Also this warning could be interesting. Happens both with and without graphical signature.

WARNING: There are more objects (216) in this XRef table than specified in the size key of the trailer directory (200)!
<</ID[<90D904BA435840C0B691035C31575EE3><4C8BCBA130474F1AB7F016C0D03DB451>]/Info 199 0 R/Root 201 0 R/Size 200>>
PDFLENGTH9300166STOPGetNumberOfSignaturestrailer okCatalogref okcatalog okacroform ok 1acroform ok 2acroform ok 3fieldsValue okfieldsValue ok 2fieldsValue is arrayOK nSigns: 0OK m_pPdfDocument