GPU VulnDB

Database/Kernel, userspace & hypervisor

Linux kernel perf/core: a failed perf_mmap() still runs event_mapped, leaking the rdpmc reference count

CVSS 7.8CVE-2025-38565Kernel, userspace & hypervisorcurated

Impact

When perf_mmap() fails to allocate its buffer it still invoked the event's event_mapped() callback. On x86 that increments the perf_rdpmc_allowed reference counter, and because perf_mmap_close() is never reached in the failure case nothing ever decrements it - another reference-count leak. The practical consequence on an x86 GPU node is that user-space rdpmc stays enabled after the condition that was supposed to gate it has gone away, and the counter itself is permanently skewed; a local user who can force allocation failures can hold that state open. This is a distinct mechanism from the mapping-split leak fixed in the same perf release cycle, with its own commits, so it is tracked separately. The fix returns early on failure.

Who can reach it

Local user who can open a perf event and attempt to mmap its buffer, and can drive the allocation to fail (memory pressure or an oversized request). Reachable wherever perf_event_paranoid lets unprivileged users open events; no remote path.

What to do

Update to a stable kernel with the early-return fix and reboot each node - core perf code, so no module reload or runtime toggle applies. Interim mitigation is to tighten perf_event_paranoid on nodes that do not need unprivileged profiling. The record links only the upstream commits; no vendor advisory with a fixed version is present.

References

Related entries

All Kernel, userspace & hypervisor entries

This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.