CVE-2025-37936: Vulnerability in Linux Linux
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.
AI Analysis
Technical Summary
CVE-2025-37936 is a vulnerability identified in the Linux kernel's handling of the Performance Monitoring Unit (PMU) events within Kernel-based Virtual Machine (KVM) guests on x86 Intel architectures. Specifically, the issue arises from improper masking of the MSR_IA32_PEBS_ENABLE Model-Specific Register (MSR) value that is loaded during VM-Entry for a KVM guest's virtual CPU (vCPU). The vulnerability stems from the kernel consulting only the host's mask values when enabling Precise Event-Based Sampling (PEBS) for guest virtual machines, without properly considering the guest's requested PEBS_ENABLE settings. This results in the guest VM running with PEBS enabled even if it did not request it. Because KVM proxies guest PMU events through the host's perf subsystem, the kernel cannot distinguish between events created by host userspace and those created on behalf of the guest. Consequently, if PEBS is enabled unexpectedly, the guest may experience near-infinite page faults (#PFs), particularly if it has not initialized MSR_IA32_DS_AREA, which PEBS uses to record events. This leads to guest crashes and instability. The issue is reproducible by running the `perf kvm top` command on affected kernel versions prior to the fix, where userspace creates guest-only PEBS events that the kernel misattributes. Although this behavior can be viewed as a userspace bug—since enabling PEBS on guest-only events is inherently problematic—the kernel patch restricts PEBS usage to guest-owned events to prevent such crashes. The vulnerability does not pose a risk to the host system but can cause denial of service within guest VMs. The fix involves proper masking of the PEBS_ENABLE MSR value with the vCPU's desired settings during VM-Entry, preventing unintended PEBS activation. This vulnerability affects Linux kernel versions identified by the commit hash c59a1f106f5cd4843c097069ff1bb2ad72103a67 and was published on May 20, 2025. No known exploits are currently reported in the wild, and no CVSS score has been assigned.
Potential Impact
For European organizations utilizing Linux-based virtualization environments, particularly those deploying KVM for guest virtual machines on Intel x86 hardware, this vulnerability can lead to guest VM instability and crashes due to unexpected PEBS activation. The primary impact is denial of service within affected guest VMs, which can disrupt critical workloads, testing environments, or production services running inside virtual machines. While the host system remains unaffected, the inability to reliably run guest VMs can degrade service availability and increase operational overhead. Organizations relying on performance monitoring tools like 'perf' in conjunction with KVM may inadvertently trigger this issue, complicating performance analysis and debugging efforts. The impact is more pronounced in environments with high virtualization density or those running sensitive applications inside VMs that do not initialize PEBS-related MSRs properly. Although no direct confidentiality or integrity compromise is evident, the availability impact on guest VMs can have cascading effects on business continuity, especially in sectors such as finance, telecommunications, and cloud service providers prevalent in Europe.
Mitigation Recommendations
To mitigate CVE-2025-37936, European organizations should: 1) Apply the Linux kernel patches that correctly mask the MSR_IA32_PEBS_ENABLE value during VM-Entry to align with the guest vCPU's requested settings. This patch prevents unintended PEBS activation and guest crashes. 2) Avoid running outdated kernel versions identified by the vulnerable commit hash (c59a1f106f5cd4843c097069ff1bb2ad72103a67) and upgrade to the latest stable kernel releases containing the fix. 3) Review and audit the use of performance monitoring tools like 'perf' in virtualized environments to ensure they do not create guest-only PEBS events that could trigger the issue. 4) Implement monitoring to detect unusual guest VM crashes or page fault storms indicative of this vulnerability. 5) Educate system administrators and DevOps teams about the interaction between perf events and KVM guests to prevent inadvertent misuse. 6) For environments where immediate patching is not feasible, consider disabling PEBS-related performance monitoring for guests as a temporary workaround, understanding the trade-offs in performance analysis capabilities. 7) Engage with Linux distribution vendors for backported fixes and security advisories relevant to their kernel versions. These steps go beyond generic advice by focusing on kernel patching, performance tool usage, and operational monitoring specific to this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland
CVE-2025-37936: Vulnerability in Linux Linux
Description
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-37936 is a vulnerability identified in the Linux kernel's handling of the Performance Monitoring Unit (PMU) events within Kernel-based Virtual Machine (KVM) guests on x86 Intel architectures. Specifically, the issue arises from improper masking of the MSR_IA32_PEBS_ENABLE Model-Specific Register (MSR) value that is loaded during VM-Entry for a KVM guest's virtual CPU (vCPU). The vulnerability stems from the kernel consulting only the host's mask values when enabling Precise Event-Based Sampling (PEBS) for guest virtual machines, without properly considering the guest's requested PEBS_ENABLE settings. This results in the guest VM running with PEBS enabled even if it did not request it. Because KVM proxies guest PMU events through the host's perf subsystem, the kernel cannot distinguish between events created by host userspace and those created on behalf of the guest. Consequently, if PEBS is enabled unexpectedly, the guest may experience near-infinite page faults (#PFs), particularly if it has not initialized MSR_IA32_DS_AREA, which PEBS uses to record events. This leads to guest crashes and instability. The issue is reproducible by running the `perf kvm top` command on affected kernel versions prior to the fix, where userspace creates guest-only PEBS events that the kernel misattributes. Although this behavior can be viewed as a userspace bug—since enabling PEBS on guest-only events is inherently problematic—the kernel patch restricts PEBS usage to guest-owned events to prevent such crashes. The vulnerability does not pose a risk to the host system but can cause denial of service within guest VMs. The fix involves proper masking of the PEBS_ENABLE MSR value with the vCPU's desired settings during VM-Entry, preventing unintended PEBS activation. This vulnerability affects Linux kernel versions identified by the commit hash c59a1f106f5cd4843c097069ff1bb2ad72103a67 and was published on May 20, 2025. No known exploits are currently reported in the wild, and no CVSS score has been assigned.
Potential Impact
For European organizations utilizing Linux-based virtualization environments, particularly those deploying KVM for guest virtual machines on Intel x86 hardware, this vulnerability can lead to guest VM instability and crashes due to unexpected PEBS activation. The primary impact is denial of service within affected guest VMs, which can disrupt critical workloads, testing environments, or production services running inside virtual machines. While the host system remains unaffected, the inability to reliably run guest VMs can degrade service availability and increase operational overhead. Organizations relying on performance monitoring tools like 'perf' in conjunction with KVM may inadvertently trigger this issue, complicating performance analysis and debugging efforts. The impact is more pronounced in environments with high virtualization density or those running sensitive applications inside VMs that do not initialize PEBS-related MSRs properly. Although no direct confidentiality or integrity compromise is evident, the availability impact on guest VMs can have cascading effects on business continuity, especially in sectors such as finance, telecommunications, and cloud service providers prevalent in Europe.
Mitigation Recommendations
To mitigate CVE-2025-37936, European organizations should: 1) Apply the Linux kernel patches that correctly mask the MSR_IA32_PEBS_ENABLE value during VM-Entry to align with the guest vCPU's requested settings. This patch prevents unintended PEBS activation and guest crashes. 2) Avoid running outdated kernel versions identified by the vulnerable commit hash (c59a1f106f5cd4843c097069ff1bb2ad72103a67) and upgrade to the latest stable kernel releases containing the fix. 3) Review and audit the use of performance monitoring tools like 'perf' in virtualized environments to ensure they do not create guest-only PEBS events that could trigger the issue. 4) Implement monitoring to detect unusual guest VM crashes or page fault storms indicative of this vulnerability. 5) Educate system administrators and DevOps teams about the interaction between perf events and KVM guests to prevent inadvertent misuse. 6) For environments where immediate patching is not feasible, consider disabling PEBS-related performance monitoring for guests as a temporary workaround, understanding the trade-offs in performance analysis capabilities. 7) Engage with Linux distribution vendors for backported fixes and security advisories relevant to their kernel versions. These steps go beyond generic advice by focusing on kernel patching, performance tool usage, and operational monitoring specific to this vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2025-04-16T04:51:23.971Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682cd0f71484d88663aeafb3
Added to database: 5/20/2025, 6:59:03 PM
Last enriched: 7/4/2025, 1:57:48 AM
Last updated: 8/16/2025, 2:00:20 AM
Views: 19
Related Threats
CVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumCVE-2025-8143: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pencidesign Soledad
MediumCVE-2025-8142: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in pencidesign Soledad
HighCVE-2025-8105: CWE-94 Improper Control of Generation of Code ('Code Injection') in pencidesign Soledad
HighCVE-2025-8719: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in reubenthiessen Translate This gTranslate Shortcode
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.