Skip to main content
Network Thinking Solutions Logo

CVE-2025-38217

Linux kernel: hwmon: (ftsteutates) Fix TOCTOU race in fts_read()

All CVEs
CVE-2025-38217Published 7/4/2025

Linux kernel: hwmon: (ftsteutates) Fix TOCTOU race in fts_read()

Vendor advisory
CVSS4.7Medium

Overview

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.

Published
7/4/2025
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
≥ 6.3, < 6.6.95

Verify advisory

Source
linux kernel
linux
≥ 6.7, < 6.12.35

Verify advisory

Source
linux kernel
linux
≥ 6.13, < 6.15.4

Verify advisory

Source
linux kernel
linux
6.16

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
Linux
Linux
≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < d95d87841d2a575bed3691884e8fedef57d7710d

Verify advisory

Source
Linux
Linux
≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < 83e2ba8971ccd8fc08319fc7593288f070d80a76

Verify advisory

Source
Linux
Linux
≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < 4d646f627d3b7ed1cacca66e598af8bcd632d465

Verify advisory

Source
Linux
Linux
≥ 1c5759d8ce054961b454af69568a41e7e3210ee1, < 14c9ede9ca4cd078ad76a6ab9617b81074eb58bf

Verify advisory

Source
Linux
Linux
6.3

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 4.7. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.