{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-56538",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-56538"
  ],
  "published": "2024-12-27T14:12:25Z",
  "summary": "drm: zynqmp_kms: Unplug DRM device before removal",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm: zynqmp_kms: Unplug DRM device before removal\n\nPrevent userspace accesses to the DRM device from causing\nuse-after-frees by unplugging the device before we remove it. This\ncauses any further userspace accesses to result in an error without\nfurther calls into this driver's internals.",
  "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-2024-56538"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a17b9afe58c474657449cf87e238b1788200576b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4fb97432e28a7e136b2d76135d50e988ada8e1af"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/692f52aedccbf79b212a1e14e3735192b4c24a7d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2e07c88914fc5289c21820b1aa94f058feb38197"
    }
  ],
  "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 vulnerability is reached through ioctl and mmap on the local DRM primary node /dev/dri/card0 of the zynqmp-dpsub device. There is no network or remote-peer input path into this driver.\nAC:L - This is not a narrow race \u2014 because drm_dev_unregister() never sets dev->unplugged, the guard state is broken permanently, so every subsequent ioctl/mmap from an already-open fd deterministically enters the torn-down driver. An attacker merely holds an fd open and loops ioctls, and the freed DMA channels, unmapped iomem, and destroyed mutex are hit reliably.\nPR:L - The attacker only needs an open file descriptor on the DRM primary node, which unprivileged local users of a graphical session obtain via logind ACLs or video-group membership on these embedded/kiosk systems. The reachable dumb-buffer ioctls carry flags 0, requiring neither DRM master nor DRM_AUTH.\nUI:N - The attacker's process simply keeps its fd open and polls; no victim action is needed at exploitation time. On ZynqMP FPGA MPSoCs the driver teardown occurs through routine platform events such as FPGA-region/device-tree-overlay reconfiguration and module reload rather than a deliberate victim action.\nS:U - The corruption is confined to kernel memory within the same security authority as the kernel itself. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The missing unmap_mapping_range() leaves userspace with live mappings of GEM DMA buffers whose backing reserved-memory pool was released by of_reserved_mem_device_release(), giving a direct read primitive into kernel memory that can be recycled for other allocations. The use-after-free on released DMA channels and driver state further enables disclosure of freed kernel object contents.\nI:H - Those same stale userspace mappings are writable, yielding a direct write-after-free into memory the kernel will reallocate, and the driver continues submitting DMA descriptors on channels already handed back via dma_release_channel(). This combination provides heap-grooming and control-flow-hijack primitives typical of an exploitable use-after-free.\nA:H - Post-removal ioctls write to devres-unmapped iomem with the APB clock gated and lock a mutex_destroy()'d dp->lock, producing an oops or an AXI bus hang that wedges the SoC. Any use-after-free of this kind reliably crashes the kernel even when not weaponized further."
    }
  }
}
