MEDIUM 4.7

CVE-2026-48986: pam_usb Infinite Loop DoS in Process Parent ID Lookup

pam_usb is a Linux authentication module that lets users log in using USB devices as hardware tokens. A bug in version 0.9.1 and earlier can cause the authentication process to hang indefinitely if a parent process terminates during login. When this happens, the sudo, sshd, or login process becomes unresponsive and must be manually killed. This is a denial-of-service vulnerability that affects systems using pam_usb for authentication. The issue stems from improper error handling in the code that walks up the process tree to verify the authenticating process. Upgrading to version 0.9.2 or later resolves the problem.

Source data · NVD / CISA · public domain

CVSS
3.1 · 4.7 MEDIUM · CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-835
Affected products
0 configuration(s)
Published / Modified
2026-06-18 / 2026-06-22

NVD description (verbatim)

pam_usb provides hardware authentication for Linux using removable media. In pam_usb 0.9.1 and earlier, usb_get_process_parent_id() can cause an infinite loop DoS because it does not initialize *ppid on failure. In pusb_local_login(), the same variable is reused as input and output in a process-tree while loop; if /proc/<pid>/stat cannot be read (for example, when an ancestor process exits during authentication), the PID is not updated and the loop does not terminate. This hangs the authenticating process (such as sudo, sshd, or login) until it is forcibly terminated. This issue has been fixed in version 0.9.2.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in the usb_get_process_parent_id() function, which retrieves parent process IDs by reading /proc/<pid>/stat. The function fails to initialize the output parameter (*ppid) when the stat file cannot be read—for example, if a parent process exits during authentication. In pusb_local_login(), this same variable is reused in a while loop that traverses the process tree. When initialization fails and the PID is not updated, the loop condition never becomes false, causing an infinite loop. The vulnerability is classified as CWE-835 (Loop with Unreachable Exit Condition). Exploitation requires local access and the ability to trigger process termination during active authentication, which can occur naturally in multi-process authentication flows or intentionally by an unprivileged user.

Business impact

Organizations relying on pam_usb for two-factor authentication face potential service disruption. A successful attack hangs critical authentication processes (login, sudo, sshd), preventing legitimate users from accessing systems until the hung processes are manually killed or the system is rebooted. In environments where pam_usb is deployed as a mandatory authentication layer—such as secure workstations or servers requiring hardware token verification—this DoS can effectively lock users out of their systems. The attack requires no elevated privileges and can be triggered by any local user with the ability to interact with the authentication system, making it a significant availability risk in multi-user or shared computing environments.

Affected systems

pam_usb version 0.9.1 and earlier are affected. Any Linux system using pam_usb as part of its authentication configuration (typically PAM stack configuration in /etc/pam.d/) is vulnerable. The vulnerability manifests during login, sudo execution, or any other PAM-authenticated operation. Systems using pam_usb exclusively for specific roles (e.g., restricting authentication to certain user accounts or SSH sessions) have a narrower attack surface but remain vulnerable to denial of service within that scope.

Exploitability

Exploitability is practical but requires specific conditions. An attacker must have local access to the target system and must trigger or coincide with a process termination during active pam_usb authentication. This can happen naturally when a parent process exits unexpectedly, or an attacker can intentionally terminate a parent process if they have sufficient permissions. The attack does not require special privileges—an unprivileged user can potentially cause the condition to occur. However, reliably triggering the infinite loop requires understanding the authentication flow and timing, which moderately elevates the skill level needed. Once triggered, the impact is immediate: the authenticating process hangs.

Remediation

Upgrade pam_usb to version 0.9.2 or later. This version includes a fix that properly initializes the ppid variable on error, ensuring the while loop can terminate even if parent processes exit during traversal. Administrators should apply this patch across all systems using pam_usb, prioritizing systems where pam_usb is a mandatory part of the authentication stack or where service availability is critical. Until patched, mitigations include restricting local access to the system and monitoring process behavior during authentication operations, though these do not eliminate the underlying vulnerability.

Patch guidance

Version 0.9.2 addresses this vulnerability by ensuring the output parameter is properly initialized when usb_get_process_parent_id() fails, allowing the process-tree traversal loop to exit cleanly. Verify the patched version against the official pam_usb release notes and repository (typically available on GitHub or the project's official distribution channels). Test the patch in a non-production environment first, particularly in authentication-critical systems, to ensure PAM stack functionality remains intact. After upgrading, verify that normal login and sudo authentication workflows operate without delay or hanging.

Detection guidance

Monitor system logs for hung processes during authentication attempts, particularly those involving pam_usb. Look for authentication timeout events or forcibly-terminated login/sudo/sshd processes that align with authentication failures. In environments where pam_usb is active, correlate process exits with subsequent authentication hangs. On systems with pam_usb installed, check /var/log/auth.log or equivalent for repeated authentication timeouts or unusual process terminations. Additionally, check the installed pam_usb version using package managers (e.g., dpkg -l pam-usb on Debian/Ubuntu systems) to identify vulnerable installations. Real-time process monitoring tools may help detect and alert on infinite loops or long-running pam processes.

Why prioritize this

Although assigned a MEDIUM CVSS score (4.7), this vulnerability deserves prompt attention because (1) it causes direct service disruption to authentication systems, which are security-critical, (2) exploitation requires only local access and no special privileges, making it accessible to any system user, (3) the impact is immediate and fully relieves the availability of affected services, and (4) the fix is straightforward and available. Organizations using pam_usb should prioritize patching, especially if pam_usb is enforced as a mandatory authentication requirement. However, the requirement for local access and specific timing conditions prevents this from being rated CRITICAL.

Risk score, explained

The CVSS 3.1 score of 4.7 MEDIUM reflects: Attack Vector Local (requires system access), Attack Complexity High (requires process termination timing or natural coincidence), Privileges Required Low (an unprivileged user can trigger it), User Interaction Not Required, Scope Unchanged, and impact limited to Availability (High). The scoring correctly penalizes the attack vector (local-only) and complexity (timing-dependent) while acknowledging the severity of availability impact. Organizations with strict authentication policies or critical service availability requirements may justify treating this as higher priority than the base score suggests.

Frequently asked questions

Does this vulnerability affect pam_usb on all Linux distributions?

Yes, the vulnerability exists in the pam_usb code itself, so any Linux distribution packaging pam_usb version 0.9.1 or earlier is affected. The specific distribution does not matter; only the pam_usb version matters. Check your system's installed version using your distribution's package manager.

Can this be exploited remotely?

No. The vulnerability requires local access to the system. An attacker must be able to run processes locally or observe and interact with the authentication system. Remote attackers cannot trigger this vulnerability directly, though they could potentially cause it indirectly if they compromise another local process.

What happens if pam_usb hangs during authentication?

The authenticating process (sudo, sshd, login, etc.) becomes unresponsive and must be forcibly terminated (e.g., via kill -9 from another terminal) or the system rebooted. This effectively locks the user out until the hung process is cleaned up. Automated monitoring and alerting on hung authentication processes can help detect and mitigate this quickly.

If I'm not using pam_usb, am I affected?

No. This vulnerability is specific to systems that have pam_usb installed and configured in their PAM authentication stack. If your system does not use pam_usb for authentication, this vulnerability does not apply to you.

This analysis is provided for informational purposes based on the CVE description and CVSS vector as published. No exploit code, proof-of-concept instructions, or weaponized techniques are provided. Patch version numbers and affected versions are based on the published vulnerability data; verify against vendor advisories before deploying patches. Organizations should conduct their own testing and risk assessment based on their environment and use of pam_usb. This analysis does not constitute professional security advice or a guarantee of patch effectiveness; consult official vendor guidance and conduct security testing appropriate to your infrastructure. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).