perf: Fix use-after-free when perf mmap() revival races with the last munmap()
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 7 fixed, 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.
Summary
In the Linux kernel, the following vulnerability has been resolved: perf: Fix use-after-free when perf mmap() revival races with the last munmap() perf_mmap_close() drops rb->mmap_count *without* holding event->mmap_mutex (the refcount_dec_and_test() right before the refcount_dec_and_mutex_lock() of event->mmap_count). A concurrent perf_mmap_rb() can slot its entire "revival" path into that window (perf_mmap holds event->mmap_mutex for its whole duration, including rb_alloc): munmap side (perf_mmap_close) mmap side (perf_mmap_rb) ----------------------------------- -------------------------------- rb->mmap_count 1 -> 0 (no lock) (holds event->mmap_mutex) inc_not_zero(rb->mmap_count) fails ring_buffer_attach(event, NULL) rb_alloc() + attach new rb refcount_set(&event->mmap_count, 1) lock; event->mmap_count 1 -> 0 ring_buffer_attach(event, NULL) ring_buffer_put() -> frees the *new* rb The revival's refcount_set(&event->mmap_count, 1) is an invisible 1 -> 1 write: the close frees the just-revived buffer although the other process still has it mapped -- a page-level use-after-free allowing local privilege escalation to root by any unprivileged user (default kernel.perf_event_paranoid=2). Swap the order of the two counter updates: event->mmap_count is dropped first via refcount_dec_and_mutex_lock(), so its 1 -> 0 transition and the ring_buffer_attach() stay serialized with perf_mmap(). rb->mmap_count == 0 then implies every event using the buffer is detached already, so the result of the rb->mmap_count drop can gate the remaining teardown directly and detach_rest is no longer needed. An earlier fix for this race from Kyle Zeng and David Lee takes event->mmap_mutex around both counter updates [0]; here the not-last close stays lockless.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
- Fix · CNA Linux (Linux) Fixed in 6.18.52, 7.2.5, 7.3
Red Hat 1 advisory
- RHSA-2026:88477 Released 2026-10-23 · Red Hat rating Importantkernel security, bug fix, and enhancement update
- 10Base-SMTV kernel-modules-internal-6.12.0-211.68.1.el10_2
- Red Hat Enterprise Linux AppStream (v. 10) kernel-64k-debug-devel-6.12.0-211.68.1.el10_2, kernel-64k-debug-devel-matched-6.12.0-211.68.1.el10_2, kernel-64k-devel-6.12.0-211.68.1.el10_2 +12
- Red Hat Enterprise Linux BaseOS (v. 10) kernel-6.12.0-211.68.1.el10_2, kernel-64k-6.12.0-211.68.1.el10_2, kernel-64k-core-6.12.0-211.68.1.el10_2 +29
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) kernel-tools-libs-devel-6.12.0-211.68.1.el10_2, libperf-6.12.0-211.68.1.el10_2
- Red Hat Enterprise Linux Hidden (v. 10) kernel-modules-internal-6.12.0-211.68.1.el10_2
- Red Hat Enterprise Linux Real Time (v. 10) kernel-rt-6.12.0-211.68.1.el10_2, kernel-rt-64k-6.12.0-211.68.1.el10_2, kernel-rt-64k-core-6.12.0-211.68.1.el10_2 +21
- Red Hat Enterprise Linux Real Time for NFV (v. 10) kernel-rt-6.12.0-211.68.1.el10_2, kernel-rt-core-6.12.0-211.68.1.el10_2, kernel-rt-debug-6.12.0-211.68.1.el10_2 +9
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | — |
| 10Base-SMTV | Fixed | RHSA-2026:88477 |
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | RHSA-2026:88477 |
| Red Hat Enterprise Linux BaseOS (v. 10) | Fixed | RHSA-2026:88477 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) | Fixed | RHSA-2026:88477 |
| Red Hat Enterprise Linux Hidden (v. 10) | Fixed | RHSA-2026:88477 |
| Red Hat Enterprise Linux Real Time (v. 10) | Fixed | RHSA-2026:88477 |
| Red Hat Enterprise Linux Real Time for NFV (v. 10) | Fixed | RHSA-2026:88477 |
Not affected: 5 products
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Container Platform 5
Timeline
- 2026-10-02 Threatist record created from CVE-2026-89791
- 2026-10-03 Alias added: GHSA-3xg9-4g5f-3mp3
- 2026-10-07 Affected versions changed · Red Hat
- 2026-10-07 CVSS score added · Red Hat
- 2026-10-19 Fix available: Linux/[email protected] · CNA
- 2026-10-23 Fix available: RHSA-2026:88477 · Red Hat
- 2026-10-23 Fix available: 10Base-SMTV, Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux BaseOS (v. 10) +4 · Red Hat
- 2026-10-31 Affected versions changed · Red Hat
References
More Linux vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Incorrect authorization in Ubuntu linux kernel KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-89791 · CVE Program
- CVE-2026-89791 · NVD
- FIRST EPSS
- GHSA-3xg9-4g5f-3mp3 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-89791 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences