{"id":"CVE-2025-71111","revision":"8efef8f46ea54df9b01dd8d9f29fb378","records":[{"revision":"8efef8f46ea54df9b01dd8d9f29fb378","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-71111","aliases":[],"title":"hwmon: (w83791d) Convert macros to functions to avoid TOCTOU","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nhwmon: (w83791d) Convert macros to functions to avoid TOCTOU\n\nThe macro FAN_FROM_REG evaluates its arguments multiple times. When used\nin lockless contexts involving shared driver data, this leads to\nTime-of-Check to Time-of-Use (TOCTOU) race conditions, potentially\ncausing divide-by-zero errors.\n\nConvert the macro to a static function. This guarantees that arguments\nare evaluated only once (pass-by-value), preventing the race\nconditions.\n\nAdditionally, in store_fan_div, move the calculation of the minimum\nlimit inside the update lock. This ensures that the read-modify-write\nsequence operates on consistent data.\n\nAdhere to the principle of minimal changes by only converting macros\nthat evaluate arguments multiple times and are used in lockless\ncontexts.","state":0,"publishedAt":"2026-01-14T15:05:58.649+00:00","modifiedAt":"2026-10-19T18:15:13.644+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"drivers/hwmon/w83791d.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"9873964d6eb24bd0205394f9b791de9eddbcb855\",\n                            \"lessThan\": \"3dceb68f6ad33156032ef4da21a93d84059cca6d\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"9873964d6eb24bd0205394f9b791de9eddbcb855\",\n                            \"lessThan\": \"bf5b03227f2e6d4360004886d268f9df8993ef8f\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"9873964d6eb24bd0205394f9b791de9eddbcb855\",\n                            \"lessThan\": \"f2b579a0c37c0df19603d719894a942a295f634a\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"9873964d6eb24bd0205394f9b791de9eddbcb855\",\n                            \"lessThan\": \"f94800fbc26ccf7c81eb791707b038a57aa39a18\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"9873964d6eb24bd0205394f9b791de9eddbcb855\",\n                            \"lessThan\": \"a9fb6e8835a22f5796c1182ed612daed3fd273af\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"9873964d6eb24bd0205394f9b791de9eddbcb855\",\n                            \"lessThan\": \"c8cf0c2bdcccc6634b6915ff793b844e12436680\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"9873964d6eb24bd0205394f9b791de9eddbcb855\",\n                            \"lessThan\": \"670d7ef945d3a84683594429aea6ab2cdfa5ceb4\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"drivers/hwmon/w83791d.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"2.6.18\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"2.6.18\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.10.248\",\n                            \"lessThanOrEqual\": \"5.10.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.15.198\",\n                            \"lessThanOrEqual\": \"5.15.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.1.160\",\n                            \"lessThanOrEqual\": \"6.1.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.6.120\",\n                            \"lessThanOrEqual\": \"6.6.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.12.64\",\n                            \"lessThanOrEqual\": \"6.12.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.18.3\",\n                            \"lessThanOrEqual\": \"6.18.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.19\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[],"references":["https://git.kernel.org/stable/c/3dceb68f6ad33156032ef4da21a93d84059cca6d","https://git.kernel.org/stable/c/bf5b03227f2e6d4360004886d268f9df8993ef8f","https://git.kernel.org/stable/c/f2b579a0c37c0df19603d719894a942a295f634a","https://git.kernel.org/stable/c/f94800fbc26ccf7c81eb791707b038a57aa39a18","https://git.kernel.org/stable/c/a9fb6e8835a22f5796c1182ed612daed3fd273af","https://git.kernel.org/stable/c/c8cf0c2bdcccc6634b6915ff793b844e12436680","https://git.kernel.org/stable/c/670d7ef945d3a84683594429aea6ab2cdfa5ceb4"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-71111","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-71111","identifiers":["CVE-2025-71111"]},"retained":false,"historicalAffected":[]}],"coverage":[]}