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

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

CVE-2026-98268 is a use-after-free flaw in the Linux kernel perf subsystem that causes null pointer dereference during module unload. This article covers the technical details, affected versions, 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-98268 Overview

CVE-2026-98268 is a null pointer dereference vulnerability in the Linux kernel's performance monitoring (perf) subsystem. The flaw resides in the is_include_guest_event() function and can be triggered when a module unload occurs while an active perf connection exists. The sequence frees the Performance Monitoring Unit (PMU) pointer through __pmu_detach_event(), which sets event->pmu to null. When the perf connection later closes, _free_event() invokes mediated_pmu_unaccount_event(), which accesses the freed pointer and produces a general protection fault.

Critical Impact

A local trigger involving module unload during an active perf session causes a kernel null pointer dereference, resulting in a denial-of-service crash.

Affected Products

  • Linux kernel (perf subsystem)
  • Distributions shipping the affected mainline kernel revisions
  • Systems using mediated PMU accounting for guest events

Discovery Timeline

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

Technical Details for CVE-2026-98268

Vulnerability Analysis

The defect is a kernel null pointer dereference [CWE-476] in the perf event lifecycle. When a module providing a PMU is unloaded while a perf file descriptor remains open, the kernel invokes perf_pmu_unregister(), which calls down into pmu_detach_events(), pmu_detach_event(), and ultimately __pmu_detach_event(). That function clears event->pmu to null to mark the event as detached from its PMU.

The event structure itself persists until the user space holder releases its reference. On release, perf_release() calls perf_event_release_kernel(), which calls _free_event(). Inside _free_event(), the kernel invokes mediated_pmu_unaccount_event(), which in turn calls is_include_guest_event(). That helper dereferences event->pmu without a null check, triggering a general protection fault with the signature RIP: 0010:_free_event+0x3e/0x370.

Root Cause

The root cause is missing null validation inside is_include_guest_event() combined with an ordering issue in event teardown. The detach path cleared the PMU pointer before mediated accounting had a chance to decrement nr_include_guest_events. Any subsequent accounting operation on the detached event dereferenced a null pointer.

Attack Vector

The condition is reachable locally by any workflow that opens a perf event against a PMU exposed by a loadable module and then unloads that module while the event remains referenced. The crash occurs when the final descriptor referencing the event is closed. The result is a kernel panic that denies service to the host.

No verified public exploit code is available. See the upstream fixes at Kernel Git Commit 7fa9a465 and Kernel Git Commit 88aed042 for the authoritative source-level description.

Detection Methods for CVE-2026-98268

Indicators of Compromise

  • Kernel log entries containing general protection fault with kernel NULL pointer dereference and a faulting instruction pointer inside _free_event.
  • Oops stack traces that include perf_event_release_kernel, perf_release, and _free_event frames.
  • Unexpected host crashes or reboots correlated with module unload activity (rmmod, modprobe -r) on systems running perf consumers.

Detection Strategies

  • Monitor /var/log/kern.log, dmesg, and journalctl -k for Oops signatures that match the call chain above.
  • Correlate kernel crash telemetry with recent init_module/delete_module syscalls and active perf_event_open file descriptors.
  • Track installed kernel package versions against the fix commits to identify unpatched hosts.

Monitoring Recommendations

  • Forward kernel crash dumps and kdump artifacts to a central log store for signature analysis.
  • Alert on repeated kernel panics on the same host, which may indicate a reproducible trigger rather than a transient fault.
  • Audit which users and services hold perf descriptors on systems that permit non-root module management.

How to Mitigate CVE-2026-98268

Immediate Actions Required

  • Apply the upstream kernel fixes referenced in Kernel Git Commit 7fa9a465 and Kernel Git Commit 88aed042 through your distribution's stable kernel update.
  • Restrict module load and unload capabilities to trusted administrators by enforcing CAP_SYS_MODULE boundaries.
  • Limit unprivileged use of perf_event_open by setting kernel.perf_event_paranoid to a restrictive value.

Patch Information

The fix adds a null pointer check inside is_include_guest_event() and reorders event teardown so mediated_pmu_unaccount_event() runs before event->pmu is cleared. This preserves correct nr_include_guest_events accounting and prevents the dereference. Patched kernels are available through the mainline and stable trees via the referenced commits.

Workarounds

  • Avoid unloading kernel modules that expose PMUs while perf consumers hold open file descriptors.
  • Tighten kernel.perf_event_paranoid using sysctl to reduce the exposure surface for unprivileged perf usage.
  • Where feasible, block runtime module unload operations on production hosts until patched kernels are deployed.
bash
# Configuration example
# Restrict unprivileged perf usage and verify kernel version
sudo sysctl -w kernel.perf_event_paranoid=3
echo 'kernel.perf_event_paranoid=3' | sudo tee /etc/sysctl.d/99-perf.conf
uname -r

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.