CVE-2025-38217
BaseFortify
Publication date: 2025-07-04
Last updated on: 2025-11-18
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-367 | The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a Time-of-Check to Time-of-Use (TOCTOU) race condition in the Linux kernel's fts_read() function related to hardware monitoring (hwmon). The function accesses a shared variable data->fan_source[channel] twice without locking. Between the first check and the second use, another thread can change the value to an invalid one (FTS_FAN_SOURCE_INVALID), causing a bit shift operation with an invalid large value (BIT(255)). This undefined behavior can lead to a crash or incorrect values being returned to userspace. The fix involves reading the variable once into a local variable and adding bounds checking to prevent invalid bit shifts.
How can this vulnerability impact me? :
This vulnerability can cause the Linux kernel to exhibit undefined behavior such as crashes or returning incorrect hardware monitoring data to userspace. This can affect system stability and reliability, potentially leading to system crashes or incorrect fan speed readings, which might impact hardware cooling and overall system operation.
What immediate steps should I take to mitigate this vulnerability?
The immediate step to mitigate this vulnerability is to update the Linux kernel to a version where the fts_read() function has been fixed to eliminate the TOCTOU race condition. This fix involves reading the shared variable data->fan_source[channel] into a local variable once and adding a bounds check before using it in the BIT() macro, preventing undefined behavior and potential crashes.