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

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

CVE-2026-98512 is a use-after-free flaw in the Linux kernel DRM Nouveau driver that enables unprivileged access to freed memory through SYNC_IOC_FILE_INFO. This post covers technical details, security 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-98512 Overview

CVE-2026-98512 is a use-after-free vulnerability in the Linux kernel's drm/nouveau driver. The flaw affects struct nouveau_sched, which embeds a struct drm_gpu_scheduler as its base. When nouveau_sched_destroy() frees the scheduler object with plain kfree(), previously exported DMA fences retain pointers to the freed memory. An unprivileged user can trigger the dangling access through the SYNC_IOC_FILE_INFO ioctl, which calls drm_sched_fence_get_timeline_name() and dereferences fence->sched->name. KASAN flags this as a slab-use-after-free read. The fix converts the free path to kfree_rcu() to honor the dma-fence lifetime contract, which requires exporters to keep signalled fence data alive for an RCU grace period.

Critical Impact

Local unprivileged users can trigger a kernel use-after-free read via SYNC_IOC_FILE_INFO on exported sync objects, enabling kernel memory disclosure and potential denial of service on systems using the nouveau GPU driver.

Affected Products

  • Linux kernel drm/nouveau subsystem (versions prior to the referenced stable commits)
  • Systems running NVIDIA GPUs on the open-source nouveau driver
  • Distributions shipping kernels with the vulnerable nouveau_sched destruction path

Discovery Timeline

  • 2026-10-18 - CVE-2026-98512 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98512

Vulnerability Analysis

The vulnerability resides in nouveau's GPU scheduler lifecycle management. struct nouveau_sched embeds struct drm_gpu_scheduler as its base member. During teardown, nouveau_sched_destroy() invokes nouveau_sched_fini() which runs drm_sched_fini(&sched->base), then releases the containing object through kfree(sched).

The DRM scheduler fence subsystem exposes drm_sched_fence_get_timeline_name(), which returns fence->sched->name. Because scheduler fences retain a .release callback, they are not ops-detached when they signal. A finished fence that was exported to userspace through drm_syncobj or sync_file continues to reference &sched->base after the scheduler object has been freed.

Unprivileged processes reach this stale pointer through the SYNC_IOC_FILE_INFO ioctl. The subsequent get_timeline_name() call dereferences the freed allocation, producing a KASAN slab-use-after-free read on affected builds.

Root Cause

The exporter violated the dma-fence lifetime contract. That contract requires any memory backing a signalled fence to remain valid for at least one RCU grace period after the fence is released. Nouveau freed the scheduler-containing object synchronously, leaving fences holding dangling sched pointers.

Attack Vector

A local unprivileged user with access to a nouveau-backed DRM device can submit GPU work, export the resulting fence via drm_syncobj or sync_file, induce scheduler destruction, and then invoke SYNC_IOC_FILE_INFO on the retained file descriptor. The read of freed memory can disclose kernel heap contents or destabilize the system. Full technical details are available in the referenced Kernel Git Commit cd6e11b.

Detection Methods for CVE-2026-98512

Indicators of Compromise

  • KASAN reports flagging slab-use-after-free in drm_sched_fence_get_timeline_name or adjacent nouveau scheduler symbols
  • Kernel oops or panic traces originating from SYNC_IOC_FILE_INFO ioctl handlers on nouveau-backed devices
  • Unexpected process crashes referencing drm_syncobj or sync_file operations on systems with NVIDIA GPUs using nouveau

Detection Strategies

  • Enable CONFIG_KASAN in test or canary kernels to surface use-after-free reads originating from the nouveau scheduler path
  • Audit kernel logs via journald or dmesg collection for stack traces containing nouveau_sched, drm_sched_fini, or get_timeline_name
  • Inventory hosts running the nouveau driver (lsmod | grep nouveau) and correlate kernel versions against the fixed stable commits

Monitoring Recommendations

  • Forward kernel ring buffer events to centralized logging and alert on KASAN or BUG signatures tied to DRM subsystems
  • Track per-host kernel versions in asset inventory and flag deviations from patched builds
  • Monitor for repeated DRM ioctl failures or process crashes that could indicate exploitation attempts

How to Mitigate CVE-2026-98512

Immediate Actions Required

  • Apply the upstream Linux kernel patches referenced in the stable commits and reboot affected systems
  • Prioritize patching on multi-user Linux hosts, shared workstations, and container hosts that expose DRM devices to unprivileged users
  • Restrict access to /dev/dri/* nodes where feasible until patched kernels are deployed

Patch Information

The fix replaces kfree(sched) with kfree_rcu() so the scheduler-containing object is released only after an RCU grace period, satisfying the dma-fence lifetime contract. Patched builds are available in the following stable kernel commits: Kernel Git Commit 35151e9, Kernel Git Commit 40edf5e, Kernel Git Commit cd6e11b, and Kernel Git Commit f7eae6d. Install the vendor-provided kernel update from your distribution once it incorporates these commits.

Workarounds

  • Blacklist the nouveau module on systems that do not require open-source NVIDIA graphics support until a patched kernel is installed
  • Switch to the proprietary NVIDIA driver stack on affected hosts where organizational policy permits
  • Limit DRM device access to trusted users by tightening group membership on the video and render groups

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.