{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-99510",
  "modified": "2026-11-24T05:30:02Z",
  "upstream": [
    "CVE-2026-99510"
  ],
  "published": "2026-11-19T15:08:37Z",
  "summary": "media: hackrf: fix use-after-free in hackrf_alloc_urbs() error path",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: hackrf: fix use-after-free in hackrf_alloc_urbs() error path\n\nhackrf_alloc_urbs() frees the URBs it allocated so far when one\nallocation fails, but leaves the entries in dev->urb_list[] and\ndev->urbs_initialized untouched. The caller, hackrf_start_streaming(),\nthen calls hackrf_free_urbs() on the error path, which walks\ndev->urbs_initialized entries and calls usb_free_urb() a second time on\nthe already-freed URBs, causing a use-after-free (slab-use-after-free\nWrite in usb_free_urb()).\n\nDrop the redundant cleanup loop inside hackrf_alloc_urbs() and let\nhackrf_free_urbs(), which the caller already invokes on error, own the\ncleanup of the successfully allocated URBs.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:H/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.193",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-99510"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8019a26c425f9434d879ce291b7e004cbda77410"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/33ad76cb192cfff66a36d034d06b2ac7fab1cc22"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9166409615dc009bdb118dc205a89c81bf598308"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/caf376902c1f19783345e8bfec147bfdeac15bd5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ed8d9b2015afd540f6159ed272702a87f02fbd05"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e9deece85062873763dfbb8b1121e722ef2959a0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ba097d24c56bc3c57a1173506c3c5a42d0f94988"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6802ad4b6b267dda02209b5811edac7825c8a5f6"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-11-23T08:12:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.0,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - hackrf_alloc_urbs() is reached only from hackrf_start_streaming(), which vb2_start_streaming() runs for VIDIOC_STREAMON (vb2_ioctl_streamon) or read()/write() (vb2_fop_read/vb2_fop_write) on the /dev/swradio node from video_register_device() in hackrf_probe(). The double-free is that error path when usb_alloc_urb() returns NULL; no USB packet or remote message carries the bad input.\nAC:H - The second usb_free_urb() happens only if usb_alloc_urb(0, GFP_KERNEL) fails for a later index after at least one success, and only after hackrf_alloc_stream_bufs() has already allocated six 64KB coherent buffers. An order-0 GFP_KERNEL failure after those costly DMA allocations is not a state the caller can produce on demand.\nPR:L - hackrf_fops.open is v4l2_fh_open and the VIDIOC_STREAMON path has no capable() check, so the gate is permission to open /dev/swradioN. The kernel creates that node mode 0600 and video4linux udev grants it to the video group and the active seat, which a normal local user has, without CAP_SYS_ADMIN.\nUI:N - The same process that opens /dev/swradioN calls VIDIOC_STREAMON or read()/write() and thereby hackrf_start_streaming(). hackrf_probe() stops after CMD_BOARD_ID_READ and CMD_VERSION_STRING_READ and never calls hackrf_alloc_urbs().\nS:U - kref_put() in the second usb_free_urb() corrupts a freed struct urb inside the kernel that handled the V4L2 ioctl, the same security authority as the caller.\nC:H - hackrf_free_urbs() calls usb_free_urb() on urb_list entries that hackrf_alloc_urbs() already freed, and kref_put() writes that freed struct urb. The object contains kernel pointers (transfer_buffer, dev, complete); reclaiming the slab slot turns the use-after-free into a kernel memory read.\nI:H - The second kref_put() writes the kref at the start of the freed urb, and if a reclaim leaves that word at 1, urb_destroy() kfree()s the object again and kfree()s transfer_buffer when URB_FREE_BUFFER is set.\nA:H - That kref_put() is a slab use-after-free write in usb_free_urb(). It corrupts allocator metadata or hits refcount saturation on the freed urb and oopses the kernel."
    }
  }
}
