{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-27045",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-27045"
  ],
  "published": "2024-05-01T12:57:40Z",
  "summary": "drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'\n\nTell snprintf() to store at most 10 bytes in the output buffer\ninstead of 30.\n\nFixes the below:\ndrivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1508 dp_dsc_clock_en_read() error: snprintf() is printing too much 30 vs 10",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:H/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.83",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-27045"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ff28893c96c5e0927a4da10cd24a3522ca663515"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/440f059837418fac1695b65d3ebc6080d33be877"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d346b3e5b25c95d504478507eb867cd3818775ab"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ad76fd30557d6a106c481e4606a981221ca525f7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/eb9327af3621d26b1d83f767c97a3fe8191a3a65"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/cf114d8d4a8d78df272116a745bb43b48cef65f4"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4b09715f1504f1b6e8dff0e9643630610bc05141"
    }
  ],
  "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.0,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable code is a debugfs `.read` handler reached only by opening and reading /sys/kernel/debug/dri/N/DP-X/dsc_clock_en through the local VFS. There is no network, adjacent-network, or physical path into `dp_dsc_clock_en_read()`.\nAC:H - The overflow can only occur if `dsc_state.dsc_clock_en` formats to 10 or more characters, but that value is extracted from the DSC_TOP_CONTROL.DSC_CLOCK_EN register whose mask is 0x00000001 on every ASIC generation, so it is always 0 or 1 \u2014 a bound the attacker cannot influence. Triggering the mis-sized `snprintf()` is trivial, but making it actually write out of bounds depends on hardware register state entirely outside attacker control.\nPR:L - The node is created with mode 0644 and requires no capability check in the read path, so any local account able to traverse debugfs can reach it \u2014 the norm on Android, ChromeOS, embedded graphics stacks and IGT/debug setups that grant a non-root graphics account access to /sys/kernel/debug/dri. This matches the PR:L already assigned to the analogous amdgpu debugfs read in CVE-2024-35795.\nUI:N - The attacker simply reads the file; no victim action, modeset, or privileged helper invocation is needed. The DisplayPort/eDP connector node exists automatically whenever the amdgpu display driver has bound to the GPU.\nS:U - The affected `rd_buf` allocation and any resulting slab corruption live entirely within the kernel's own security authority. No VM, hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - Under the potential-overflow framing, the mis-sized `snprintf()` bound permits a heap out-of-bounds write past a 10-byte kcalloc allocation, and per scoring guidance memory corruption of this kind is treated as leverageable for kernel information disclosure. The read-back loop itself is bounded by `rd_buf_size` and the buffer is zeroed by kcalloc, so there is no direct read primitive.\nI:H - An out-of-bounds heap write is scored as High integrity impact, since corruption of slab contents beyond the allocated 10 bytes is the classic primitive for control-flow hijacking. The written bytes are the ASCII rendering of a kernel-controlled value rather than attacker-chosen data, which limits practical exploitability.\nA:H - Writing past the end of the kmalloc'd buffer corrupts allocator state adjacent to the object and trips redzone/KASAN out-of-bounds checks, either of which results in a kernel oops or panic. Any such heap corruption is scored as a full availability loss."
    }
  }
}
