data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2024-56712 in the interactive tracker

CVE-2024-56712

udmabuf: fix memory leak on last export_udmabuf() error path

EPSS 0.2%

Published 2024-12-29 (22 months ago) by the Linux kernel CNA. Subsystem drivers/dma-buf. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2024-56712 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication.
Debian 13trixiefixed6.12.8-1Update the kernel and reboot. Fixed in 6.12.8-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.8-1Update the kernel and reboot. Fixed in 6.12.8-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.8-1Update the kernel and reboot. Fixed in 6.12.8-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

In export_udmabuf(), if dma_buf_fd() fails because the FD table is full, a dma_buf owning the udmabuf has already been created; but the error handling in udmabuf_create() will tear down the udmabuf without doing anything about the containing dma_buf. This leaves a dma_buf in memory that contains a dangling pointer; though that doesn't seem to lead to anything bad except a memory leak. Fix it by moving the dma_buf_fd() call out of export_udmabuf() so that we can give it different error handling. Note that the shape of this code changed a lot in commit 5e72b2b41a21 ("udmabuf: convert udmabuf driver to use folios"); but the memory leak seems to have existed since the introduction of udmabuf.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

drivers/dma-buf/udmabuf.c

What this is
USERSPACE DMA BUFFER DRIVERMAINTAINERS section matched on drivers/dma-buf/udmabuf.c · dri-devel@lists.freedesktop.org · Maintained

Check it on the machine

grep -wE 'CONFIG_DMA_SHARED_BUFFER|CONFIG_UDMABUF' /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

Show whether Debian builds this, per release

Debian does not build this code in 1 release. It does build it in 3 releases, so the answer depends on which release the machine runs.

  • bookwormn
  • trixieYnot built on armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
  • forky, sidYnot built on armhf/armmp, armhf/armmp-lpae, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
n
not enabled on any flavour - this release does not build the code
Y
built in where it is built at all; some flavours do not build it
Build switches
CONFIG_DMA_SHARED_BUFFER, CONFIG_UDMABUF
Reads as
all on means the file is compiled; any one off means it is not.

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2024-12-29 (22 months ago)source
CVSS
no vector published, unrated
Attack vector
not published
EPSS
0.19%, higher than 7.8% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
drivers/dma-buf

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
4.206.12.7c9fc8428d425
4.206.13f49856f525ac

Why the CNA scored it this way

The kernel CNA published no CVSS vector and no reasoning for CVE-2024-56712, which is why it is shown as unrated rather than given an invented score. 6,405 of the 20,413 CVEs here carry reasoning; this is not one of them.