{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-38080",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-38080"
  ],
  "published": "2025-06-18T09:34:24Z",
  "summary": "drm/amd/display: Increase block_sequence array size",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Increase block_sequence array size\n\n[Why]\nIt's possible to generate more than 50 steps in hwss_build_fast_sequence,\nfor example with a 6-pipe asic where all pipes are in one MPC chain. This\noverflows the block_sequence buffer and corrupts block_sequence_steps,\ncausing a crash.\n\n[How]\nExpand block_sequence to 100 items. A naive upper bound on the possible\nnumber of steps for a 6-pipe asic, ignoring the potential for steps to be\nmutually exclusive, is 91 with current code, therefore 100 is sufficient.",
  "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": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-38080"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/de67e80ab48f1f23663831007a2fa3c1471a7757"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e55c5704b12eeea27e212bfab8f7e51ad3e8ac1f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/bf1666072e7482317cf2302621766482a21a62c7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3a7810c212bcf2f722671dadf4b23ff70a7d23ee"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The overflow is reached only through the local DRM atomic-commit/page-flip ioctl path on /dev/dri/cardN (amdgpu_dm_atomic_commit_tail \u2192 dc_update_planes_and_stream \u2192 commit_planes_for_stream_fast \u2192 hwss_build_fast_sequence). There is no network or adjacent-network exposure.\nAC:L - There is no bounds check whatsoever in hwss_build_fast_sequence, so an attacker who submits an atomic commit with many planes in one MPC chain and multiple simultaneous update flags (address, gamma, CTM/out_csc, gamut remap, bias/scale) deterministically drives the step count past 50 on the widely-deployed 6-pipe DCN2.0/DCN3.0 ASICs. No race, timing window, or attacker-uncontrollable state is involved.\nPR:L - Only an ordinary local user session is needed \u2014 logind grants the seat user rw access to /dev/dri/cardN and DRM master can be acquired on a free VT or by being the compositor, which is all the DRM_MASTER-gated atomic ioctl requires. No root or CAP_SYS_ADMIN is necessary.\nUI:N - The attacker issues the atomic commit itself; no action by another user or victim is required at any point in the path.\nS:U - The corruption is confined to kernel memory belonging to the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The first overflowing write clobbers block_sequence_steps with a kernel pointer, after which hwss_execute_sequence iterates an enormous count, reading out-of-bounds kernel memory as block_sequence entries and dereferencing OOB-derived pointers (mpc, pipe_ctx, csc regval) into display hardware programming \u2014 an out-of-bounds read/disclosure primitive, and the in-struct spill over kref refcount enables a dc_state use-after-free that can be leveraged for arbitrary read.\nI:H - This is an unbounded out-of-bounds write: entries 50+ overwrite block_sequence_steps, dc_dmub_cmd[], dmub_cmd_count and the kref refcount, and once the counter holds pointer-derived garbage every further write lands far outside the kvzalloc'd dc_state, giving a wild kernel-heap write usable for control-flow hijacking.\nA:H - The commit message states outright that the overflow corrupts block_sequence_steps and causes a crash; the resulting wild writes and OOB function-pointer dispatch reliably produce a kernel oops/panic."
    }
  }
}
