USB: gadget: ffs: fix mm lifetime handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2e4c7553cd6f9c68bb741582dcb614edcbeca70f · < 5eb5c72c72fef76cb765ef1669b62b6a3ba1bfc8| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's USB gadget FunctionFS code does not retain a reference to a task's memory structure while an asynchronous read request is pending. A use-after-free can occur if the submitting task exits before completion handling finishes. The input does not establish an attack path or authentication requirements.
Engineers running the Linux kernel should check whether their version includes the USB gadget FunctionFS fix; affected versions were not specified.