{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-39292",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-39292"
  ],
  "published": "2024-06-24T13:52:41Z",
  "summary": "um: Add winch to winch_handlers before registering winch IRQ",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\num: Add winch to winch_handlers before registering winch IRQ\n\nRegistering a winch IRQ is racy, an interrupt may occur before the winch is\nadded to the winch_handlers list.\n\nIf that happens, register_winch_irq() adds to that list a winch that is\nscheduled to be (or has already been) freed, causing a panic later in\nwinch_cleanup().\n\nAvoid the race by adding the winch to the winch_handlers list before\nregistering the IRQ, and rolling back if um_request_irq() fails.",
  "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": "6.1.93",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-39292"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/66ea9a7c6824821476914bed21a476cd20094f33"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/dc1ff95602ee908fcd7d8acee7a0dadb61b1a0c0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/351d1a64544944b44732f6a64ed65573b00b9e14"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/31960d991e43c8d6dc07245f19fc13398e90ead2"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0c02d425a2fbe52643a5859a779db0329e7dddd4"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/434a06c38ee1217a8baa0dd7c37cc85d50138fb0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/73b8e21f76c7dda4905655d2e2c17dc5a73b87f1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a0fbbd36c156b9f7b2276871d499c9943dfe5101"
    }
  ],
  "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": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable code is UML console/tty setup reached by opening a UML console or serial device (`/dev/tty*`, `/dev/ttyS*`) inside the guest, i.e. via a local `open()` syscall. Although the `con=port:` telnet channel type can have its setup triggered by an incoming connection, the standard and reliable reach is local.\nAC:L - The attacker creates and repeats the race themselves \u2014 closing and reopening the line clears `line->sigio` and re-runs `register_winch_irq()`, so the tiny window between `um_request_irq()` and `list_add()` can be attacked in an unbounded retry loop. Once the early interrupt lands, the freed object stays linked in the global `winch_handlers` list deterministically, and the later dereference is delayed long enough for reliable heap grooming.\nPR:L - No capability or credential check exists anywhere on the path from `open()` through `line_open()` \u2192 `line_activate()` \u2192 `register_winch_irq()`; only device-node permissions gate it, and a plain unprivileged guest user is sufficient both to open a console/serial line and to spray the `kmalloc-96` slab that reclaims the freed `struct winch`.\nUI:N - Winch registration happens automatically when a configured console line is first opened (including at boot), and the attacker can drive that open themselves. No action by any other user is required.\nS:U - The corruption and its impact are confined to the UML kernel's own memory and the process it already fully controls, which is standard in-kernel privilege escalation. No hypervisor, IOMMU, or sandbox authority boundary is crossed by the vulnerable component.\nC:H - This is a use-after-free on a small, easily reclaimed slab object; the later walk of `winch_handlers` calls `tty_port_tty_get(winch->port)` on an attacker-controlled pointer, giving an arbitrary-dereference read primitive usable to disclose kernel memory.\nI:H - The stale `list_add()` writes two pointers into freed (reclaimable) memory, and the later `free_winch()` performs `free_stack(winch->stack, 0)` on an attacker-controlled address plus a double `kfree()` and `os_kill_process(winch->pid, 1)`, yielding write/free primitives suitable for control-flow hijack.\nA:H - The commit itself states the dangling list entry causes a panic in `winch_cleanup()`, and any use-after-free of this kind reliably produces an oops or kernel panic in the UML instance."
    }
  }
}
