HID: mcp-2221: prevent UAF in delayed work
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
HID: mcp-2221: prevent UAF in delayed work
If the device is plugged/unplugged without giving time for mcp_init_work() to complete, we might kick in the devm free code path and thus have unavailable struct mcp_2221 while in delayed work.
Canceling the delayed_work item is enough to solve the issue, because cancel_delayed_work_sync will prevent the work item to requeue itself.
From the CVE record · Linux
The Linux kernel's HID mcp-2221 driver can use a freed device structure in delayed work if a device is plugged in and unplugged before initialization work completes. Triggering this condition requires device plug/unplug interaction; the input does not specify an authentication requirement or a further impact.
Engineers running the Linux kernel with the HID mcp-2221 driver should check their systems; affected versions are not specified.