Linux Kernel DMA Fence Leak Vulnerability in IIO Buffer Management

Vulnerability

A memory leak vulnerability has been identified in the Linux kernel's IIO (Industrial I/O) subsystem, specifically within the buffer management component. The issue arises in the function 'iio_buffer_enqueue_dmabuf()', which improperly handles DMA (Direct Memory Access) fences. When this function is called, it allocates a DMA fence structure using 'kmalloc' and initializes its reference count. The function then adds the fence to a reservation object, increasing the reference count again, but fails to release the original reference before returning. This oversight causes a permanent memory leak with each buffer enqueue, as the initial allocation is never freed. The problem is exacerbated when multiple IIO devices are active, leading to a significant accumulation of unreleased memory allocations. This vulnerability has been addressed by modifying the function to properly release the fence reference after it has been added to the reservation object, ensuring that the memory is correctly managed and freed when no longer needed.

Impact

The vulnerability causes a continuous memory leak, with approximately 1875 allocations per second not being released. This unaddressed leak can lead to increased memory usage and potential exhaustion of available resources over time.

Reproduction

The vulnerability can be reproduced by using four IIO read-write devices at a frequency of 240 kHz, with 512 samples per buffer. This setup will generate a substantial number of unreleased memory allocations per second, matching the observed growth of the memory slab.

Remediation

Users can upgrade to the latest version of the Linux kernel where this vulnerability has been fixed. The specific commit addressing this issue is available in the Linux kernel stable tree.

Added: Jul 19, 2026, 7:53 PM
Updated: Jul 19, 2026, 7:53 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
4.3
remediation
7.7
relevance
9.7
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.