KernelScan.io

HIGH Introduced in 3.15

usb_gadget ffs UAF

CVE-2026-90045

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI6.9MEDIUM

01

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.

02

Engine v0.6.0

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.

Affecteddrivers/usb/gadget/function/f_fs.c (USB gadget function filesystem)

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.

03

BranchIntroducedFixed inPatch commit
6.13.156.1.19168895e50c225
6.123.156.12.1111625827648f4
6.183.156.18.51f3d31484b3f2
6.63.156.6.160aee2fde0f39e
7.23.157.2.57411de0ce3b4
mainline3.157.35eb5c72c72fe
cip/6.123.156.12.111-cip321625827648f4

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)