Skip to main content
Vulnerability Database/CVE-2026-98342

CVE-2026-98342: Linux Kernel Use-After-Free Vulnerability

CVE-2026-98342 is a use-after-free vulnerability in the Linux kernel dmaengine subsystem that can lead to system instability when concurrent RCU readers access freed memory. This article covers technical details, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98342 Overview

CVE-2026-98342 is a use-after-free vulnerability in the Linux kernel dmaengine subsystem. The flaw stems from dma_device_release() unlinking a device with list_del_rcu() and then immediately invoking the driver's device_release() callback, which frees the device without waiting for an RCU grace period. Concurrent readers in dma_issue_pending_all() traverse dma_device_list under rcu_read_lock() and can dereference memory after it has been freed. The regression was introduced by commit 8ad342a86359 ("dmaengine: Add reference counting to dma_device struct"), which decoupled device lifetime from the provider module reference that previously pinned the structure.

Critical Impact

A kernel use-after-free in the dmaengine teardown path can lead to memory corruption, denial of service, or potential local privilege escalation on affected Linux systems.

Affected Products

  • Linux kernel versions containing commit 8ad342a86359 through the fix commits listed in stable branches
  • Distributions shipping affected mainline and longterm Linux kernels
  • Systems using dmaengine providers such as plx_dma and other drivers whose device_release() directly calls kfree()

Discovery Timeline

  • 2026-10-06 - CVE CVE-2026-98342 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-98342

Vulnerability Analysis

The Linux kernel dmaengine subsystem maintains dma_device_list, a global list of registered DMA provider devices. Clients walk this list through dma_issue_pending_all(), which uses list_for_each_entry_rcu() within an rcu_read_lock() critical section. This lockless traversal pattern requires that any element removed from the list remain valid until all concurrent readers finish their RCU read-side critical sections.

The teardown path violates this invariant. dma_device_release() calls list_del_rcu() to unlink the device, then immediately invokes device->device_release(). In many drivers, including plx_dma.c, this callback frees the containing structure directly through kfree(). Because no synchronize_rcu() is placed between unlink and free, a reader holding the RCU lock can dereference freed memory.

Root Cause

Historically, the lockless walk was safe because clients had to hold a dmaengine reference, which pinned the provider module and transitively the device. Commit 8ad342a86359 added explicit reference counting to struct dma_device and decoupled the device lifetime from the module reference. After this change, nothing guarantees the device remains allocated for the duration of an in-progress RCU reader, producing a classic use-after-free [CWE-416].

Attack Vector

Exploitation requires a race between a client invoking dma_issue_pending_all() and the unregistration of a DMA provider. On systems where unprivileged workloads can trigger dmaengine use or where DMA providers can be dynamically removed, a local attacker may be able to race these paths. Successful exploitation yields reads or writes to freed slab memory, which can be weaponized through heap grooming to corrupt adjacent kernel objects.

The fix adds an unconditional synchronize_rcu() before the device is freed, ensuring any in-flight readers complete before memory is reclaimed. The call runs with dma_list_mutex held, delaying only the teardown path. See the stable commits fc1f4884, 4448a539, ac8ce9f8, 4aed7e47, 8577a5ec, cbb3310a, dc750422, and 14578c78 for the backports.

Detection Methods for CVE-2026-98342

Indicators of Compromise

  • KASAN (Kernel Address Sanitizer) reports flagging use-after-free in dma_issue_pending_all or list_for_each_entry_rcu traversal of dma_device_list
  • Kernel oops or general protection faults originating in dmaengine code paths during module unload or device removal
  • Unexpected slab corruption warnings coinciding with DMA provider driver unloads such as plx_dma

Detection Strategies

  • Enable CONFIG_KASAN and CONFIG_SLUB_DEBUG on test kernels to catch dmaengine use-after-free conditions during fuzzing or stress runs
  • Audit loaded kernel modules against the fixed commit list in your distribution's security advisory to confirm whether synchronize_rcu() has been added before device_release()
  • Monitor kernel ring buffer (dmesg) for RCU stall warnings and slab-use-after-free splats that reference dmaengine symbols

Monitoring Recommendations

  • Centralize kernel logs and alert on panic, oops, and KASAN reports originating from the dmaengine subsystem
  • Track kernel package versions across the fleet and flag hosts running kernels built from commits that include 8ad342a86359 but lack the listed fix commits
  • Correlate device hot-removal, module unload events, and DMA client activity to identify systems exposed to the vulnerable race window

How to Mitigate CVE-2026-98342

Immediate Actions Required

  • Apply the Linux kernel updates from your distribution that incorporate the stable fix commits referenced in the NVD entry
  • Restrict loading and unloading of DMA provider modules to trusted administrators to reduce the exposure of the teardown race path
  • Prioritize patching of systems where dmaengine providers can be removed at runtime, including hot-pluggable PCIe DMA controllers

Patch Information

The fix adds an unconditional synchronize_rcu() call in dma_async_device_unregister() before the device is freed. The patch has been backported across stable branches in commits 14578c78, 4448a539, 4aed7e47, 8577a5ec, ac8ce9f8, cbb3310a, dc750422, and fc1f4884. Rebuild and redeploy custom kernels against the appropriate stable branch.

Workarounds

  • Avoid unloading dmaengine provider modules on production systems until a patched kernel is deployed
  • Disable or blacklist dmaengine providers that are not required for workload functionality to reduce attack surface
  • Where feasible, pin DMA provider modules in place through modprobe configuration to prevent runtime removal
bash
# Verify running kernel and confirm patched build is installed
uname -r

# Example: blacklist an unused dmaengine provider module (Debian/Ubuntu)
echo 'blacklist plx_dma' | sudo tee /etc/modprobe.d/disable-plx-dma.conf
sudo update-initramfs -u

# Example: check whether a dmaengine module is currently loaded
lsmod | grep -E 'dma|plx_dma'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.