HID: mcp2221: stop device IO before hid_hw_stop
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| 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: mcp2221: stop device IO before hid_hw_stop
Quiesce device IO at the start of the devm cleanup callback mcp2221_hid_unregister() so that incoming HID reports cannot race with hardware teardown during probe failure or device removal, addressing a potential use-after-free.
Guard the call to hid_device_io_stop() with io_started. On normal removal hid_device_remove() has already cleared io_started before the devres group is released, so an unconditional call would otherwise hit the !io_started path and emit a spurious "io already stopped" warning on every removal. The guard preserves the probe-failure balancing, where io_started is still set after hid_device_io_start(), while staying silent on the normal removal path.
From the CVE record · Linux
The Linux kernel's HID mcp2221 driver could allow incoming HID reports to race with hardware teardown during probe failure or device removal, causing a potential use-after-free. The input does not establish an attacker-controlled path, authentication requirement, or user interaction requirement.
Engineers running Linux kernels with the HID mcp2221 driver should check their kernel version; affected versions are not specified.