CVE-2025-38217
Last modified
CVE-2025-38217 is a medium-severity vulnerability rated 4.7/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: hwmon: (ftsteutates) Fix TOCTOU race in fts_read() In the fts_read() function, when handling hwmon_pwm_auto_channels_temp, the code accesses the shared variable data->fan_source[channel] twice without holding any locks. It is first checked against FTS_FAN_SOURCE_INVALID, and if the check passes, it is read again when used as an argument to the BIT() macro. This creates a Time-of-Check to Time-of-Use (TOCTOU) race condition. Another thread executing fts_update_device() can modify the value of data->fan_source[channel] between the check and its use. EPSS estimates a 0.10% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: hwmon: (ftsteutates) Fix TOCTOU race in fts_read() In the fts_read() function, when handling hwmon_pwm_auto_channels_temp, the code accesses the shared variable data->fan_source[channel] twice without holding any locks. It is first checked against FTS_FAN_SOURCE_INVALID, and if the check passes, it is read again when used as an argument to the BIT() macro. This creates a Time-of-Check to Time-of-Use (TOCTOU) race condition. Another thread executing fts_update_device() can modify the value of data->fan_source[channel] between the check and its use. If the value is changed to FTS_FAN_SOURCE_INVALID (0xff) during this window, the BIT() macro will be called with a large shift value (BIT(255)). A bit shift by a value greater than or equal to the type width is undefined behavior and can lead to a crash or incorrect values being returned to userspace. Fix this by reading data->fan_source[channel] into a local variable once, eliminating the race condition. Additionally, add a bounds check to ensure the value is less than BITS_PER_LONG before passing it to the BIT() macro, making the code more robust against undefined behavior. This possible bug was found by an experimental static analysis tool developed by our team.
Metrics
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 6.3, < 6.6.95 | — |
| Linux | Linux Kernel | >= 6.7, < 6.12.35 | — |
| Linux | Linux Kernel | >= 6.13, < 6.15.4 | — |
| Linux | Linux Kernel | 6.16 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2025-38217?
How severe is CVE-2025-38217?
How do I fix CVE-2025-38217?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-38211In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-38212In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-38213Rejected reason: This CVE ID has been rejected or withdrawn …
- CVE-2025-38214In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-38215In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-38216In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-38218In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-38219In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-3822A vulnerability was found in SourceCodester Web-based Pharma…5.4
- CVE-2025-38220In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-38221In the Linux kernel, the following vulnerability has been re…7.1
- CVE-2025-38222In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2025-38217?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
