I appreciate you reporting this crash and providing the detailed
backtrace — it made it straightforward to identify and fix the issue.

The root cause has been pinpointed: a missing NULL pointer check in the
OpenSC library's context cleanup path that triggers when FIPS provider
initialization fails. A patch has been prepared and published for
testing.

To verify the fix on your system, please do the following:

sudo add-apt-repository ppa:amorris953/opensc-fix2147395
sudo apt update
sudo apt install opensc opensc-pkcs11

Then re-run the same application that was crashing (e.g., Chromium or
any app that loads PKCS#11 modules via p11-kit in a FIPS-enabled
environment) and let me know:

1. Does the SIGSEGV no longer occur?
2. Do smart card / PKCS#11 operations work as expected afterward?
3. Any unexpected behaviour or regressions you notice?

If everything works, I'll proceed with submitting this fix to Ubuntu's
noble-updates archive for wider distribution. If there are any issues,
please share the details and I'll address them right away.

Thank you again for your help in tracking this down.

** Changed in: opensc (Ubuntu)
       Status: New => Triaged

** Changed in: opensc (Ubuntu)
   Importance: Undecided => High

** Changed in: opensc (Ubuntu)
    Milestone: None => noble-updates

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2147395

Title:
  opensc-pkcs11 (0.25.0~rc1-1ubuntu0.2) SIGSEGV in sc_release_context
  during PKCS#11 C_Initialize via p11-kit/NSS (Ubuntu 24.04)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/opensc/+bug/2147395/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to