CVE-2026-63929

iio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf()

Published Jul 19, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

iio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf()

iio_buffer_enqueue_dmabuf() allocates a struct iio_dma_fence (104 bytes,
kmalloc-128) via kmalloc_obj()+dma_fence_init(), which sets the initial
kref to 1. It then calls dma_resv_add_fence() which takes a second
reference (kref=2), and stores a raw pointer in block->fence.

On the success path the function returns without calling dma_fence_put()
to release the initial reference, so every buffer enqueue permanently
leaks one kmalloc-128 allocation.

The iio_buffer_cleanup() work item only releases the temporary reference
taken during completion signalling by iio_buffer_signal_dmabuf_done();
the initial reference from dma_fence_init() is never released.

With four iio_rwdev instances at 240kHz and 512 samples per buffer,
this produces ~1875 kmalloc-128 allocations per second matching the
observed slab growth exactly. A test with ftrace confirmed that the
dma_fence_destroy event was never triggered.

Fix by calling dma_fence_put() after dma_resv_add_fence(), transferring
ownership of the fence to the DMA reservation object. The DMA fence then
gets properly discarded after being signalled.

Analysis

AI-generated

Technical impact

The flaw is a memory‑leak in the Industrial I/O (IIO) buffer subsystem. In iio_buffer_enqueue_dmabuf() a DMA fence is allocated and its reference counter is incremented twice, but on success the initial reference is never released. This leaks a 104‑byte kmalloc allocation that persists for the lifetime of the system. Enqueuing buffers at high frequency can accumulate thousands of allocations per second, exhausting kernel memory and potentially forcing a reboot or causing a denial of service. The weakness is classified as CWE‑772: Unreleased Resource after Successful Use.

Affected Systems

All Linux kernel releases that include the IIO buffer subsystem before the commit that adds dma_fence_put after dma_resv_add_fence. Any system that exposes IIO devices capable of DMA buffer enqueuing—such as kernel modules for sensors or ADCs—may be impacted. The vulnerability applies to the core Linux kernel.

Risk and Exploitability

The CVSS score of 5.5 places this vulnerability in the medium severity range, and its EPSS score is less than 1%, indicating a low probability of timely exploitation. It is not listed in CISA’s KEV catalog. The likely attack vector is via a privileged driver or process that enqueues IIO DMA buffers; it is not exploitable from ordinary user space. An attacker would need to trigger repeated, high‑frequency buffer enqueues to exhaust kernel memory, leading to service degradation or crash. No public exploits are available, and the flaw does not provide remote code execution, but it can result in a denial of service if abused.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel version that incorporates the patch adding dma_fence_put after dma_resv_add_fence in iio_buffer_enqueue_dmabuf.
  • If an immediate kernel upgrade is not feasible, restrict or throttle high‑frequency IIO buffer enqueuing, monitor kernel slab usage for abnormal growth, or disable offending devices until the patch is applied.
  • For custom kernel builds, apply the backport locally by inserting a dma_fence_put call into iio_buffer_enqueue_dmabuf and rebuild the kernel.

Generated by OpenCVE AI on October 30, 2026 at 16:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-401
CPEs cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-401
Type Values Removed Values Added
Weaknesses CWE-401
Type Values Removed Values Added
Weaknesses CWE-772
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Low

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: iio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf() iio_buffer_enqueue_dmabuf() allocates a struct iio_dma_fence (104 bytes, kmalloc-128) via kmalloc_obj()+dma_fence_init(), which sets the initial kref to 1. It then calls dma_resv_add_fence() which takes a second reference (kref=2), and stores a raw pointer in block->fence. On the success path the function returns without calling dma_fence_put() to release the initial reference, so every buffer enqueue permanently leaks one kmalloc-128 allocation. The iio_buffer_cleanup() work item only releases the temporary reference taken during completion signalling by iio_buffer_signal_dmabuf_done(); the initial reference from dma_fence_init() is never released. With four iio_rwdev instances at 240kHz and 512 samples per buffer, this produces ~1875 kmalloc-128 allocations per second matching the observed slab growth exactly. A test with ftrace confirmed that the dma_fence_destroy event was never triggered. Fix by calling dma_fence_put() after dma_resv_add_fence(), transferring ownership of the fence to the DMA reservation object. The DMA fence then gets properly discarded after being signalled.
Title iio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime

  • CWE-772

    Missing Release of Resource after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Jul 19, 2026, 2:55 PM
Reserved
Jul 19, 2026, 7:54 AM
Status
Analyzed
Published
Jul 19, 2026, 4:17 PM
Modified
Oct 30, 2026, 2:29 PM
Severity
Low
Public date
Jul 19, 2026, 12:00 AM