CVE-2026-23248

perf/core: Fix refcount bug and potential UAF in perf_mmap

Published Mar 18, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

perf/core: Fix refcount bug and potential UAF in perf_mmap

Syzkaller reported a refcount_t: addition on 0; use-after-free warning
in perf_mmap.

The issue is caused by a race condition between a failing mmap() setup
and a concurrent mmap() on a dependent event (e.g., using output
redirection).

In perf_mmap(), the ring_buffer (rb) is allocated and assigned to
event->rb with the mmap_mutex held. The mutex is then released to
perform map_range().

If map_range() fails, perf_mmap_close() is called to clean up.
However, since the mutex was dropped, another thread attaching to
this event (via inherited events or output redirection) can acquire
the mutex, observe the valid event->rb pointer, and attempt to
increment its reference count. If the cleanup path has already
dropped the reference count to zero, this results in a
use-after-free or refcount saturation warning.

Fix this by extending the scope of mmap_mutex to cover the
map_range() call. This ensures that the ring buffer initialization
and mapping (or cleanup on failure) happens atomically effectively,
preventing other threads from accessing a half-initialized or
dying ring buffer.

Analysis

AI-generated

Technical impact

The flaw is a race condition in the Linux kernel’s perf_mmap implementation. When a mapping of a performance event fails during mmap(), the ring buffer is freed, but a concurrently executing mmap() can still acquire the event’s mutex, observe a valid event->rb pointer, and try to increment its reference count. Because the cleanup path may have already dropped the reference, this race can lead to a use‑after‑free or refcount saturation warning, potentially corrupting kernel memory or crashing the system. According to the description, the condition is identified by a warning in perf_mmap and depends on the ordering of two mmap() calls that access the same event.

Affected Systems

All Linux kernel deployments that contain the unpatched perf_mmap code path are affected. The CPE entries indicate that kernel versions up to at least 7.0‑rc1 are vulnerable; any other builds that include the same code base without the patch are also impacted.

Risk and Exploitability

The vulnerability has a CVSS score of 7.8, indicating high severity, and an EPSS score of less than 1%, suggesting a low probability of real‑world exploitation. It is not registered in the CISA KEV catalog, further indicating it is not a known actively exploited flaw. Exploitation would require local or privileged access to orchestrate the precise race between a failing and a succeeding mmap() call, making the attack vector local and non‑trivial. If successfully exploited, the impact could be a kernel crash or privilege escalation to the kernel context.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that includes the perf_mmap fix (the patch extends the mmap_mutex scope to prevent the race).
  • Reboot the system or restart any services that rely on performance events so the updated kernel becomes active.
  • If an immediate kernel upgrade is not possible, disable or restrict perf_event mappings for untrusted users, for example by setting the kernel parameter to restrict perf_event_open or by removing the capability to attach to performance events from non-privileged processes.

Generated by OpenCVE AI on October 19, 2026 at 21:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-9091-1 Linux kernel (NVIDIA Tegra) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-362
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Metrics cvssV3_1

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

cvssV3_1

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

Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Weaknesses CWE-416
CWE-665
Type Values Removed Values Added
Weaknesses CWE-416
CWE-665
Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: perf/core: Fix refcount bug and potential UAF in perf_mmap Syzkaller reported a refcount_t: addition on 0; use-after-free warning in perf_mmap. The issue is caused by a race condition between a failing mmap() setup and a concurrent mmap() on a dependent event (e.g., using output redirection). In perf_mmap(), the ring_buffer (rb) is allocated and assigned to event->rb with the mmap_mutex held. The mutex is then released to perform map_range(). If map_range() fails, perf_mmap_close() is called to clean up. However, since the mutex was dropped, another thread attaching to this event (via inherited events or output redirection) can acquire the mutex, observe the valid event->rb pointer, and attempt to increment its reference count. If the cleanup path has already dropped the reference count to zero, this results in a use-after-free or refcount saturation warning. Fix this by extending the scope of mmap_mutex to cover the map_range() call. This ensures that the ring buffer initialization and mapping (or cleanup on failure) happens atomically effectively, preventing other threads from accessing a half-initialized or dying ring buffer.
Title perf/core: Fix refcount bug and potential UAF in perf_mmap
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

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

  • CWE-416

    Use After Free

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 6:35 PM
Reserved
Jan 13, 2026, 3:37 PM
Status
Modified
Published
Mar 18, 2026, 11:16 AM
Modified
Oct 19, 2026, 7:17 PM
Severity
Moderate
Public date
Mar 18, 2026, 12:00 AM