CVE-2023-53181: dma-buf/dma-resv: Stop leaking on krealloc() failure

Published Sep 15, 2025
·
Updated

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

dma-buf/dma-resv: Stop leaking on krealloc() failure

Currently dmaresvgetfences() will leak the previously allocated array if the fence iteration got restarted and the kreallocarray() fails.

Free the old array by hand, and make sure we still clear the returned fences so the caller won't end up accessing freed memory. Some (but not all) of the callers of dmaresvgetfences() seem to still trawl through the array even when dmaresvgetfences() failed. And let's zero out numfences as well for good measure.

Affected Software

5 affected components
Linux Linux kernel
Linux Linux kernel>=5.16<6.1.42
Linux Linux kernel>=6.2<6.4.7
Linux Linux kernel=6.5-rc1
Linux Linux kernel=6.5-rc2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In dma_resv_get_fences(), free the old array if krealloc_array() fails, clear the returned *fences, and set *num_fences to zero so callers do not access freed memory.

Event History

Sep 15, 2025
CVE Published
via MITRE·02:04 PM
Data Sourced
via MITRE·02:04 PM
Description
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Red Hat·03:10 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-53181?

The severity of CVE-2023-53181 is classified as moderate due to the potential for memory leaks in the Linux kernel.

2

How do I fix CVE-2023-53181?

To fix CVE-2023-53181, upgrade your Linux kernel to the latest patched version provided by your distribution.

3

What systems are affected by CVE-2023-53181?

CVE-2023-53181 affects various versions of the Linux kernel implementing dma-buf and dma-resv functionalities.

4

Is CVE-2023-53181 a remote exploitable vulnerability?

CVE-2023-53181 is not considered a remote exploitable vulnerability as it requires local access to the affected system.

5

What is the impact of CVE-2023-53181 on system performance?

The impact of CVE-2023-53181 may lead to resource leakage, potentially degrading system performance over time if not addressed.

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203