CVE-2025-38217: hwmon: (ftsteutates) Fix TOCTOU race in fts_read()
Vulnerability summary
CVE-2025-38217 is a medium (CVSS 4.7) vulnerability in linux. EPSS estimates a 0.12% chance of exploitation in the next 30 days, higher than 2% of scored vulnerabilities.
Not severe (CVSS 4.7, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 40 · Related 38Timeline
- 04-07-2025PublishedVulnerability first disclosed.
- 11-05-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated4.7MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated4.7MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.12%
Chance of exploitation in the next 30 days
Percentile
2%
Versus all other CVEs
30-day change
Increase +0.01 pp
From 0.11% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu120 products
- linux< 6.8.0-100.100
- linux-allwinner-5.19All versions (No fix recorded)
- linux-aws< 6.8.0-1046.49
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
Linux2 products
- linux≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < d95d87841d2a575bed3691884e8fedef57d7710d | ≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < 83e2ba8971ccd8fc08319fc7593288f070d80a76 | ≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < 4d646f627d3b7ed1cacca66e598af8bcd632d465 | ≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < 14c9ede9ca4cd078ad76a6ab9617b81074eb58bf | 6.3
- linux_kernel≥ 6.3, < 6.6.95 | ≥ 6.7, < 6.12.35 | ≥ 6.13, < 6.15.4 | 6.16:rc1 | 6.16:rc2
Debian1 product
- linux< 6.12.35-1
3 vendors · 123 products