CVE-2025-37936: perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.

Published May 20, 2025
·
Updated

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

perf/x86/intel: KVM: Mask PEBSENABLE loaded for guest with vCPU's value.

When generating the MSRIA32PEBSENABLE value that will be loaded on VM-Entry to a KVM guest, mask the value with the vCPU's desired PEBSENABLE 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 excludehost 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 MSRIA32DSAREA, 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 evlistadddefault") (after which, perf kvm top effectively stopped using PEBS). The userspace side of perf creates a guest-only PEBS event, which intelguestgetmsrs() 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.

Affected Software

12 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=6.0<6.1.138
Linux Linux kernel>=6.2<6.6.90
Linux Linux kernel>=6.7<6.12.28
Linux Linux kernel>=6.13<6.14.6
Linux Linux kernel=6.15-rc1
Linux Linux kernel=6.15-rc2
Linux Linux kernel=6.15-rc3
Linux Linux kernel=6.15-rc4
Debian Debian Linux=11.0
Microsoft azl3 kernel 6.6.92.2-1
Microsoft azl3 kernel 6.6.85.1-4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel (KVM x86/pmu / perf x86/intel) to a version that resolves this vulnerability.

    Patch 854250329c02
  2. Upgrade

    Upgrade perf evlist to a version that resolves this vulnerability.

    Patch 7b100989b4f6

Event History

May 20, 2025
CVE Published
via MITRE·03:22 PM
Data Sourced
via MITRE·03:22 PM
DescriptionSeverity
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityAffected Software
Jul 11, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
SeverityAffected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2025-37936?

CVE-2025-37936 has been classified with a medium severity level due to its impact on KVM guest performance monitoring.

2

How do I fix CVE-2025-37936?

To fix CVE-2025-37936, ensure your Linux kernel is updated to the patched version that addresses this vulnerability.

3

What systems are affected by CVE-2025-37936?

CVE-2025-37936 affects various versions of the Linux kernel running KVM guests.

4

Can CVE-2025-37936 lead to a security breach?

While CVE-2025-37936 primarily affects performance monitoring, it can potentially be exploited to manipulate guest VM behavior.

5

When was CVE-2025-37936 first published?

CVE-2025-37936 was first published in the CVE database on its assigned date in 2025.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203