HIGH Introduced in 3.15
usb_gadget ffs UAF
CVE-2026-90045
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.9MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: USB: gadget: ffs: fix mm lifetime handling io_data stores a pointer to the submitting task's mm_struct, but does not currently hold a reference to it while async requests are pending. This can result in a use-after-free if the task exits before completion handling finishes. Take a reference with mmgrab() when queuing the read request and release it with mmdrop() on request completion.
02KernelScan AI Analysis
Risk summary
A local user with access to a USB gadget functionfs endpoint can trigger a use-after-free of the mm_struct if the submitting task exits while an async read or write request is still pending. This can lead to kernel memory corruption, potentially allowing privilege escalation or denial of service. The vulnerability requires the USB gadget functionfs subsystem to be configured and accessible.
Vulnerability analysis
The USB gadget FunctionFS subsystem stores a pointer to the submitting task's address space for asynchronous I/O requests but does not hold a reference to it. If the submitting task exits before the async completion handler runs, the address space object may be freed while the kernel still holds the dangling pointer, resulting in a use-after-free when the completion worker attempts to copy data into the now-freed memory. The fix takes a reference on the address space when queuing an async request and releases it once the completion worker finishes, and additionally checks that the address space is still alive before using it. This vulnerability is reachable from a local process that has access to a FunctionFS endpoint file descriptor; it requires the USB gadget framework and FunctionFS to be configured on the device.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.1 | 3.15 | 6.1.191 | 68895e50c225 |
| 6.12 | 3.15 | 6.12.111 | 1625827648f4 |
| 6.18 | 3.15 | 6.18.51 | f3d31484b3f2 |
| 6.6 | 3.15 | 6.6.160 | aee2fde0f39e |
| 7.2 | 3.15 | 7.2.5 | 7411de0ce3b4 |
| mainline | 3.15 | 7.3 | 5eb5c72c72fe |
| cip/6.12 | 3.15 | 6.12.111-cip32 | 1625827648f4 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip137) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip137-rt51) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip116) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |