CVE-2024-26933 USB: core: Fix deadlock in port "disable" sysfs attribute
A race condition in the Linux kernel USB core can cause a deadlock when accessing port disable attributes, leading to denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-26933?
CVE-2024-26933 is a high-severity vulnerability in Linux kernel, published on 1 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
USB: core: Fix deadlock in port "disable" sysfs attribute
The show and store callback routines for the "disable" sysfs attribute file in port.c acquire the device lock for the port's parent hub device. This can cause problems if another process has locked the hub to remove it or change its configuration:
Removing the hub or changing its configuration requires the hub interface to be removed, which requires the port device to be removed, and device_del() waits until all outstanding sysfs attribute callbacks for the ports have returned. The lock can't be released until then.
But the disable_show() or disable_store() routine can't return until after it has acquired the lock.
The resulting deadlock can be avoided by calling sysfs_break_active_protection(). This will cause the sysfs core not to wait for the attribute's callback routine to return, allowing the removal to proceed. The disadvantage is that after making this call, there is no guarantee that the hub structure won't be deallocated at any moment. To prevent this, we have to acquire a reference to it first by calling hub_get().
Weakness: CWE-667
Which versions are affected by CVE-2024-26933?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-26933?
Apply the vendor's patch.
Is CVE-2024-26933 being exploited?
There is no known exploitation of CVE-2024-26933 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-42249, BELL-CVE-2024-26933, DEBIAN-CVE-2024-26933, GHSA-4gjr-xffj-592q, UBUNTU-CVE-2024-26933.