{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-46817",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-46817"
  ],
  "published": "2024-09-27T12:36:20Z",
  "summary": "drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6\n\n[Why]\nCoverity reports OVERRUN warning. Should abort amdgpu_dm\ninitialize.\n\n[How]\nReturn failure to amdgpu_dm_init.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:H/PR:N/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.109",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-46817"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d619b91d3c4af60ac422f1763ce53d721fb91262"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/754321ed63f0a4a31252ca72e0bd89a9e1888018"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/21bbb39863f10f5fb4bf772d15b07d5d13590e9d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/28b515c458aa9c92bfcb99884c94713a5f471cea"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/94cb77700fa4ae6200486bfa0ba2ac547534afd2"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d398c74c881dee695f6eb6138c9891644e1c3d9d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/84723eb6068c50610c5c0893980d230d7afa2105"
    }
  ],
  "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.4,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable code is `amdgpu_dm_initialize_drm_device()`, reached only via `dm_hw_init()` during amdgpu device probe on the local machine (boot, `modprobe amdgpu`, PCI rescan, or eGPU attach); no network, adjacent-network, or remote-peer data reaches it, and the resulting corrupted plane capabilities are read back through local DRM ioctls on `/dev/dri/card*`.\nAC:H - The overrun only occurs if `dc->caps.max_streams` exceeds 6, and that value is `min(res_pool->pipe_count, res_pool->stream_enc_count)` derived from compile-time per-ASIC `struct resource_caps` tables whose maximum `num_timing_generator` is 6, with hardware pipe fuses only ever decrementing it. Whether the machine contains an ASIC reporting more than six streams is entirely a property of the installed silicon and wholly outside any attacker's influence.\nPR:N - No capability check, credential test, or access-control gate exists anywhere on the path \u2014 `amdgpu_dm_initialize_drm_device()` runs unconditionally as part of the IP-block hardware init during device probe. On a system with qualifying hardware the out-of-bounds accesses occur automatically at boot before any account exists, so the attacker needs no privileges at all.\nUI:N - The amdgpu display manager initializes automatically when the PCI device is probed at boot; no victim must open a file, mount anything, or take any other action.\nS:U - The out-of-bounds read and write both stay inside kernel memory (`struct dc_caps` and `struct amdgpu_device`) and are handled entirely by the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Reading `dc->caps.planes[i]` past index 5 pulls adjacent `struct dc_caps` bytes (`color`, `dmub_caps`, and following fields) and misinterprets them as a `struct dc_plane_cap`, from which `amdgpu_dm_plane_init()` derives the advertised pixel formats, DRM format modifiers, and upscale/downscale limits that any local user holding a DRM fd can read back via `DRM_IOCTL_MODE_GETPLANE` and the `IN_FORMATS` blob. The accompanying heap-pointer overwrite of `struct amdgpu_device` is memory corruption that can be leveraged for further disclosure.\nI:H - `initialize_plane()` writes a freshly kzalloc'd `struct drm_plane *` past the end of `mode_info->planes[6]`, corrupting the adjacent `afmt[9]` pointer array and DRM property pointers inside `struct amdgpu_device`; the subsequent `amdgpu_dm_crtc_init(dm, mode_info->planes[i], i)` reads those slots back out of bounds and passes type-confused pointers to `drm_crtc_init_with_planes()`. An out-of-bounds pointer write combined with type confusion is a control-flow-relevant corruption primitive.\nA:H - The pre-fix `ASSERT()` expands to `WARN_ON_ONCE()`, which panics outright on the many builds running `panic_on_warn=1`, and execution then continues into the out-of-bounds accesses that corrupt `struct amdgpu_device` and dereference type-confused pointers during display init, crashing the kernel or leaving the machine unbootable/headless."
    }
  }
}
