CVE-2025-37936
perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.
Reported by linux · Published May 20, 2025
In the Linux kernel, the following vulnerability has been resolved: perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value. When generating the MSR_IA32_PEBS_ENABLE value that will be loaded on VM-Entry to a KVM guest, mask the value with the vCPU's desired PEBS_ENABLE value. Consulting only the host kernel's host vs. guest masks results in running the guest with PEBS enabled even when the guest doesn't want to use PEBS. Because KVM uses perf events to proxy the guest virtual PMU, simply looking at exclude_host can't differentiate between events created by host userspace, and events created by KVM on behalf of the guest. Running the guest with PEBS unexpectedly enabled typically manifests as crashes due to a near-infinite stream of #PFs. E.g. if the guest hasn't written MSR_IA32_DS_AREA, the CPU will hit page faults on address '0' when trying to record PEBS events. The issue is most easily reproduced by running `perf kvm top` from before commit 7b100989b4f6 ("perf evlist: Remove __evlist__add_default") (after which, `perf kvm top` effectively stopped using PEBS). The userspace side of perf creates a guest-only PEBS event, which intel_guest_get_msrs() misconstrues a guest-*owned* PEBS event. Arguably, this is a userspace bug, as enabling PEBS on guest-only events simply cannot work, and userspace can kill VMs in many other ways (there is no danger to the host). However, even if this is considered to be bad userspace behavior, there's zero downside to perf/KVM restricting PEBS to guest-owned events. Note, commit 854250329c02 ("KVM: x86/pmu: Disable guest PEBS temporarily in two rare situations") fixed the case where host userspace is profiling KVM *and* userspace, but missed the case where userspace is profiling only KVM.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| perf6.12 | Amazon Linux | 6.12.29-33.102.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.140-154.222.amzn2023 |
| kernel-libbpf-devel | Amazon Linux | 6.1.140-154.222.amzn2023 |
| kernel6.12 | Amazon Linux | 6.12.29-33.102.amzn2023 |
| linux_kernel | linux | 6.14.6, 6.12.28, 6.6.90, 6.1.138 |
| Linux | Linux | 86aa62895fc2fb7ab09d7ca40fae8ad09841f66b, 6.0, 58f6217e5d0132a9f14e401e62796916aa055c1b, 44ee0afc9d1e7a7c1932698de01362ed80cfc4b5, 34b6fa11431aef71045ae5a00d90a7d630597eda, 160153cf9e4aa875ad086cc094ce34aac8e13d63 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | c59a1f106f5cd4843c097069ff1bb2ad72103a67, c59a1f106f5cd4843c097069ff1bb2ad72103a67, c59a1f106f5cd4843c097069ff1bb2ad72103a67 |
| Linux | Linux | 6.0, 0, 6.1.138 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel6.12 | 0 |
| Linux | Linux | 6.1.138, *, 6.14.6 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-livepatch-6.1.140-154.222 | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
…and 3 more
Timeline
- May 20, 2025 CVE Published
- May 21, 2025 EPSS Score (30 in total, the first dated here)
- Oct 12, 2025 PoC Published (6 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (217 in total, the first dated here)
- Mar 29, 2026 Security Advisory (225 in total, the first dated here)
- Jun 9, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-37936
vulnetix vdb fixes CVE-2025-37936
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-2025-37936/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart