CVE-2026-98552

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

Published Oct 18, 2026 CVSS 3.1 · 2.5 Low EPSS < 1% KEV · Not listed
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().

Analysis

AI-generated

Technical impact

The Linux kernel’s perf subsystem contains a race condition within attach_perf_ctx_data that can cause a reference count leak. When a global context allocation races with a non‑global context, the global refcount may be incorrectly incremented or left dangling, leading to a memory leak. The vulnerability relates to CWE-911. If an attacker can repeatedly trigger attach_perf_ctx_data, the leaking memory accumulates and can eventually exhaust system resources, causing a denial of service.

Affected Systems

All Linux kernel releases that include the default perf core code are potentially affected. The problem is present in the Linux kernel itself, regardless of distribution, because both vendor entries list Linux:Linux. No specific version range is documented in the advisory, so any kernel that still ships attach_perf_ctx_data without the upstream patch is at risk.

Risk and Exploitability

With a CVSS score of 2.5 and EPSS below 1%, the flaw is considered low‑severity and unlikely to be actively exploited in the wild. The vulnerability requires kernel‑level privileges, a conclusion inferred from the fact that attach_perf_ctx_data operates in kernel space, and thus the attack vector is local. Once exploited, an attacker could gradually deplete system memory, leading to service disruption. The issue is not listed in CISA’s KEV catalog, so there is no current evidence of large‑scale exploitation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a Linux kernel version that incorporates the patch for the perf refcount leak.
  • Reboot the system to load the updated kernel.
  • If an immediate kernel upgrade is not possible, disable the performance monitoring subsystem by setting perf_event_paranoid to 3 or by adding a boot parameter that limits perf usage until the patch is applied.

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-362
CWE-401
Type Values Removed Values Added
Weaknesses CWE-911
References
Metrics threat_severity

None

cvssV3_1

{'score': 2.5, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L'}

threat_severity

Low

Type Values Removed Values Added
Weaknesses CWE-362
CWE-401
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
Weaknesses
  • CWE-911

    Improper Update of Reference Count

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:21 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 18, 2026, 4:17 PM
Modified
Oct 19, 2026, 10:19 AM
Severity
Low
Public date
Oct 18, 2026, 12:00 AM