{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2025-38217","published":"2025-07-04T14:15:30.227000Z","last_modified":"2026-06-17T09:16:24.533000Z","status":"Analyzed","cvss":{"version":"3.1","score":4.7,"severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","source":"nvd@nist.gov","primary":true},"auth":true,"cwes":["CWE-367"],"cpes":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"6.3","version_end_excluding":"6.6.95"},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"6.7","version_end_excluding":"6.12.35"},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"6.13","version_end_excluding":"6.15.4"},{"criteria":"cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version":"6.16"},{"criteria":"cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version":"6.16"}],"cpes_truncated":false,"vendors":["linux"],"products":["linux/linux_kernel"],"cat":"os","platform":"linux","eol":false,"packages":[],"severity":"medium","priority_score":28,"links":{"html_es":"/es/cve/CVE-2025-38217/","html_en":"/en/cve/CVE-2025-38217/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-38217","cve_org":"https://www.cve.org/CVERecord?id=CVE-2025-38217"},"untrusted":{"vendor_name":"Linux","product_name":"Linux Kernel","desc_en":"In the Linux kernel, the following vulnerability has been resolved:\n\nhwmon: (ftsteutates) Fix TOCTOU race in fts_read()\n\nIn the fts_read() function, when handling hwmon_pwm_auto_channels_temp,\nthe code accesses the shared variable data->fan_source[channel] twice\nwithout holding any locks. It is first checked against\nFTS_FAN_SOURCE_INVALID, and if the check passes, it is read again\nwhen used as an argument to the BIT() macro.\n\nThis creates a Time-of-Check to Time-of-Use (TOCTOU) race condition.\nAnother thread executing fts_update_device() can modify the value of\ndata->fan_source[channel] between the check and its use. If the value\nis changed to FTS_FAN_SOURCE_INVALID (0xff) during this window, the\nBIT() macro will be called with a large shift value (BIT(255)).\nA bit shift by a value greater than or equal to the type width is\nundefined behavior and can lead to a crash or incorrect values being\nreturned to userspace.\n\nFix this by reading data->fan_source[channel] into a local variable\nonce, eliminating the race condition. Additionally, add a bounds check\nto ensure the value is less than BITS_PER_LONG before passing it to\nthe BIT() macro, making the code more robust against undefined behavior.\n\nThis possible bug was found by an experimental static analysis tool\ndeveloped by our team.","affected":[{"untrusted_vendor":"Linux","untrusted_product":"Linux","versions":[]}],"references":[{"url":"https://git.kernel.org/stable/c/14c9ede9ca4cd078ad76a6ab9617b81074eb58bf","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/4d646f627d3b7ed1cacca66e598af8bcd632d465","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/83e2ba8971ccd8fc08319fc7593288f070d80a76","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/d95d87841d2a575bed3691884e8fedef57d7710d","tags":["Patch"]}]}}