{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-37885",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-37885"
  ],
  "published": "2025-05-09T06:46:36Z",
  "summary": "KVM: x86: Reset IRTE to host control if *new* route isn't postable",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86: Reset IRTE to host control if *new* route isn't postable\n\nRestore an IRTE back to host control (remapped or posted MSI mode) if the\n*new* GSI route prevents posting the IRQ directly to a vCPU, regardless of\nthe GSI routing type.  Updating the IRTE if and only if the new GSI is an\nMSI results in KVM leaving an IRTE posting to a vCPU.\n\nThe dangling IRTE can result in interrupts being incorrectly delivered to\nthe guest, and in the worst case scenario can result in use-after-free,\ne.g. if the VM is torn down, but the underlying host IRQ isn't freed.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/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": "6.1.136",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-37885"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e5f2dee9f7fcd2ff4b97869f3c66a0d89c167769"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/116c7d35b8f72eac383b9fd371d7c1a8ffc2968b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/023816bd5fa46fab94d1e7917fe131b79ed1fb41"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3481fd96d801715942b6f69fe251133128156f30"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b5de7ac74f69603ad803c524b840bffd36368fc3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3066ec21d1a33896125747f68638725f456308db"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9bcac97dc42d2f4da8229d18feb0fe2b1ce523a2"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 8.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerability is triggered through the KVM_SET_GSI_ROUTING ioctl on a local VM file descriptor, requiring local access to /dev/kvm and a VFIO device node. No network-facing code path reaches the IRTE update logic.\nAC:L - A single KVM_SET_GSI_ROUTING call replacing an MSI route with any non-MSI routing type for a bypassed GSI deterministically leaves the IRTE dangling in posted mode; there is no race to win and no memory-layout condition outside the attacker's control needed to reach the bug.\nPR:L - No capability check exists anywhere on the path \u2014 only possession of the VM fd and a VFIO group fd, which is exactly the privilege set granted to an unprivileged QEMU process (user qemu/libvirt-qemu) on any cloud host doing PCI passthrough. This is also the position an attacker occupies after escaping the guest into the deliberately-sandboxed VMM process.\nUI:N - The attacker performs the entire sequence (bind irqfd, change GSI routing, tear down the VM, drive device interrupts) with no action required from any other user or victim.\nS:C - The dangling IRTE leaves an IOMMU interrupt-remapping entry under guest control, so device interrupts escape host authority \u2014 posted into a guest while the VM lives, and after teardown written by IOMMU hardware into physical memory that now belongs to a different security domain (host kernel or another VM). This is an interrupt-remapping/IOMMU isolation boundary bypass, not containment within a single authority.\nC:H - The use-after-free lets a guest receive host device interrupts it should never see, and the stale posted-interrupt descriptor target in reallocated kernel memory is leverageable for disclosure of host kernel memory contents to the attacker.\nI:H - After the vCPU/VM is freed, the IOMMU performs hardware writes (bit set in PIR at an attacker-chosen vector offset, plus the ON bit) into freed and reallocated kernel memory, giving a repeatable, timing-controlled write primitive into groomable slab objects \u2014 sufficient for control-flow hijack or privilege escalation.\nA:H - The use-after-free corrupts arbitrary reallocated kernel memory causing oops/panic, WARN_ON_ONCE(posted_vcpu) fires in the VT-d IRTE free path (panic under panic_on_warn), and the host permanently loses the device's interrupts."
    }
  }
}
