{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-39471",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-39471"
  ],
  "published": "2024-06-25T14:29:06Z",
  "summary": "drm/amdgpu: add error handle to avoid out-of-bounds",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: add error handle to avoid out-of-bounds\n\nif the sdma_v4_0_irq_id_to_seq return -EINVAL, the process should\nbe stop to avoid out-of-bounds read, so directly return -EINVAL.",
  "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.94",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-39471"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5594971e02764aa1c8210ffb838cb4e7897716e8"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8112fa72b7f139052843ff484130d6f97e9f052f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ea906e9ac61e3152bef63597f2d9f4a812fc346a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/011552f29f20842c9a7a21bffe1f6a2d6457ba46"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5b0a3dc3e87821acb80e841b464d335aff242691"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0964c84b93db7fbf74f357c1e20957850e092db3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8b2faf1a4f3b6c748c0da36cda865a226534d520"
    }
  ],
  "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 amdgpu SDMA trap interrupt handler is only reachable on a machine with a local AMD GPU, driven through the DRM device/render nodes (`/dev/dri/renderD*`) and the GPU interrupt ring. There is no network or adjacent-network path to this code.\nAC:L - The out-of-bounds index is fully deterministic \u2014 once an interrupt vector with an unmatched SDMA client ID is processed, `-EINVAL` is used as the array index every time, with no race window, no memory-layout guessing, and no state the attacker must wait for. A local user with render-node access can keep the SDMA engines and their trap/error interrupts firing continuously to reach the handler repeatedly.\nPR:L - Exercising SDMA queues and provoking trap interrupts only requires opening the unprivileged DRM render node, which is group-readable to ordinary logged-in users on desktops, Android devices, and GPU cloud/container instances. No CAP_SYS_ADMIN or root in the initial namespace is needed.\nUI:N - The interrupt handler runs asynchronously from GPU activity the attacker's own process generates; no victim must open a file, mount anything, or take any action.\nS:U - The corruption is confined to kernel memory within the same security authority as the host kernel; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `adev->sdma.instance[0xFFFFFFEA]` is an unbounded out-of-bounds read many gigabytes beyond the array, and `amdgpu_fence_process()` then dereferences the resulting `struct amdgpu_ring`, reading `fence_drv.last_seq`, `sync_seq`, `num_fences_mask`, `adev`, and the `fences[]` pointer array from that location \u2014 arbitrary kernel memory read, not a bounded few-byte overread.\nI:H - The wild pointer is not merely read: `amdgpu_fence_process()` performs `atomic_cmpxchg()` on `drv->last_seq`, `timer_delete()` on `fence_drv.fallback_timer`, `RCU_INIT_POINTER(*ptr, NULL)` stores into `drv->fences[]`, and `dma_fence_put()` (a refcount decrement plus potential release callback) on the garbage pointer \u2014 out-of-bounds writes and a refcount-decrement primitive that are the classic building blocks for control-flow hijacking.\nA:H - Dereferencing a pointer several terabytes out of range in hard-interrupt context faults on unmapped kernel memory, producing an oops/panic that cannot be recovered from in IRQ context, and the corrupting writes and bogus `dma_fence_put()` release paths add further crash modes."
    }
  }
}
