{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-49991",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-49991"
  ],
  "published": "2024-10-21T18:02:47Z",
  "summary": "drm/amdkfd: amdkfd_free_gtt_mem clear the correct pointer",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: amdkfd_free_gtt_mem clear the correct pointer\n\nPass pointer reference to amdgpu_bo_unref to clear the correct pointer,\notherwise amdgpu_bo_unref clear the local variable, the original pointer\nnot set to NULL, this could cause use-after-free bug.",
  "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.118",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-49991"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e7831613cbbcd9058d3658fbcdc5d5884ceb2e0c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/30ceb873cc2e97348d9da2265b2d1ddf07f682e1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/71f3240f82987f0f070ea5bed559033de7d4c0e1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6c9289806591807e4e3be9a23df8ee2069180055"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c86ad39140bbcb9dc75a10046c2221f657e8083b"
    }
  ],
  "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 paths are reached only through ioctls on the local `/dev/kfd` character device (`kfd_ioctl_create_queue`, `kfd_ioctl_destroy_queue`) and through process teardown in `kfd_process_destroy_pdds()`. No network or adjacent-network exposure exists.\nAC:L - The attacker fully controls queue creation/destruction and process exit, so the free of the `amdgpu_bo` and the subsequent reuse of the stale pointer are directly and repeatably triggerable with no race or memory-layout condition outside the attacker's influence. Standard heap grooming from userspace controls what reoccupies the freed object.\nPR:L - `kfd_open()` performs no capability check; any local user holding a file descriptor on `/dev/kfd` (render group on desktops, or the device node passed directly into ROCm containers) can drive the paths. No root or CAP_SYS_ADMIN is needed.\nUI:N - The attacker triggers everything from its own process via ioctls and normal process exit; no action by another user or administrator is required.\nS:U - The corruption stays within the kernel's own memory and security authority \u2014 it is standard in-kernel memory corruption, not a hypervisor, IOMMU, or sandbox boundary crossing.\nC:H - Use-after-free on a `struct amdgpu_bo` lets the attacker reclaim the freed slab object with attacker-shaped data and have the driver dereference it (e.g. `amdgpu_bo_gpu_offset(q->wptr_bo)`, kmap/CPU-pointer fields), yielding an arbitrary kernel-memory read primitive and disclosure of kernel addresses and contents.\nI:H - The same UAF gives a write primitive \u2014 the freed `amdgpu_bo` is subsequently written through (`amdgpu_bo_kunmap`, `amdgpu_bo_unpin`, refcount and TTM list manipulation) and contains function-pointer-bearing sub-structures, so heap spraying can be leveraged into controlled writes and control-flow hijack for privilege escalation.\nA:H - Even without full exploitation, dereferencing and double-unref'ing a freed buffer object corrupts TTM/slab state and reliably produces an oops or kernel panic, taking down the machine \u2014 and it is triggerable repeatedly by any local user with GPU access."
    }
  }
}
