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

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

CVE-2026-97604 is a use-after-free flaw in the Linux kernel fbdev subsystem that can cause memory corruption when concurrent operations access freed colormap data. This article covers technical details, impact assessment, 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-97604 Overview

CVE-2026-97604 is a use-after-free vulnerability in the Linux kernel's virtual framebuffer (vfb) driver. The flaw occurs because vfb_remove() frees the framebuffer colormap immediately after unregistering the device, even when an open file descriptor still references fb_info. A concurrent FBIOGETCMAP ioctl takes a shallow snapshot of info->cmap and performs the usercopy after dropping info->lock, allowing a driver unbind to free the colormap mid-copy. KASAN reports a slab use-after-free read of 512 bytes in _copy_to_user via fb_cmap_to_user.

Critical Impact

A local attacker triggering a driver unbind concurrent with an FBIOGETCMAP ioctl can cause a kernel use-after-free, resulting in information disclosure or kernel memory corruption.

Affected Products

  • Linux kernel fbdev subsystem, virtual framebuffer driver (drivers/video/fbdev/vfb.c)
  • Kernel builds exposing vfb with the FBIOGETCMAP ioctl path in drivers/video/fbdev/core/fbcmap.c
  • Stable kernel branches fixed by commits 3c91e51, 5ff1eff, 86356f1, and a0a34a4

Discovery Timeline

  • 2026-09-25 - CVE-2026-97604 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97604

Vulnerability Analysis

The vfb driver allocates a colormap during vfb_probe() through fb_alloc_cmap_gfp(). When userspace issues the FBIOGETCMAP ioctl, do_fb_ioctl() reaches fb_cmap_to_user(), which copies the colormap to userspace with _copy_to_user() after releasing info->lock. The ioctl handler operates on a shallow snapshot of info->cmap rather than a stable copy.

Concurrently, a driver unbind invokes vfb_remove(), which calls unregister_framebuffer() and then fb_dealloc_cmap(). The dealloc path frees the colormap backing storage even while another task still holds an open reference to fb_info. The window between dropping info->lock and completing _copy_to_user is sufficient for the free to race, producing the KASAN slab-use-after-free.

Root Cause

The root cause is lifetime mismanagement between fb_info reference counting and resource cleanup. unregister_framebuffer() only drops the registration reference, and fbdev invokes fb_destroy after the final put_fb_info(). The vfb driver incorrectly released the colormap and screen buffer in vfb_remove() instead of deferring the free to an fb_destroy callback, breaking the invariant that resources accessible via an open file remain valid until the last reference is released.

Attack Vector

Exploitation requires local access with the ability to open the /dev/fb* device and trigger a driver unbind through sysfs. An attacker opens the framebuffer, repeatedly calls FBIOGETCMAP, and simultaneously writes to the vfb driver's unbind attribute. The race between the usercopy and fb_dealloc_cmap() leaks stale heap bytes or, if the slab is reused, corrupts attacker-chosen kernel memory during the copy.

The fix moves fb_dealloc_cmap() and screen buffer release into an fb_destroy callback. See the upstream commits 3c91e51, 5ff1eff, 86356f1, and a0a34a4 for the resolved patches.

Detection Methods for CVE-2026-97604

Indicators of Compromise

  • KASAN kernel log entries reporting slab-use-after-free in _copy_to_user with call stacks referencing fb_cmap_to_user and do_fb_ioctl
  • Unexpected vfb driver unbind events in sysfs audit logs correlated with processes holding open file descriptors on /dev/fb*
  • Kernel oops or panic traces originating from the fbdev colormap code path

Detection Strategies

  • Enable KASAN on test and staging kernels to surface the use-after-free during fuzzing of FBIOGETCMAP
  • Audit kernel builds for the presence of the fix by checking for an fb_destroy callback in drivers/video/fbdev/vfb.c
  • Monitor for unprivileged processes issuing framebuffer ioctls on systems where vfb is loaded but not required

Monitoring Recommendations

  • Collect kernel ring buffer (dmesg) output centrally and alert on KASAN or UAF signatures
  • Track write operations to /sys/bus/platform/drivers/vfb/unbind and similar driver-binding paths
  • Correlate framebuffer device opens with subsequent driver unbind attempts from the same session

How to Mitigate CVE-2026-97604

Immediate Actions Required

  • Apply the upstream kernel patches referenced in commits 3c91e51, 5ff1eff, 86356f1, and a0a34a4 to all affected branches
  • Unload the vfb module on production systems where virtual framebuffer support is not required
  • Restrict write access to driver bind/unbind sysfs attributes to privileged administrative accounts only

Patch Information

The fix defers cleanup of the colormap and screen buffer to an fb_destroy callback, ensuring resources remain valid until the final put_fb_info(). Distributions should backport the stable commits listed in the external references. Rebuild and reboot into the patched kernel to activate the fix.

Workarounds

  • Blacklist the vfb module via /etc/modprobe.d/ on systems that do not require virtual framebuffer functionality
  • Remove world-writable permissions on framebuffer device nodes and tighten udev rules for /dev/fb*
  • Disable unprivileged access to sysfs driver-binding interfaces through SELinux or AppArmor policy
bash
# Configuration example: disable the vfb module
echo 'blacklist vfb' | sudo tee /etc/modprobe.d/disable-vfb.conf
sudo rmmod vfb 2>/dev/null || true
sudo update-initramfs -u

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.