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

CVE-2026-97513: Linux Kernel Wave5 Use-After-Free Vulnerability

CVE-2026-97513 is a use-after-free flaw in the Linux kernel wave5 media driver that can cause null pointer dereference through race conditions. This article covers the 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-97513 Overview

CVE-2026-97513 is a use-after-free vulnerability in the Linux kernel's chips-media/wave5 video codec driver [CWE-416]. The flaw exists in the memory-to-memory (M2M) context release path, where the driver frees the m2m_ctx structure before removing the stream instance from the list of active instances. An interrupt request (IRQ) thread can acquire the spinlock between these two operations and dereference the freed context, causing a null pointer dereference or memory corruption.

A local, authenticated attacker with access to the Wave5 video device can trigger this race condition to crash the kernel or potentially escalate privileges.

Critical Impact

Local attackers can exploit the race window to achieve use-after-free in kernel space, enabling denial of service and potential local privilege escalation on affected Linux systems.

Affected Products

  • Linux kernel versions containing the chips-media/wave5 media driver prior to the fix
  • Distributions shipping vulnerable stable kernel branches
  • Embedded systems and SoCs using Chips&Media Wave5 video codec hardware

Discovery Timeline

  • 2026-09-24 - CVE-2026-97513 published to the National Vulnerability Database (NVD)
  • 2026-09-28 - Last updated in NVD database

Technical Details for CVE-2026-97513

Vulnerability Analysis

The wave5 driver in the Linux kernel manages video encode and decode streams through V4L2 memory-to-memory contexts. Each active stream is tracked both by its m2m_ctx structure and by an entry in a per-device list of active instances protected by a spinlock.

During instance teardown, the wave5_release function releases the m2m_ctx before removing the stream instance from the active list. The driver's IRQ handler iterates the active instances list under the spinlock and looks up the associated m2m_ctx to process completion events. If the IRQ thread acquires the spinlock between the m2m_ctx release and the list removal, it dereferences a freed pointer.

The fix reorders operations so the instance is removed from the active list before m2m_ctx is released, closing the race window.

Root Cause

The root cause is incorrect ordering of resource teardown operations in wave5_release. The driver violates the invariant that an object must not be reachable through any shared data structure after it has been freed. Because the active instances list and the IRQ handler run concurrently with release, freeing m2m_ctx before unlinking the instance creates a time-of-check to time-of-use (TOCTOU) window exploitable by concurrent interrupt handling.

Attack Vector

Exploitation requires local access and the ability to open the Wave5 V4L2 device node. An attacker opens an encode or decode session, then closes it while the device is actively generating interrupts. By repeatedly racing the close path against hardware interrupt delivery, the attacker can land the IRQ handler inside the vulnerable window. Successful exploitation yields a dereference of freed kernel memory, which can be converted to arbitrary read, write, or control-flow hijack depending on heap state and kernel hardening.

See the upstream fix at Linux Kernel Patch and the follow-up Linux Kernel Commit Update for the exact code changes.

Detection Methods for CVE-2026-97513

Indicators of Compromise

  • Kernel oops or panic messages referencing wave5, m2m_ctx, or v4l2_m2m in dmesg or /var/log/kern.log
  • KASAN use-after-free reports pointing to wave5_release or the Wave5 IRQ handler path
  • Unexpected crashes of userspace video encode or decode processes followed by driver resets

Detection Strategies

  • Enable CONFIG_KASAN on test and staging kernels to surface the use-after-free deterministically
  • Monitor kernel ring buffer events for repeated faults originating in drivers/media/platform/chips-media/wave5
  • Audit which local users and services have access to /dev/video* nodes exposed by the Wave5 driver

Monitoring Recommendations

  • Forward kernel.* syslog facility and journalctl -k output to a centralized logging platform for correlation
  • Alert on kernel panic, oops, and KASAN report signatures from hosts running the Wave5 driver
  • Track process open and close patterns against V4L2 device nodes to identify abnormal race-style access bursts

How to Mitigate CVE-2026-97513

Immediate Actions Required

  • Apply the upstream kernel patches referenced in the Linux stable tree and rebuild or update affected kernels
  • Restrict access to Wave5 V4L2 device nodes to trusted users and service accounts only
  • Inventory embedded and SoC-based systems that integrate Chips&Media Wave5 hardware and prioritize them for patching

Patch Information

The vulnerability is resolved by commits 04cda0b5c4ca and 7cdbd7bb2194 in the Linux stable tree. The fix removes the stream instance from the active instances list before releasing m2m_ctx, eliminating the race window. Deploy kernels incorporating these commits from your distribution vendor as they become available.

Workarounds

  • Unload the wave5 kernel module on systems that do not require hardware video codec acceleration using modprobe -r wave5
  • Blacklist the module by adding blacklist wave5 to /etc/modprobe.d/blacklist-wave5.conf to prevent autoload
  • Tighten permissions on /dev/video* nodes via udev rules so only authorized groups can open the device
bash
# Prevent the vulnerable module from loading at boot
echo "blacklist wave5" | sudo tee /etc/modprobe.d/blacklist-wave5.conf
sudo modprobe -r wave5

# Restrict access to V4L2 device nodes
sudo chown root:video /dev/video*
sudo chmod 0660 /dev/video*

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.