CVEFinder.io

CVE-2025-38564

🔶 medium
Summary

In the Linux kernel, the following vulnerability has been resolved: perf/core: Handle buffer mapping fail correctly in perf_mmap() After successful allocation of a buffer or a successful attachment to an existing buffer perf_mmap() tries to map the buffer read only into the page table. If that fails, the already set up page table entries are zapped, but the other perf specific side effects of that failure are not handled. The calling code just cleans up the VMA and does not invoke perf_mmap_c

Description

In the Linux kernel, the following vulnerability has been resolved:

perf/core: Handle buffer mapping fail correctly in perf_mmap()

After successful allocation of a buffer or a successful attachment to an
existing buffer perf_mmap() tries to map the buffer read only into the page
table. If that fails, the already set up page table entries are zapped, but
the other perf specific side effects of that failure are not handled. The
calling code just cleans up the VMA and does not invoke perf_mmap_close().

This leaks reference counts, corrupts user->vm accounting and also results
in an unbalanced invocation of event::event_mapped().

Cure this by moving the event::event_mapped() invocation before the
map_range() call so that on map_range() failure perf_mmap_close() can be
invoked without causing an unbalanced event::event_unmapped() call.

perf_mmap_close() undoes the reference counts and eventually frees buffers.

CVSS Score
5.5
Medium
EPSS Score
0.0
Exploit Probability
Published Date
2025-08-19
First Seen: 2026-01-05
📊 Relative Risk Intelligence

This CVE is Lower Risk - more severe than 31.3% of all 370,241 vulnerabilities in our database.

#254,518
Below average severity
Severity Percentile
Last Modified 2025-11-28
Source NVD 🔗
CVSS Vector 3.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

📦 Affected Products 2

🔗 References 3

🔗 Related CVEs 6

CVE ID Severity CVSS EPSS Summary Published
CVE-2026-98164 ⚠️ high 7.1 0.2 In the Linux kernel, the following vulnerability has been resolved: KVM: x86/mmu: Check write tracking in all address s... 2026-09-29
CVE-2026-98163 ⚠️ high 7.8 0.1 In the Linux kernel, the following vulnerability has been resolved: cgroup: Avoid iteration of dying tasks with zero re... 2026-09-26
CVE-2026-98162 🔶 medium 5.5 0.1 In the Linux kernel, the following vulnerability has been resolved: smb/server: fix tree connection leak in smb2_tree_c... 2026-09-25
CVE-2026-98161 🔶 medium 5.5 0.1 In the Linux kernel, the following vulnerability has been resolved: nvdimm: pmem: keep PREFLUSH before data writes pme... 2026-09-25
CVE-2026-98160 🔶 medium 5.5 0.1 In the Linux kernel, the following vulnerability has been resolved: staging: rtl8723bs: fix mismatched free of HalData ... 2026-09-25
CVE-2026-100079 🔶 medium 5.5 0.1 In the Linux kernel, the following vulnerability has been resolved: usb: typec: ucsi: unregister debugfs entries on tea... 2026-09-25
These CVEs affect the same products