CVE-2026-99474 in Linuxinfo

Summary

by MITRE • 11/19/2026

In the Linux kernel, the following vulnerability has been resolved:

HID: hiddev: keep state alive through disconnect unlock

mutex_unlock() clears the mutex owner before taking its wait lock. A thread spinning in the final hiddev file release can acquire existancelock after hiddev_disconnect() clears the owner, then free hiddev before the disconnecting thread reaches the mutex wait lock. This causes a use-after-free in the mutex slow unlock path.

Give the connection and each open file an explicit reference. Drop each reference only after its existancelock critical section has completed, so neither unlock path can free the mutex while the other is still using it.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/20/2026

The Linux kernel vulnerability identified within the hiddev subsystem represents a classic use-after-free condition arising from race conditions in synchronization primitives during device disconnection and file descriptor release operations. This flaw specifically impacts the interaction between the hiddev_disconnect function, which handles the removal of HID devices, and the final release path for open hiddev files. The core technical issue stems from the behavior of mutex_unlock() within the kernel's locking implementation. When a thread executes mutex_unlock(), it clears the owner field of the mutex before acquiring its internal wait lock to handle potential contention or slow unlock paths. This specific ordering creates a narrow but critical window where state management becomes unsafe if not handled with explicit reference counting mechanisms.

In this scenario, a user-space application holds an open file descriptor for a hiddev device and is in the process of closing it via the final release operation. Simultaneously, the physical HID device may be disconnected from the system, triggering the hiddev_disconnect routine. The disconnect thread attempts to manage resources associated with the device structure. However, because mutex_unlock() clears ownership early, another thread spinning on the existence lock can acquire that lock after the owner has been cleared but before the original unlocking thread reaches the slow path wait lock acquisition. Consequently, the releasing thread may proceed to free the hiddev data structures prematurely. When the disconnecting thread subsequently attempts to access these now-freed resources during its own mutex operations, it triggers a use-after-free condition. This can lead to kernel panics, memory corruption, or potentially arbitrary code execution if an attacker can control the contents of the freed memory region and force specific allocation patterns that overwrite critical function pointers or data structures within the kernel space.

The operational impact of this vulnerability is significant due to its potential for privilege escalation and system instability. A local unprivileged user who has access to HID devices could potentially exploit this race condition by rapidly opening and closing device interfaces while simultaneously triggering disconnection events, either through physical manipulation or automated scripts simulating such behavior. The resulting use-after-free allows the attacker to corrupt kernel memory, which is a primary vector for gaining root-level privileges on Linux systems. Furthermore, even without successful exploitation for code execution, the race condition can cause denial of service by crashing the kernel, thereby disrupting system availability and potentially affecting other running processes that depend on stable kernel operation.

To mitigate this vulnerability, the fix implements explicit reference counting to ensure data structures remain valid throughout their entire lifecycle relative to synchronization primitives. Specifically, both the connection object representing the HID device and each open file descriptor are assigned an explicit reference count. These references are dropped only after the critical section protected by the existancelock has fully completed execution. This ensures that neither the unlock path nor the disconnect logic can free the mutex or associated hiddev structures while another thread is still actively using them within its own critical sections. By decoupling the lifetime of the object from the immediate completion of lock operations and tying it instead to explicit reference management, the race condition window is eliminated.

From a standards perspective, this vulnerability maps directly to CWE-416, Use After Free, which describes situations where memory is accessed after it has been freed, leading to undefined behavior. The underlying cause involves improper synchronization in concurrent environments, aligning with CWE-362, Concurrent Execution using Shared Resource with Improper Synchronization. In terms of the MITRE ATT&CK framework for enterprise security, this type of vulnerability facilitates privilege escalation techniques such as T1068 Exploitation for Privilege Escalation or potentially T1059 Command and Scripting Interpreter if used in conjunction with other exploits to gain initial access. Security practitioners should ensure that kernel updates are applied promptly to patch these synchronization flaws. Additionally, developers working on low-level system components must adhere to strict reference counting protocols when dealing with shared resources protected by mutexes or spinlocks, ensuring that object lifetimes extend beyond the scope of individual lock acquisitions and releases to prevent premature deallocation in multi-threaded contexts.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00174

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!