# CVE-2024-56712: udmabuf: fix memory leak on last export\_udmabuf() error path

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 3.3
- **CVSS:** 3.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-28)
- **CWE:** CWE-401
- **Published:** 2024-12-29T08:48:46.167Z
- **Modified:** 2026-10-30T13:17:48.370Z

## Who should check

- Anyone running Linux \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< 00ebdef47994206f60546929a0f6f63285497272; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< e469922fbdf6ad729e5dc8d49289b5036a0ecdf8; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< c9fc8428d4255c2128da9c4d5cd92e554d0150cf; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< f49856f525acd5bef52ae28b7da2e001bbe7439e
- Anyone running Linux 4.20

## Description

In the Linux kernel, the following vulnerability has been resolved:

udmabuf: fix memory leak on last export\_udmabuf() error path

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.

## Affected and fixed versions

- Linux: \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< 00ebdef47994206f60546929a0f6f63285497272; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< e469922fbdf6ad729e5dc8d49289b5036a0ecdf8; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< c9fc8428d4255c2128da9c4d5cd92e554d0150cf; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< f49856f525acd5bef52ae28b7da2e001bbe7439e (cvelist)
- Linux: 4.20 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-56712. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-56712.md
Affected: Linux >= fbb0de795078190a9834b3409e4b009cfb18a6d4, < 00ebdef47994206f60546929a0f6f63285497272; >= fbb0de795078190a9834b3409e4b009cfb18a6d4, < e469922fbdf6ad729e5dc8d49289b5036a0ecdf8; >= fbb0de795078190a9834b3409e4b009cfb18a6d4, < c9fc8428d4255c2128da9c4d5cd92e554d0150cf; >= fbb0de795078190a9834b34…
Fixed in: Linux 00ebdef47994206f60546929a0f6f63285497272

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-56712 being exploited?

There is no confirmed exploitation: CVE-2024-56712 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-56712?

Low: CVSS 3.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-56712?

Linux \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< 00ebdef47994206f60546929a0f6f63285497272; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< e469922fbdf6ad729e5dc8d49289b5036a0ecdf8; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< c9fc8428d4255c2128da9c4d5cd92e554d0150cf; \>= fbb0de795078190a9834b3409e4b009cfb18a6d4, \< f49856f525acd5bef52ae28b7da2e001bbe7439e; Linux 4.20.

### Is there a fix for CVE-2024-56712?

Yes. Fixed in Linux 00ebdef47994206f60546929a0f6f63285497272. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-56712?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/c9fc8428d4255c2128da9c4d5cd92e554d0150cf>
- patch: <https://git.kernel.org/stable/c/f49856f525acd5bef52ae28b7da2e001bbe7439e>
- other: <https://git.kernel.org/stable/c/00ebdef47994206f60546929a0f6f63285497272>
- other: <https://git.kernel.org/stable/c/e469922fbdf6ad729e5dc8d49289b5036a0ecdf8>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-56712>

HTML: <https://flawdb.com/CVE-2024-56712> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-56712>
