Vulnerability · Published Feb 10, 2025 · Assigned by GitHub_M
CVE-2025-24031PAM-PKCS#11 vulnerable to segmentation fault on ctrl-c/ctrl-d when asked for PIN
Medium 5.1
In plain English
A medium-severity null pointer dereference in pam_pkcs11 from OpenSC. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 4% of all known vulnerabilities).
Official description
PAM-PKCS#11 is a Linux-PAM login module that allows a X.509 certificate based user login. In versions 0.6.12 and prior, the pam_pkcs11 module segfaults when a user presses ctrl-c/ctrl-d when they are asked for a PIN. When a user enters no PIN at all, `pam_get_pwd` will never initialize the password buffer pointer and as such `cleanse` will try to dereference an uninitialized pointer. On my system this pointer happens to have the value 3 most of the time when running sudo and as such it will segfault. The most likely impact to a system affected by this issue is an availability impact due to a daemon that uses PAM crashing. As of time of publication, a patch for the issue is unavailable.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pam-pkcs11 | no fix listed | DEBIAN-CVE-2025-24031 |
| Debian:13 | pam-pkcs11 | no fix listed | DEBIAN-CVE-2025-24031 |
| Debian:14 | pam-pkcs11 | no fix listed | DEBIAN-CVE-2025-24031 |
| Ubuntu:22.04:LTS | pam-pkcs11 | no fix listed | UBUNTU-CVE-2025-24031 |
| Ubuntu:24.04:LTS | pam-pkcs11 | no fix listed | UBUNTU-CVE-2025-24031 |
| Ubuntu:25.10 | pam-pkcs11 | no fix listed | UBUNTU-CVE-2025-24031 |
| Ubuntu:26.04:LTS | pam-pkcs11 | no fix listed | UBUNTU-CVE-2025-24031 |
| Ubuntu:26.10 | pam-pkcs11 | no fix listed | UBUNTU-CVE-2025-24031 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| OpenSC | pam_pkcs11 | <= 0.6.12 |
Weakness: CWE-476 · Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:L
References
- https://github.com/OpenSC/pam_pkcs11/security/advisories/GHSA-wvr3-c9x3-9mff x_refsource_CONFIRM
- https://github.com/OpenSC/pam_pkcs11/blob/bb2e3f3a95e44fdf44b0d5a4b377db3179021380/src/pam_pkcs11/pam_pkcs11.c#L211 x_refsource_MISC
- https://github.com/OpenSC/pam_pkcs11/blob/bb2e3f3a95e44fdf44b0d5a4b377db3179021380/src/pam_pkcs11/pam_pkcs11.c#L797 x_refsource_MISC