{"id":"CVE-2024-56538","state":"PUBLISHED","title":"drm: zynqmp_kms: Unplug DRM device before removal","description":"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.","publishedAt":"2024-12-27T14:11:20.685Z","updatedAt":"2026-10-30T12:20:17.114Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"0c8ca1da81e5a9787284eb84c0c6ae927f063c15","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"a17b9afe58c474657449cf87e238b1788200576b","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"4fb97432e28a7e136b2d76135d50e988ada8e1af","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"692f52aedccbf79b212a1e14e3735192b4c24a7d","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"2e07c88914fc5289c21820b1aa94f058feb38197","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/xlnx/zynqmp_kms.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.64","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.11","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12.2","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/xlnx/zynqmp_kms.c"]}],"references":["https://git.kernel.org/stable/c/0c8ca1da81e5a9787284eb84c0c6ae927f063c15","https://git.kernel.org/stable/c/a17b9afe58c474657449cf87e238b1788200576b","https://git.kernel.org/stable/c/4fb97432e28a7e136b2d76135d50e988ada8e1af","https://git.kernel.org/stable/c/692f52aedccbf79b212a1e14e3735192b4c24a7d","https://git.kernel.org/stable/c/2e07c88914fc5289c21820b1aa94f058feb38197"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-30T12:36:04.432Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/56xxx/CVE-2024-56538.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56538","state":"PUBLISHED","datePublished":"2024-12-27T14:11:20.685Z","dateUpdated":"2026-10-30T12:20:17.114Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-27T14:03:05.986Z"},"containers":{"cna":{"title":"drm: zynqmp_kms: Unplug DRM device before removal","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"0c8ca1da81e5a9787284eb84c0c6ae927f063c15","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"a17b9afe58c474657449cf87e238b1788200576b","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"4fb97432e28a7e136b2d76135d50e988ada8e1af","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"692f52aedccbf79b212a1e14e3735192b4c24a7d","versionType":"git"},{"version":"d76271d22694e874ed70791702db9252ffe96a4c","status":"affected","lessThan":"2e07c88914fc5289c21820b1aa94f058feb38197","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/xlnx/zynqmp_kms.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.64","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.11","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12.2","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/xlnx/zynqmp_kms.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/0c8ca1da81e5a9787284eb84c0c6ae927f063c15"},{"url":"https://git.kernel.org/stable/c/a17b9afe58c474657449cf87e238b1788200576b"},{"url":"https://git.kernel.org/stable/c/4fb97432e28a7e136b2d76135d50e988ada8e1af"},{"url":"https://git.kernel.org/stable/c/692f52aedccbf79b212a1e14e3735192b4c24a7d"},{"url":"https://git.kernel.org/stable/c/2e07c88914fc5289c21820b1aa94f058feb38197"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"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 — 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."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:20:17.114Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.6.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.11.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.12.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-56538","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-11T15:42:57.597278Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-02-11T15:45:25.403Z"}}]}}}