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

CVE-2026-97581: Linux Kernel HEVC Buffer Overflow Vulnerability

CVE-2026-97581 is a buffer overflow flaw in the Linux kernel Hantro HEVC driver that could allow memory corruption. This post explains its technical details, affected versions, impact, and mitigation steps.

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-97581 Overview

CVE-2026-97581 affects the Linux kernel's Verisilicon Hantro video decoder driver. The flaw resides in the prepare_tile_info_buffer() function within the G2 HEVC decoding path. The function writes one entry per tile into a DMA buffer sized according to the Picture Parameter Set (PPS) uAPI array capacity. Without bounded iteration, the loop can exceed buffer capacity and corrupt adjacent memory. The fix replaces the raw tile count with the bounded v4l2_hevc_pps_num_tile_columns() and v4l2_hevc_pps_num_tile_rows() helpers, keeping writes within the allocated DMA region.

Critical Impact

A local user with access to the Hantro V4L2 decoder interface can trigger out-of-bounds writes to kernel DMA memory by supplying crafted HEVC tile parameters.

Affected Products

  • Linux kernel builds including the Verisilicon Hantro media driver
  • Platforms using the Hantro G2 HEVC hardware decoder (V4L2 stateless HEVC)
  • Distributions that have not merged the upstream stable patches referenced in the advisory

Discovery Timeline

  • 2026-09-25 - CVE-2026-97581 published to the National Vulnerability Database
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97581

Vulnerability Analysis

The vulnerability is an out-of-bounds write in the Hantro G2 HEVC tile preparation routine. During High Efficiency Video Coding (HEVC) decoding, the driver iterates over the tile grid described by the PPS supplied through the V4L2 stateless uAPI. For each tile, prepare_tile_info_buffer() writes a size entry into the tile_sizes DMA buffer that was allocated based on the maximum PPS array capacity. If the loop counters exceed that capacity, the writes land outside the buffer. This is a classic bounded-buffer violation [CWE-787] in a kernel driver that processes user-controlled parameters. The upstream resolution routes the tile counts through v4l2_hevc_pps_num_tile_columns() and v4l2_hevc_pps_num_tile_rows(), which clamp the values to the uAPI-defined maximums before the loop runs.

Root Cause

The driver trusted PPS field values directly instead of using the bounded accessor helpers introduced for the V4L2 HEVC stateless interface. When the attacker-controlled tile row or column count exceeded the uAPI array capacity, the per-iteration write to tile_sizes walked past the end of the DMA buffer.

Attack Vector

Exploitation requires local access to the V4L2 decoder device node, typically /dev/videoN, with permissions to submit HEVC decode requests. An attacker crafts a PPS control structure that reports tile dimensions larger than the uAPI-defined maximums. When the driver prepares the tile info buffer, the loop writes past the DMA region, producing kernel memory corruption that can be leveraged for denial of service or further privilege escalation depending on the surrounding memory layout.

No verified public exploit code is available. The vulnerability mechanism is documented in the upstream kernel commits referenced below rather than through a standalone proof of concept.

Detection Methods for CVE-2026-97581

Indicators of Compromise

  • Kernel log entries referencing memory corruption, slab-out-of-bounds, or KASAN reports originating from the hantro or hantro_g2_hevc_dec modules
  • Unexpected process crashes or kernel oops traces during HEVC decode operations on Hantro-equipped hardware
  • Unprivileged processes opening /dev/videoN nodes and submitting HEVC stateless controls with abnormal tile dimensions

Detection Strategies

  • Enable KASAN (Kernel Address Sanitizer) on test or canary systems to surface out-of-bounds writes in prepare_tile_info_buffer()
  • Audit loaded kernel modules for hantro presence using lsmod and correlate with the installed kernel version against the patched stable branches
  • Monitor syslog and dmesg output for stack traces that include prepare_tile_info_buffer or hantro_g2_hevc_dec

Monitoring Recommendations

  • Track access to V4L2 decoder device nodes using Linux audit rules on /dev/video*
  • Alert on kernel panics or soft lockups on edge, embedded, and media-processing hosts that ship the Hantro driver
  • Inventory kernel versions across the fleet and flag hosts running unpatched builds that load the hantro module

How to Mitigate CVE-2026-97581

Immediate Actions Required

  • Apply the stable kernel updates that include the referenced Hantro tile-bound commits
  • On systems where the Hantro decoder is not required, unload the module with modprobe -r hantro and blocklist it from autoload
  • Restrict access to /dev/video* nodes to trusted users and groups through udev rules or filesystem permissions

Patch Information

The fix is distributed across four upstream commits that add bounded helper usage in prepare_tile_info_buffer():

Update to a distribution kernel package that incorporates these backports, then reboot to activate the patched driver.

Workarounds

  • Blocklist the hantro module on hosts that do not require hardware HEVC decoding
  • Tighten permissions on V4L2 device nodes so only vetted service accounts can open the decoder
  • Where feasible, disable HEVC decode paths in userspace media stacks until the kernel patch is deployed
bash
# Block the Hantro module and restrict decoder device access
echo 'blacklist hantro' | sudo tee /etc/modprobe.d/blacklist-hantro.conf
sudo modprobe -r hantro 2>/dev/null || true
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.