{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-97497",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-97497"
  ],
  "published": "2026-09-24T16:08:25Z",
  "summary": "drm/amdkfd: Check bounds for allocate_sdma_queue restore_sdma_id",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Check bounds for allocate_sdma_queue restore_sdma_id\n\nallocate_sdma_queue has an option where the sdma queue id can be\nspecified (used by CRIU). We weren't bounds-checking that\nvalue.\n\nConfirm it's less than the maximum number of queues.",
  "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.189",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-97497"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/41460d2dd0246f0ab7e80b103d34c8649e022999"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/25e1b29ecc8da3609ba0072ca54a3b1fdd1578f3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/42f2bd50236b61ad0aeb2c233c990ee0d615fdad"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/dd2870ca036e1d51baa59f942007b36a595b5890"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/bfe9a7545b2a7be1c543f1741e16f2d5ec4116ae"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-10-03T11:04:09Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The unbounded index is kfd_criu_queue_priv_data.sdma_id, copy_from_user'd in kfd_criu_restore_queue() from AMDKFD_IOC_CRIU_OP KFD_CRIU_OP_RESTORE on /dev/kfd, then passed as restore_sdma_id into allocate_sdma_queue() by create_queue_cpsch()/create_queue_nocpsch(); no network protocol carries that field.\nAC:L - A single crafted KFD_CRIU_OP_RESTORE QUEUE object with type KFD_QUEUE_TYPE_SDMA or KFD_QUEUE_TYPE_SDMA_XGMI and an oversized sdma_id makes allocate_sdma_queue() run test_bit()/clear_bit() on that index; the attacker supplies the whole criu_restore() blob, so no race or victim-owned GPU state is required.\nPR:L - kfd_ioctl() admits AMDKFD_IOC_CRIU_OP only when capable(CAP_CHECKPOINT_RESTORE) or capable(CAP_SYS_ADMIN). CAP_CHECKPOINT_RESTORE is the delegated non-root capability already held by CRIU tooling and container checkpoint services, matching limited local privilege rather than init-namespace root.\nUI:N - The attacker opens their own /dev/kfd (kfd_open -> kfd_init_apertures creates PDDs) and issues KFD_CRIU_OP_RESTORE against that process; no other user must mount media, open a file, or interact.\nS:U - allocate_sdma_queue()'s OOB test_bit()/clear_bit() on the kzalloc'd device_queue_manager sdma_bitmap corrupts host kernel slab inside amdkfd. That stays in the same kernel authority; it is not a KVM/Xen guest-to-host escape or an IOMMU/DMA bypass.\nC:H - restore_sdma_id is a user uint32_t used as the bit index into a KFD_MAX_SDMA_QUEUES (128-bit) dqm->sdma_bitmap. test_bit() of an out-of-range index is an unbounded kernel-bit read (the ioctl returns -EBUSY iff the bit is clear), which is not a few-byte leak.\nI:H - When that out-of-range bit is set, allocate_sdma_queue() does clear_bit(*restore_sdma_id, dqm->sdma_bitmap), a one-bit write at an attacker-chosen offset past the 128-bit map into later dqm fields (fence_addr, hung_db_array) or adjacent kmalloc objects, an OOB write.\nA:H - test_bit()/clear_bit() of a restore_sdma_id whose bitmap word is unmapped oopses inside allocate_sdma_queue(); the same OOB clear can smash dqm pointers and flags and panic the host."
    }
  }
}
