CVE-2024-56712: udmabuf: fix memory leak on last export_udmabuf() error path
In the Linux kernel, the following vulnerability has been resolved:
udmabuf: fix memory leak on last exportudmabuf() error path
In exportudmabuf(), if dmabuffd() fails because the FD table is full, a dmabuf owning the udmabuf has already been created; but the error handling in udmabufcreate() will tear down the udmabuf without doing anything about the containing dmabuf.
This leaves a dmabuf 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 dmabuffd() call out of exportudmabuf() 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.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56712?
CVE-2024-56712 has been classified as a moderate severity vulnerability due to its potential impact on system stability.
How do I fix CVE-2024-56712?
To fix CVE-2024-56712, update your Linux kernel to version 6.12.8 or later.
Which versions of the Linux kernel are affected by CVE-2024-56712?
CVE-2024-56712 affects Linux kernel versions from 4.20 up to 6.12.7 and specific release candidates of version 6.13.
What type of issue is CVE-2024-56712?
CVE-2024-56712 is a memory leak vulnerability that occurs during error handling in the export_udmabuf() functionality.
Is CVE-2024-56712 exploitable remotely?
CVE-2024-56712 is not considered remotely exploitable as it requires local access to the affected system.