CVE-2025-40122
BaseFortify
Publication date: 2025-11-12
Last updated on: 2025-11-12
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is related to the Linux kernel's performance monitoring unit (PMU) on Intel x86 processors. It occurs when an invalid auto counter reload (ACR) mask is set from user space, causing an incorrect write to IA32_PMC_x_CFG_B Model-Specific Registers (MSRs). Specifically, the check for the ACR counter mask in the kernel was incorrect, allowing invalid bits to be set, which leads to an unchecked MSR access error and triggers warnings or faults. This happens because some general-purpose counters do not support the auto counter reload feature, and writing to their configuration registers incorrectly causes a general protection (#GP) fault. The fix corrects the mask checking logic and filters out invalid counters to prevent these errors.
How can this vulnerability impact me? :
This vulnerability can cause system instability or crashes when performance monitoring tools (like perf) attempt to configure hardware counters incorrectly. It may lead to kernel warnings or faults due to invalid MSR accesses, potentially disrupting performance monitoring or profiling activities. While it does not directly lead to privilege escalation or data corruption, it can affect the reliability of performance monitoring and debugging on affected systems.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring kernel logs for the specific 'unchecked MSR access error' message related to WRMSR to 0x1986 when running perf tools. You can check the kernel log using the command: dmesg | grep 'unchecked MSR access error'. Additionally, running perf_fuzzer or similar perf tests that exercise IA32_PMC_x_CFG_B MSRs may trigger the error if the system is vulnerable.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include updating the Linux kernel to a version where this vulnerability is fixed, as the issue is resolved by correcting the check in intel_pmu_acr_late_setup() and removing misleading warnings. Until then, avoid running perf events or tools that set invalid auto counter reload (ACR) counter masks, especially those that write to IA32_PMC_x_CFG_B MSRs. Monitoring and restricting user space perf event configurations that could trigger this issue can also help mitigate the risk.