CVE-2026-89622
nicheUse-after-free write in Linux kernel MCP2221 HID/I2C driver
The Linux kernel's hid-mcp2221 driver, which supports Microchip MCP2221 USB-to-I2C/UART/GPIO bridge chips, leaves a dangling buffer pointer (mcp->rxbuf) behind after an I2C/SMBus read completes or times out. If the caller frees or reuses that buffer, a delayed or spurious MCP2221_I2C_GET_DATA USB HID report drives mcp2221_raw_event() to memcpy device data into the freed memory, producing a write use-after-free in kernel space. Exploitation requires local access or an attacker-controlled/spoofed USB device (CVSS 3.1: 7.8, local vector, low privileges), and successful corruption of kernel memory could affect confidentiality, integrity, and availability up to privilege escalation or a crash. Only systems running kernels built with the MCP2221 driver (CONFIG_HID_MCP2221) and using the hardware are exposed. No public proof of concept or in-the-wild exploitation is known, and the flaw is not in the CISA KEV catalog.
What to do: Apply your distribution's kernel update once it includes the fix that clears mcp->rxbuf and mcp->rxbuf_size on every return path. Check exposure with 'lsmod | grep mcp2221' or by inspecting your kernel config for CONFIG_HID_MCP2221; systems without the driver or device are not affected. On systems where the adapter is used, restrict untrusted local accounts and unattended physical USB access, since a malicious USB device or local user is the realistic trigger.
| Linux kernel (drivers/hid/hid-mcp2221.c, HID MCP2221 driver) | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: HID: mcp2221: clear rxbuf after I2C/SMBus transfer completes mcp_i2c_smbus_read() stores the caller-supplied buffer pointer in mcp->rxbuf for the duration of a transfer but never clears it when the transfer finishes or times out. Once the caller frees or reuses the buffer, mcp->rxbuf becomes a dangling pointer. A delayed or spurious MCP2221_I2C_GET_DATA report can then drive mcp2221_raw_event() to memcpy device data into the freed memory, causing a write use-after-free. Route all return paths through a single exit point that clears mcp->rxbuf and mcp->rxbuf_size, so that the existing !mcp->rxbuf guard in the raw_event handler can reject any report arriving after the transfer has ended.
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.