VDB

CVE-2026-89791

CVE-2026-89791 PUBLISHED CVSS 7.8 HIGH

perf: Fix use-after-free when perf mmap() revival races with the last munmap()

Reported by linux · Published September 16, 2026

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.

EPSS 0.18% · 8.0th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-rt-64k-debug-coreerrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.aarch64
kernel-rt-debug-modules-coreerrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.x86_64
kernel-toolserrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.aarch64
kernel-rt-64k-modules-extraerrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.aarch64
kernel-docerrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.noarch
kernel-rt-64k-coreerrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.aarch64
kernel-rt-debugerrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.aarch64
perf-debuginfoerrata.rockylinux.org6.12.0-211.68.1.el10, 0:6.12.0-211.68.1.el10_2.s390x

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score
0.18%
8.0th percentile

Affected products

VendorProductVersions
LinuxLinux59741451b49ce9964a9758c19d6f7df2a1255c75, 59741451b49ce9964a9758c19d6f7df2a1255c75, 59741451b49ce9964a9758c19d6f7df2a1255c75
LinuxLinux6.18, 0, 6.18.52
linuxlinux_kernel6.18, 6.18, 6.18
amazon:2023kernel6.18-modules-extra0
amazon:2023kernel6.180
LinuxLinux0, 6.18, 7.2.5
amazon:2023bpftool6.180
amazon:2023kernel6.18-headers0
amazon:2023kernel6.18-devel0
amazon:2023kernel6.18-tools0
amazon:2023python3-perf6.180
amazon:2023kernel6.18-tools-devel0
amazon:2023kernel-livepatch-6.18.54-121.1660
amazon:2023microvm-kernel6.180
amazon:2023perf6.180
amazon:2023kernel6.18-modules-extra-common0

Timeline

  • Sep 16, 2026 EPSS Score (11 in total, the first dated here)
  • Sep 16, 2026 CVE Published
  • Oct 19, 2026 CVE Updated
  • Oct 23, 2026 Distribution Patch (3 in total, the first dated here)
  • Oct 23, 2026 Security Advisory (3 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-89791
vulnetix vdb fixes CVE-2026-89791

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-89791/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›