{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-56704",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-56704"
  ],
  "published": "2024-12-28T09:46:17Z",
  "summary": "9p/xen: fix release of IRQ",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\n9p/xen: fix release of IRQ\n\nKernel logs indicate an IRQ was double-freed.\n\nPass correct device ID during IRQ release.\n\n[Dominique: remove confusing variable reset to 0]",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/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": "6.1.120",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-56704"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/692eb06703afc3e24d889d77e94a0e20229f6a4a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d74b4b297097bd361b8a9abfde9b521ff464ea9c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7f5a2ed5c1810661e6b03f5a4ebf17682cdea850"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4950408793b118cb8075bcee1f033b543fb719fa"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b9e26059664bd9ebc64a0e8f5216266fc9f84265"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2bb3ee1bf237557daea1d58007d2e1d4a6502ccf"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d888f5f5d76b2722c267e6bdf51d445d60647b7b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/530bc9f03a102fac95b07cda513bfc16ff69e0ee"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e43c608f40c065b30964f0a806348062991b802d"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 8.4,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The Xen 9pfs frontend is reached through hypervisor-mediated grant-shared rings, event channels and xenstore state transitions, not through the network stack, so the attack path is a local read/write/signal channel into the guest kernel rather than a network protocol. Guest-side triggering (driver unbind, device teardown) is likewise local.\nAC:L - The wrong-dev_id `free_irq()` fails deterministically on every single ring teardown, so the WARN, the leaked irqaction and the missing `synchronize_irq()` barrier are guaranteed, and the attacker controls both sides of the resulting race by choosing when to drive the device to Closing/removal while continuously notifying the event channel. No condition lies outside the attacker's influence.\nPR:N - The realistic attacker is a compromised or malicious 9pfs backend/driver domain, which in Xen's disaggregated threat model holds zero privileges within the victim guest kernel yet fully controls the xenbus state transitions and event-channel notifications needed to trigger and race the teardown.\nUI:N - Device teardown is driven entirely by backend-initiated xenbus state changes and requires no action from any user in the guest; having a 9pfs device attached is a configuration precondition, not victim interaction.\nS:U - The corrupted memory and the resulting control-flow impact are all inside the victim guest's own Linux kernel, so the vulnerable and impacted components share one security authority; no VM-escape, IOMMU or sandbox boundary is crossed by the flaw itself.\nC:H - Because `synchronize_irq()` is skipped, `xen_9pfs_front_event_handler()` and the subsequently queued `p9_xen_response()` read `ring->priv->client`, `ring->intf`, `ring->data.in` and the `p9_client`/`p9_req_t` structures after `kfree(priv->rings)`/`kfree(priv)`, giving a use-after-free read over reclaimable kernel heap contents, which per guidance is High.\nI:H - `schedule_work(&ring->work)` writes workqueue list pointers into the freed `xen_9pfs_dataring` allocation and later executes `p9_xen_response()` against attacker-reclaimable memory including the `p9_client` and its callback state, yielding a use-after-free write and control-flow hijack primitive suitable for privilege escalation inside the guest.\nA:H - Every teardown hits `WARN(1, \"Trying to free already-free IRQ\")`, which is an immediate panic under `panic_on_warn`, and the descriptor is freed with a live irqaction attached while the ring memory is released underneath a possibly-running handler, producing oopses and slab corruption; each cycle additionally leaks the `struct irqaction` and its module/PM references."
    }
  }
}
