pam_usb: NULL Dereference Crash in pusb_is_loginctl_local when loginctl Returns Empty Remote Field
Published Jun 18, 2026
5.5
MEDIUMCVSS 3.1
EPSS 0.16%
Description
pam_usb provides hardware authentication for Linux using ordinary removable media. In versions 0.9.1 and below, pusb_is_loginctl_local() can cause a NULL dereference crash when parsing loginctl output. The function calls popen() and reads the result; if the Remote field is only a newline, fgets() succeeds but strtok_r(buf, "\n", &saveptr) returns NULL. A subsequent strcmp(is_remote, "no") then dereferences NULL, causing undefined behavior (typically SIGSEGV) and crashing the PAM module. This can crash the authenticating process (e.g., sudo, login) and, depending on PAM stack configuration, deny access for all users of the affected service. This issue has been fixed in version 0.9.2.
Affected products
-
Affected
- < 0.9.2
No data.
No data.
No Red Hat product state for this CVE.
No package ranges for this CVE.
Remediation
No remediation recorded yet.
References (3)
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-37924 Advisory
- https://github.com/mcdope/pam_usb/releases/tag/0.9.2 x_refsource_MISC
- https://github.com/mcdope/pam_usb/security/advisories/GHSA-7j6h-wfc2-mg5q x_refsource_CONFIRM
| Link | Providers | Tags |
|---|---|---|
| https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-37924 | Advisory | |
| https://github.com/mcdope/pam_usb/releases/tag/0.9.2 | x_refsource_MISC | |
| https://github.com/mcdope/pam_usb/security/advisories/GHSA-7j6h-wfc2-mg5q | x_refsource_CONFIRM |
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
Red Hat
No data
GitHub
No data