CVE-2026-47270: pam_usb: strtok() race condition in multi-threaded PAM hosts can corrupt deny_remote result
pamusb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.0, pamusb is a PAM module loaded into the host process (sudo, login, GDM, GNOME Shell). Display managers such as GDM run multiple concurrent authentication threads. Three functions used by the denyremote feature called the non-reentrant strtok(), which stores state in a single global pointer. If two authentications race, one thread's strtok() call can overwrite the other's in-progress tokenisation pointer, causing incorrect parsing of the tmux session data or the /proc environ scan that backs the remote-session detection logic. Additionally, pusbtmuxgetclienttty() passed the raw pointer returned by getenv(TMUX) directly to strtok(). getenv() returns a pointer into the live process environment block; strtok() inserts NUL bytes into that block, permanently corrupting the TMUX variable for subsequent code running in the same process. In long-lived display managers this affects all future authentications in that process. The combined effect can cause denyremote=true to return an incorrect decision for a remote session, or an incorrect decision for a local session, depending on thread interleaving. This vulnerability is fixed in 0.9.0.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-47270?
CVE-2026-47270 has a medium severity score of 6.3.
How can I fix CVE-2026-47270?
To fix CVE-2026-47270, update to pam_usb version 0.9.0 or later, which addresses the vulnerability.
What is the impact of CVE-2026-47270 on users?
CVE-2026-47270 can lead to a race condition that may corrupt the authentication result in multi-threaded PAM environments.
What systems are affected by CVE-2026-47270?
CVE-2026-47270 affects Linux systems using the pam_usb PAM module for hardware authentication prior to version 0.9.0.
What type of vulnerability is CVE-2026-47270?
CVE-2026-47270 is classified as a race condition vulnerability.