{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-42120",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-42120"
  ],
  "published": "2024-07-30T07:47:52Z",
  "summary": "drm/amd/display: Check pipe offset before setting vblank",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Check pipe offset before setting vblank\n\npipe_ctx has a size of MAX_PIPES so checking its index before accessing\nthe array.\n\nThis fixes an OVERRUN issue reported by Coverity.",
  "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.98",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-42120"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b2e9abc95583ac7bbb2c47da4d476a798146dfd6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0b3702f9d43d163fd05e43b7d7e22e766dbef329"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d2c3645a4a5ae5d933b4116c305d9d82b8199dbf"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/96bf81cc1bd058bb8af6e755a548e926e934dfd1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c5ec2afeeee4c91cebc4eff6d4f1ecf4047259f4"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5396a70e8cf462ec5ccf2dc8de103c79de9489e6"
    }
  ],
  "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 code is reached only through the local DRM device node `/dev/dri/cardN` \u2014 `DRM_IOCTL_WAIT_VBLANK`/`CRTC_QUEUE_SEQUENCE` or an atomic commit requesting a vblank event drives `amdgpu_dm_crtc_enable_vblank`/`disable_vblank`. There is no network or adjacent-network exposure.\nAC:L - On affected hardware the bad index is fully deterministic \u2014 `info->src_id` is a hardcoded 0 in the dce60 VUPDATE table entries, so `dc_interrupt_to_irq_source()` always returns `DC_IRQ_SOURCE_INVALID` and `pipe_offset` always wraps to 178; there is no race, no timing window, and no memory-layout precondition needed to reach the out-of-bounds access, which the attacker triggers at will by toggling vblank.\nPR:L - `drm_wait_vblank_ioctl` is registered with flags `0` (no DRM_AUTH, DRM_MASTER, or DRM_ROOT_ONLY), so any unprivileged local process holding an open handle to the card node \u2014 which the seat user gets automatically via logind ACLs, or any member of the `video` group \u2014 can drive the vblank refcount into this path. No root or capability is required.\nUI:N - The attacking process issues the vblank ioctl itself and the vblank-disable path invokes `amdgpu_dm_crtc_set_vupdate_irq()` unconditionally; no action by another user or victim is needed.\nS:U - The out-of-bounds access and its consequences are confined to the kernel's own memory and the amdgpu driver's security authority; no VM, hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The read is roughly 400\u2013700 KB past the six-element `pipe_ctx[]` array \u2014 far from a strictly bounded few-byte overread \u2014 and pulls an arbitrary quadword out of neighbouring kernel allocations; that value is used as the `tg` pointer and its contents feed `arm_vert_intr()` register programming, so it is an unbounded kernel-memory disclosure primitive rather than a small bounded leak.\nI:H - On the enable path the out-of-bounds value is treated as a `struct timing_generator *` and dereferenced twice with an indirect call \u2014 `tg->funcs->arm_vert_intr(tg, 2)` \u2014 giving a control-flow hijack primitive if the memory ~178 pipe_ctx entries past the array can be groomed, and the resulting hardware register writes are driven from that attacker-uninfluenced object.\nA:H - `dc_state` is `kvzalloc`'d and therefore vmalloc-backed with guard pages at this size, so indexing hundreds of kilobytes past `res_ctx.pipe_ctx[]` reads unmapped memory and oopses, and any wild `tg` value that survives the load is then dereferenced and called, panicking the kernel; the attacker can repeat the trigger arbitrarily."
    }
  }
}
