Linux Kernel
CVE-2024-38628
HIGH
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Race condition requires precise timing to win (AC:H); local low-privilege access needed to trigger gadget unbind; full memory impact if race is won.
Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).
CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Lifecycle Timeline
6DescriptionCVE.org
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.
Hang on to the control IDs instead of pointers since those are correctly handled with locks.
AnalysisAI
Use-after-free via race condition in the Linux kernel's USB gadget audio driver (u_audio) allows a local low-privileged user to corrupt kernel memory during gadget unbind operations. The flaw exists because audio control pointers were accessed concurrently without adequate locking after the underlying memory was freed during device unbind, a classic CWE-362 time-of-check/time-of-use pattern. EPSS is low (0.17%, 7th percentile) and CISA KEV does not list this CVE, but the CVSS C:H/I:H/A:H rating reflects potential for local privilege escalation via memory corruption.
Technical ContextAI
The affected component is the u_audio USB gadget driver within the Linux kernel (cpe:2.3:o:linux:linux_kernel). USB gadget drivers implement device-side USB functionality, and u_audio enables a Linux system to present itself as a USB audio device. ALSA mixer controls are registered at gadget bind time; during unbind, the driver frees associated memory. The race occurs when another kernel thread accesses control pointers after free but before the gadget is fully unbound - a CWE-362 (Concurrent Execution Using Shared Resource with Improper Synchronization) root cause. The upstream fix substitutes control IDs (safe integer handles) for raw pointers, and enforces access through properly-locked paths, eliminating the dangling-pointer window.
RemediationAI
Update to a Linux kernel version that includes one of the four upstream stable patches: https://git.kernel.org/stable/c/1b739388aa3f8dfb63a9fca777e6dfa6912d0464, https://git.kernel.org/stable/c/453d3fa9266e53f85377b911c19b9a4563fa88c0, https://git.kernel.org/stable/c/89e66809684485590ea0b32c3178e42cba36ac09, or https://git.kernel.org/stable/c/bea73b58ab67fe581037ad9cdb93c2557590c068. Distribution maintainers (Debian, Ubuntu, RHEL, SUSE, etc.) should be consulted for stable-release kernel updates incorporating these commits. As a compensating control where patching is not immediately possible, disabling the USB gadget audio subsystem via kernel module blacklisting (blacklist u_audio in /etc/modprobe.d/) eliminates the vulnerable code path with the trade-off of losing USB audio gadget functionality. Restricting unprivileged access to gadget configuration (e.g., via configfs permissions) reduces the exposure surface but does not eliminate the race for privileged users.
Same weakness CWE-362 – Race Condition
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today