CVE-2026-99329: HID: mcp2221: always initialize and cancel init_work
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
HID: mcp2221: always initialize and cancel init_work
The writable gpio_mode_enforce parameter can change between probe and remove.
If it changes from false to true after probe, remove skips cancellation of init_work. Pending or running work can then access devm-managed driver state after teardown. Changing it from true to false can make remove cancel an uninitialized delayed work item.
Initialize init_work whenever IIO is reachable and cancel it unconditionally on remove. Keep the parameter check only for scheduling the initialization.
The false-to-true cancellation gap was previously reported by Sashiko. We also encountered this issue during our static-analysis research.
The Linux kernel CVE team has assigned CVE-2026-99329 to this issue.
Affected and fixed versions
===========================
Issue introduced in 7.1 with commit 200e6c6e94fa786e36e4fe33eebf16b822181b99 and fixed in 7.3.2 with commit 19711bd64d60378137353ac3e6b774bd3a660f89 Issue introduced in 7.1 with commit 200e6c6e94fa786e36e4fe33eebf16b822181b99 and fixed in 7.4-rc1 with commit 6a006ff898b459e0bd10375d7fbe0ea7f7a132b9
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99329
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/hid/hid-mcp2221.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/19711bd64d60378137353ac3e6b774bd3a660f89 https://git.kernel.org/stable/c/6a006ff898b459e0bd10375d7fbe0ea7f7a132b9