Description
In the Linux kernel, the following vulnerability has been resolved:

perf/core: Fix a refcount leak in attach_perf_ctx_data()

The attach_perf_ctx_data() can race on global and !global cases. The
global case is protected by global_ctx_data_rwsem and shares a single
reference count using perf_ctx_data.global field.

But when it races with !global case, it may miss to set the global field
and result in a reference count leak.

CPU1 CPU2
----------------------------------------------------------------
attach_task_ctx_data(.global=1) attach_task_ctx_data(.global=0)
cd1 = alloc_perf_ctx_data(); cd2 = alloc_perf_ctx_data();
// { .global = 0, .refcount = 1 };

try_cmpxchg(); // success,
// task->perf_ctx_data = cd2
try_cmpxhg(); // fail; old = cd2
refcount_inc_not_zero(&old->refcount); // success
// old.refcount = 2
free_perf_ctx_data(cd1);

Then later detach_global_ctx_data() will see the data but it's not
marked as global, so it won't call detach_task_ctx_data().
Published: 2026-10-18
Score: n/a
EPSS: n/a
KEV: No
Impact: Memory Leak leading to resource exhaustion
Action: Patch
AI Analysis

Impact

The function attach_perf_ctx_data() can experience a race between global and non‑global contexts, causing the global reference counter to be incorrectly incremented or decremented and leading to a reference count leak. The vulnerability is rooted in a missing lock protection in certain code paths and an improper handling of concurrent access to shared variables.

Affected Systems

All Linux kernel versions that include the perf subsystem’s attach_perf_ctx_data() path are potentially affected. The issue is present across all Linux distributions that ship the default kernel with this code; specific version ranges are not listed in the advisory.

Risk and Exploitability

Because no CVSS score or EPSS value is provided and the vulnerability is not listed in CISA’s KEV catalog, the severity remains unquantified. However, a persistent reference count leak can accumulate over time and eventually exhaust system memory, resulting in denial of service. The attack vector appears to be local, requiring kernel execution privileges, and an attacker would need to trigger repeated attach_perf_ctx_data() calls to exhaust resources. The impact is confined to the host system and its services.

Generated by OpenCVE AI on October 18, 2026 at 18:07 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel update that contains the perf refcount leak fix.
  • Reboot the system to load the updated kernel and ensure the new code is active.
  • If an upgrade cannot be performed immediately, temporarily disable the perf subsystem by setting perf_event_paranoid=3 via sysctl or adding a kernel boot parameter that limits perf usage to mitigate the race condition until a patch is applied.

Generated by OpenCVE AI on October 18, 2026 at 18:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 18 Oct 2026 18:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362
CWE-401

Sun, 18 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: perf/core: Fix a refcount leak in attach_perf_ctx_data() The attach_perf_ctx_data() can race on global and !global cases. The global case is protected by global_ctx_data_rwsem and shares a single reference count using perf_ctx_data.global field. But when it races with !global case, it may miss to set the global field and result in a reference count leak. CPU1 CPU2 ---------------------------------------------------------------- attach_task_ctx_data(.global=1) attach_task_ctx_data(.global=0) cd1 = alloc_perf_ctx_data(); cd2 = alloc_perf_ctx_data(); // { .global = 0, .refcount = 1 }; try_cmpxchg(); // success, // task->perf_ctx_data = cd2 try_cmpxhg(); // fail; old = cd2 refcount_inc_not_zero(&old->refcount); // success // old.refcount = 2 free_perf_ctx_data(cd1); Then later detach_global_ctx_data() will see the data but it's not marked as global, so it won't call detach_task_ctx_data().
Title perf/core: Fix a refcount leak in attach_perf_ctx_data()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-18T15:18:19.810Z

Reserved: 2026-09-25T10:25:14.356Z

Link: CVE-2026-98552

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:07.267

Modified: 2026-10-18T16:17:07.267

Link: CVE-2026-98552

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-18T18:15:15Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-401

    Missing Release of Memory after Effective Lifetime