CWE
401
Advisory Published
Updated

CVE-2024-56712: udmabuf: fix memory leak on last export_udmabuf() error path

First published: Sun Dec 29 2024(Updated: )

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.

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
Linux Kernel>=4.20<6.12.7
Linux Kernel=6.13-rc1
Linux Kernel=6.13-rc2
Linux Kernel=6.13-rc3
debian/linux<=5.10.223-1<=5.10.234-1<=6.1.129-1<=6.1.128-1
6.12.21-1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203