CVE-2026-98769 in Linuxinfo

Summary

by MITRE • 10/18/2026

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

usb: gadget: f_uac1_legacy: validate bRequest index in generic_{set,get}_cmd

generic_set_cmd() and generic_get_cmd() use the low nibble of ctrl->bRequest as an index into con->data[]:

u8 cmd = (ctrl->bRequest & 0x0F); /* 0 .. 15 */ ... con->data[cmd] = value; /* OOB when cmd >= 5 */

struct usb_audio_control (include/linux/usb/audio.h) declares data as a 5-element array, so indices 5 through 15 write (or read) up to 44 bytes past the end of the array on the heap.

A malicious USB host can craft a class-specific SET_CUR / GET_CUR request with an arbitrary bRequest value, triggering the out-of-bounds access from an IRQ completion handler with no further preconditions.

Add an ARRAY_SIZE() guard to both functions.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 10/19/2026

The Linux kernel vulnerability identified in the usb gadget function f_uac1_legacy involves a critical out-of-bounds memory access within the generic set and get command handling routines. This flaw stems from insufficient validation of input data received via USB control transfers, specifically when processing class-specific SET_CUR or GET_CUR requests for audio devices. The core issue lies in how the bRequest field is processed to determine which element of a fixed-size array should be accessed. In the functions generic_set_cmd and generic_get cmd, the code extracts the lower nibble of the ctrl->bRequest value using a bitwise AND operation with 0x0F. This results in an index ranging from zero to fifteen being used directly as an offset into con->data without any bounds checking against the actual size of that array.

The data structure involved is struct usb_audio_control, which defines its data member as a fixed-size array containing only five elements. Consequently, when the extracted command value exceeds four, the code attempts to read from or write to memory locations beyond the allocated boundary of this heap-allocated buffer. Specifically, indices five through fifteen result in accesses up to forty-four bytes past the end of the valid array region. This type of error is a classic example of CWE-125 Out-of-bounds Read and CWE-787 Out-of-bounds Write depending on whether it is a GET or SET operation respectively. The lack of validation allows an attacker to manipulate memory contents arbitrarily, potentially leading to information disclosure if the vulnerability manifests as a read overflow, or code execution if it results in a write overflow that overwrites adjacent heap metadata or function pointers.

The operational impact of this vulnerability is severe due to its trigger mechanism and privilege level. A malicious USB host can exploit this flaw by crafting specific class-specific control requests with arbitrary bRequest values. The exploitation does not require any special preconditions beyond the ability to connect a rogue device to the target system via USB. Once such a request is received, the kernel processes it within an IRQ completion handler context. This means the out-of-bounds access occurs in interrupt context, which can lead to immediate system instability or crash if memory corruption affects critical structures managed by the scheduler or other subsystems. Furthermore, because this happens during device enumeration or operation, it poses a significant risk for physical attack vectors where an adversary plugs in a malicious USB peripheral designed specifically to trigger these malformed requests and gain unauthorized access or disrupt service on the host machine.

Mitigation strategies primarily involve applying the upstream kernel patch that introduces proper bounds checking into both generic_set_cmd and generic_get cmd functions. The fix utilizes ARRAY_SIZE() macro to ensure that any command index derived from bRequest is strictly validated against the actual number of elements in con->data before access occurs. If the value exceeds the array limits, the request should be rejected with an appropriate USB error code rather than proceeding with memory operations. System administrators and developers must ensure their Linux kernels are updated to versions containing this fix. Additionally, organizations relying on USB gadget functionality for audio devices should review their device configurations and consider implementing strict filtering at the host side if possible, although kernel-level patching remains the definitive solution. Regular security audits of driver code focusing on input validation from external interfaces can help prevent similar vulnerabilities in other subsystems that handle raw protocol data without adequate sanitization.

Responsible

Linux

Reservation

09/25/2026

Disclosure

10/18/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you need the next level of professionalism?

Upgrade your account now!