CVE-2025-39821
BaseFortify
Publication date: 2025-09-16
Last updated on: 2025-12-02
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 6.16 (inc) to 6.16.5 (exc) |
| linux | linux_kernel | 6.17 |
| linux | linux_kernel | 6.17 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-787 | The product writes data past the end, or before the beginning, of the intended buffer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability occurs in the Linux kernel's perf subsystem where calling start()/stop() on perf events that are inactive (in PERF_EVENT_STATE_OFF) causes the event's hardware index (hw.idx) to remain at -1. Later, when the PMU driver uses this negative index as a shift exponent in bitwise operations, it leads to undefined behavior and UBSAN shift-out-of-bounds errors. The root cause is a logical flaw in handling event groups with some disabled members during throttling, where inactive events are incorrectly processed. The fix involves skipping inactive events during throttling to prevent these invalid operations.
How can this vulnerability impact me? :
This vulnerability can cause undefined behavior in the Linux kernel's perf subsystem, potentially leading to kernel warnings or errors due to invalid bitwise operations on negative indices. While it does not directly indicate a security breach, such undefined behavior can affect system stability or reliability when using performance monitoring features, especially under heavy sampling and throttling conditions.
What immediate steps should I take to mitigate this vulnerability?
Update the Linux kernel to a version that includes the fix for this vulnerability, which moves the state check into perf_event_throttle()/perf_event_unthrottle() to skip inactive events and prevent undefined behavior. Avoid using perf events with disabled child events in aggressive sampling configurations until the patch is applied.