Skip to contentSkip to conversation

CVE-2023-53459: HID: mcp-2221: prevent UAF in delayed work

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 1, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2023-53459 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.2 with commit 960f9df7c620ecb6030aff1d9a6c3d67598b8290 and fixed in 6.2.1 with commit 5dc297652dbc557eba7ca7d6a4c5f1940dffffb1
	Issue introduced in 6.2 with commit 960f9df7c620ecb6030aff1d9a6c3d67598b8290 and fixed in 6.3 with commit 47e91fdfa511139f2549687edb0d8649b123227b

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-2023-53459

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/5dc297652dbc557eba7ca7d6a4c5f1940dffffb1
	https://git.kernel.org/stable/c/47e91fdfa511139f2549687edb0d8649b123227b