CVE-2026-47271: pam_usb: OOM guards removed by -DNDEBUG cause NULL dereference and authentication process crash
Vulnerability summary
CVE-2026-47271 is a medium (CVSS 5.1) NULL Pointer Dereference vulnerability in mcdope pam_usb. EPSS estimates a 0.16% chance of exploitation in the next 30 days, higher than 4.5% of scored vulnerabilities.
Timeline
- 27-05-2026PublishedVulnerability first disclosed.
- 28-05-2026Last modifiedVulnerability information updated.
Description
pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.0, src/mem.c implemented out-of-memory guards for xmalloc(), xrealloc(), and xstrdup() using assert(data != NULL). The C standard specifies that all assert() expressions are compiled out when NDEBUG is defined at build time. NDEBUG is commonly defined in release and packaging builds (Debian, Fedora, Arch package flags all define it via -DNDEBUG in CFLAGS). With the guard removed, xmalloc/xrealloc/xstrdup silently return NULL on allocation failure. Every caller in the codebase dereferences the return value without a NULL check -- this is the intended design, as the guard was supposed to abort before the dereference. With the guard gone, any allocation failure causes a NULL pointer dereference, crashing the PAM module. A crash in a PAM module loaded by sudo or login causes authentication to fail for the duration of the crash, creating a local denial-of-service condition. An attacker who can induce memory pressure at authentication time can lock all users out of sudo and login. This vulnerability is fixed in 0.9.0.
CVSS metrics
2 scores · 2 sources · 1 version- NVDNIST5.1MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.16%
Chance of exploitation in the next 30 days
Percentile
5%
Versus all other CVEs
30-day change
Increase +0.04 pp
From 0.12% on 22-09-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Mcdope1 product
- pam_usb< 0.9.0
1 vendor · 1 product
References
2 links- github.com/mcdope/pam_usb/security/advisories/GHSA-7rvx-jcc6-7hqqX Refsource CONFIRM