{"id":"CVE-2026-89622","state":"PUBLISHED","title":"HID: mcp2221: clear rxbuf after I2C/SMBus transfer completes","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: mcp2221: clear rxbuf after I2C/SMBus transfer completes\n\nmcp_i2c_smbus_read() stores the caller-supplied buffer pointer in\nmcp->rxbuf for the duration of a transfer but never clears it when the\ntransfer finishes or times out. Once the caller frees or reuses the\nbuffer, mcp->rxbuf becomes a dangling pointer. A delayed or spurious\nMCP2221_I2C_GET_DATA report can then drive mcp2221_raw_event() to\nmemcpy device data into the freed memory, causing a write\nuse-after-free.\n\nRoute all return paths through a single exit point that clears\nmcp->rxbuf and mcp->rxbuf_size, so that the existing !mcp->rxbuf guard\nin the raw_event handler can reject any report arriving after the\ntransfer has ended.","publishedAt":"2026-09-11T19:45:20.090Z","updatedAt":"2026-10-30T12:32:19.551Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"198bf4a226229e36dfe254493a45c71c3ffc7e57","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"bd146a8ff107c6d77e75597decbcd1df0d7900d6","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"d6c6b293173c0ea87189501cbd77e8fa677814a1","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"03c34309eb1bce1b3b5f7c4a94b703f419120383","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"968546b676d992dd1da3e057d40598231f725996","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"db2333f88729c8aae062cb171ed058725ff5c901","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-mcp2221.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.111","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.51","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.4","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-mcp2221.c"]}],"references":["https://git.kernel.org/stable/c/198bf4a226229e36dfe254493a45c71c3ffc7e57","https://git.kernel.org/stable/c/bd146a8ff107c6d77e75597decbcd1df0d7900d6","https://git.kernel.org/stable/c/d6c6b293173c0ea87189501cbd77e8fa677814a1","https://git.kernel.org/stable/c/03c34309eb1bce1b3b5f7c4a94b703f419120383","https://git.kernel.org/stable/c/968546b676d992dd1da3e057d40598231f725996","https://git.kernel.org/stable/c/db2333f88729c8aae062cb171ed058725ff5c901"],"weaknesses":[],"ingestedAt":"2026-10-30T12:50:04.827Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/89xxx/CVE-2026-89622.json","commit":"1f312381e38164a43607eebab851b151dd16861e","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-89622","state":"PUBLISHED","datePublished":"2026-09-11T19:45:20.090Z","dateUpdated":"2026-10-30T12:32:19.551Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-11T19:38:34.737Z"},"containers":{"cna":{"title":"HID: mcp2221: clear rxbuf after I2C/SMBus transfer completes","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: mcp2221: clear rxbuf after I2C/SMBus transfer completes\n\nmcp_i2c_smbus_read() stores the caller-supplied buffer pointer in\nmcp->rxbuf for the duration of a transfer but never clears it when the\ntransfer finishes or times out. Once the caller frees or reuses the\nbuffer, mcp->rxbuf becomes a dangling pointer. A delayed or spurious\nMCP2221_I2C_GET_DATA report can then drive mcp2221_raw_event() to\nmemcpy device data into the freed memory, causing a write\nuse-after-free.\n\nRoute all return paths through a single exit point that clears\nmcp->rxbuf and mcp->rxbuf_size, so that the existing !mcp->rxbuf guard\nin the raw_event handler can reject any report arriving after the\ntransfer has ended."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"198bf4a226229e36dfe254493a45c71c3ffc7e57","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"bd146a8ff107c6d77e75597decbcd1df0d7900d6","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"d6c6b293173c0ea87189501cbd77e8fa677814a1","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"03c34309eb1bce1b3b5f7c4a94b703f419120383","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"968546b676d992dd1da3e057d40598231f725996","versionType":"git"},{"version":"67a95c21463d066060b0f66d65a75d45bb386ffb","status":"affected","lessThan":"db2333f88729c8aae062cb171ed058725ff5c901","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-mcp2221.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.111","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.51","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.4","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-mcp2221.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/198bf4a226229e36dfe254493a45c71c3ffc7e57"},{"url":"https://git.kernel.org/stable/c/bd146a8ff107c6d77e75597decbcd1df0d7900d6"},{"url":"https://git.kernel.org/stable/c/d6c6b293173c0ea87189501cbd77e8fa677814a1"},{"url":"https://git.kernel.org/stable/c/03c34309eb1bce1b3b5f7c4a94b703f419120383"},{"url":"https://git.kernel.org/stable/c/968546b676d992dd1da3e057d40598231f725996"},{"url":"https://git.kernel.org/stable/c/db2333f88729c8aae062cb171ed058725ff5c901"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - A local attacker can bind hid-mcp2221 by forging BUS_USB 04d8:00dd via UHID_CREATE2 on /dev/uhid (no hid_is_usb() guard), then issue I2C_RDWR/I2C_SMBUS reads on the resulting /dev/i2c-N so mcp_i2c_smbus_read() leaves mcp->rxbuf dangling; a malicious USB MCP2221 is only a lower-severity physical path.\nAC:L - The attacker controls both sides: they start the I2C/SMBus read that stores the bounce buffer in mcp->rxbuf, let mcp_i2c_smbus_read() return without clearing it (timeout or completed xfer), then inject a delayed MCP2221_I2C_GET_DATA report via UHID_INPUT so mcp2221_raw_event() memcpy's into the already-freed buffer.\nPR:L - Neither uhid_dev_create2() nor i2cdev_open() checks capabilities; access is DAC on /dev/uhid and /dev/i2c-*, which udev uaccess-tags for the seat user and which are commonly 0660 root:i2c on embedded/industrial MCP2221 systems, i.e. low privilege rather than real init-namespace root.\nUI:N - The attacker creates the uhid device, issues the I2C/SMBus read ioctl, and injects the delayed HID input report from their own process; no separate victim action is required.\nS:U - The write use-after-free corrupts host-kernel heap or returned SMBus stack under the kernel's own authority and is ordinary local privilege-escalation/DoS, with no VM escape, IOMMU bypass, or other cross-authority impact.\nC:H - mcp2221_raw_event() memcpy's attacker-controlled HID payload into a freed I2C bounce buffer (up to 60 bytes per report, repeatable up to the attacker-chosen rxbuf_size of 8192 via I2C_RDWR); a write UAF of a sprayed slab object yields an arbitrary kernel read primitive.\nI:H - The same memcpy is a write use-after-free of attacker-controlled bytes into freed kernel memory; with heap spraying this is an arbitrary-write and control-flow hijack primitive, so integrity impact is High per UAF guidance.\nA:H - Writing into the freed i2c-dev bounce buffer or returned SMBus stack object can oops or panic the kernel even when not fully exploited, and the dangling mcp->rxbuf persists until the next read so the crash is retriggerable at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:32:19.551Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.12.111"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.18.51"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"7.2.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}