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

CVE-2026-98552: Linux Kernel Race Condition Vulnerability

CVE-2026-98552 is a race condition flaw in Linux kernel perf/core that causes refcount leaks in attach_perf_ctx_data(). This article covers the technical details, affected versions, impact, and mitigation.

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

CVE-2026-98552 is a race condition in the Linux kernel's perf/core subsystem. The flaw resides in attach_perf_ctx_data(), which can race between the global and non-global allocation paths. When concurrent callers invoke the function with different .global arguments, the kernel may miss setting the global field on perf_ctx_data, producing a reference count leak. The leaked reference prevents detach_global_ctx_data() from calling detach_task_ctx_data(), leaving kernel memory pinned. Upstream maintainers resolved the issue through three stable kernel commits referenced in the kernel.org advisories.

Critical Impact

Concurrent attach_task_ctx_data() calls can leak perf_ctx_data reference counts, causing kernel memory to remain allocated after task teardown.

Affected Products

  • Linux kernel (upstream perf/core subsystem)
  • Stable kernel branches patched by commits 23250517, 5286d4eb, and cca49806
  • Distributions shipping the vulnerable attach_perf_ctx_data() implementation

Discovery Timeline

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

Technical Details for CVE-2026-98552

Vulnerability Analysis

The vulnerability is a race condition in the Linux kernel performance events subsystem. attach_perf_ctx_data() manages perf_ctx_data structures attached to tasks for performance monitoring. The function supports two allocation modes controlled by the .global parameter. The global path is serialized by global_ctx_data_rwsem and shares a single reference count via the perf_ctx_data.global field. The non-global path operates without that serialization.

When a global caller races with a non-global caller, the try_cmpxchg() sequence may succeed for the non-global path first. The global caller then observes the newly installed data and increments its reference count through refcount_inc_not_zero(). However, the global field is never set on the installed structure. Later, detach_global_ctx_data() finds the data but skips detach_task_ctx_data() because the structure is not marked as global, leaving the reference count permanently elevated.

Root Cause

The root cause is an atomicity gap between installing a perf_ctx_data structure and marking its global field. The two steps are not performed as a single atomic operation, so concurrent paths can observe an inconsistent state where ownership metadata disagrees with the actual lifecycle requirements.

Attack Vector

Triggering the condition requires local code that can invoke performance event attachment paths concurrently with different .global arguments. Successful exploitation produces a slow kernel memory leak rather than direct code execution. Repeated triggering could contribute to resource exhaustion on long-running systems.

// See the upstream patch for the exact fix implementation.
// Reference: https://git.kernel.org/stable/c/23250517cd475367653f1e99396967f54c6f1b7c

Detection Methods for CVE-2026-98552

Indicators of Compromise

  • Unexplained growth in slab allocations associated with perf_ctx_data structures over time
  • Elevated kernel memory usage on hosts running sustained perf workloads with mixed global and task-scoped events
  • kmemleak reports pointing to allocations from alloc_perf_ctx_data()

Detection Strategies

  • Compare running kernel version and build metadata against the fixed commits 23250517, 5286d4eb, and cca49806
  • Enable CONFIG_DEBUG_KMEMLEAK on test systems to surface leaked perf_ctx_data allocations
  • Track long-term trends in /proc/slabinfo for performance subsystem caches

Monitoring Recommendations

  • Monitor kernel memory consumption on hosts that run multi-tenant workloads using perf_event_open()
  • Alert on sustained upward drift in slab usage without a corresponding workload increase
  • Review audit logs for processes invoking performance event syscalls at high frequency

How to Mitigate CVE-2026-98552

Immediate Actions Required

  • Apply the stable kernel updates containing commits 23250517, 5286d4eb, and cca49806
  • Reboot affected systems after installing the patched kernel package
  • Prioritize patching on long-running hosts where leaked memory accumulates

Patch Information

The fix is distributed through three upstream commits on the stable kernel tree. Downstream distribution kernels should pick up the backport in their next scheduled security release. Confirm the installed kernel includes the attach_perf_ctx_data() refcount fix before closing remediation tickets.

Workarounds

  • Restrict access to perf_event_open() by setting kernel.perf_event_paranoid to a higher value such as 2 or 3
  • Limit unprivileged use of performance counters through CAP_PERFMON capability controls
  • Schedule periodic reboots on exposed systems until the patched kernel is deployed
bash
# Reduce exposure by tightening perf_event access
sysctl -w kernel.perf_event_paranoid=3
echo 'kernel.perf_event_paranoid=3' >> /etc/sysctl.d/99-perf-hardening.conf

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.