CVE-2025-38217

Medium

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.

Package Linux Kernel
Published 2025-07-04
Last modified 2025-11-18
CVSS version 3.1
Patch available
Yes

CVSS 3.1 score

4.7

out of 10
Medium
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High
Vector string
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Weakness type

CWE-367

CVE-2025-38217 is classified as CWE-367

See CWE-367 on MITRE CWE for full details on this weakness type.

Affected versions

Linux kernel versions 6.3 and later are affected. Fixed in 6.6.95, 6.12.35, 6.15.4, 6.16 and their respective stable series.

Affected from
≥ 6.3
Fixed in
✓ 6.6.95 6.6.x ✓ 6.12.35 6.12.x ✓ 6.15.4 6.15.x ✓ 6.16

References

The following references provide additional information about CVE-2025-38217 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.

Frequently asked questions

  • What is CVE-2025-38217?

    CVE-2025-38217 is a Medium severity Linux kernel vulnerability with a CVSS score of 4.7 out of 10 . It affects Linux kernel versions from 6.3 onward and has been patched in 6.6.95, 6.12.35, 6.15.4 and others. CVE-2025-38217 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • What is the CVSS score for CVE-2025-38217?

    CVE-2025-38217 has a CVSS score of 4.7 out of 10, rated Medium severity (CVSS 3.1). The vector string is CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H .

  • Is there a patch available for CVE-2025-38217?

    Yes — CVE-2025-38217 has been patched. Fixed versions include 6.6.95, 6.12.35, 6.15.4 and others. If you are running Linux kernel 6.3 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2025-38217 actively exploited?

    No — CVE-2025-38217 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.