Time-of-Check to Time-of-Use Race Condition in Linux Kernel's Fan Control Functionality
CVE-2025-38217

Currently unrated

Key Information:

Vendor

Linux

Status
Vendor
CVE Published:
4 July 2025

What is CVE-2025-38217?

A vulnerability exists in the Linux kernel related to the hwmon subsystem, specifically within the fts_read() function where a Time-of-Check to Time-of-Use (TOCTOU) race condition occurs. This flaw arises when the code accesses the shared variable data->fan_source[channel] twice without synchronization, allowing a possible thread interleaving that can lead to unexpected behavior. If a concurrent thread alters the variable between the initial check and its subsequent use, a large value could be erroneously processed, causing crashes or incorrect data to be sent to userspace. The recent patch addresses this issue by consolidating the variable read into a local context, significantly improving the robustness of the code and preventing undefined behavior from occurring.

Affected Version(s)

Linux 1c5759d8ce054961b454af69568a41e7e3210ee1

Linux 1c5759d8ce054961b454af69568a41e7e3210ee1 < 83e2ba8971ccd8fc08319fc7593288f070d80a76

Linux 1c5759d8ce054961b454af69568a41e7e3210ee1 < 4d646f627d3b7ed1cacca66e598af8bcd632d465

References

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.
CVE-2025-38217 : Time-of-Check to Time-of-Use Race Condition in Linux Kernel's Fan Control Functionality