{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-89622",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-89622"
  ],
  "published": "2026-09-11T19:47:07Z",
  "summary": "HID: mcp2221: clear rxbuf after I2C/SMBus transfer completes",
  "details": "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.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-89622"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d6c6b293173c0ea87189501cbd77e8fa677814a1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/03c34309eb1bce1b3b5f7c4a94b703f419120383"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/968546b676d992dd1da3e057d40598231f725996"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/db2333f88729c8aae062cb171ed058725ff5c901"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-09-21T13:30:03Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "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."
    }
  }
}
