{"id":"CVE-2025-71111","aliases":["CVE-2025-71111"],"related":[],"kind":"vulnerability","state":"published","title":"hwmon: (w83791d) Convert macros to functions to avoid TOCTOU","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nhwmon: (w83791d) Convertir macros a funciones para evitar TOCTOU\n\nLa macro FAN_FROM_REG evalúa sus argumentos múltiples veces. Cuando se usa en contextos sin bloqueo que involucran datos de controlador compartidos, esto lleva a condiciones de carrera de Tiempo de Verificación a Tiempo de Uso (TOCTOU), potencialmente causando errores de división por cero.\n\nConvertir la macro a una función estática. Esto garantiza que los argumentos se evalúen solo una vez (paso por valor), previniendo las condiciones de carrera.\n\nAdemás, en store_fan_div, mover el cálculo del límite mínimo dentro del bloqueo de actualización. Esto asegura que la secuencia de lectura-modificación-escritura opere con datos consistentes.\n\nAdherirse al principio de cambios mínimos al convertir solo macros que evalúan argumentos múltiples veces y se usan en contextos sin bloqueo.","source":"nvd"}],"published":"2026-01-14T15:05:58.649Z","modified":"2026-10-19T19:17:12.643Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-362","CWE-367"],"affected":[{"ranges":[{"type":"git","introduced":"9873964d6eb24bd0205394f9b791de9eddbcb855","fixed":"3dceb68f6ad33156032ef4da21a93d84059cca6d","status":"affected"},{"type":"git","introduced":"9873964d6eb24bd0205394f9b791de9eddbcb855","fixed":"bf5b03227f2e6d4360004886d268f9df8993ef8f","status":"affected"},{"type":"git","introduced":"9873964d6eb24bd0205394f9b791de9eddbcb855","fixed":"f2b579a0c37c0df19603d719894a942a295f634a","status":"affected"},{"type":"git","introduced":"9873964d6eb24bd0205394f9b791de9eddbcb855","fixed":"f94800fbc26ccf7c81eb791707b038a57aa39a18","status":"affected"},{"type":"git","introduced":"9873964d6eb24bd0205394f9b791de9eddbcb855","fixed":"a9fb6e8835a22f5796c1182ed612daed3fd273af","status":"affected"},{"type":"git","introduced":"9873964d6eb24bd0205394f9b791de9eddbcb855","fixed":"c8cf0c2bdcccc6634b6915ff793b844e12436680","status":"affected"},{"type":"git","introduced":"9873964d6eb24bd0205394f9b791de9eddbcb855","fixed":"670d7ef945d3a84683594429aea6ab2cdfa5ceb4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.18","status":"unaffected"},{"type":"semver","introduced":"5.10.248","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.198","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.160","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.120","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.64","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.3","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.18.1","fixed":"5.10.248"},{"status":"affected","introduced":"5.11","fixed":"5.15.198"},{"status":"affected","introduced":"5.16","fixed":"6.1.160"},{"status":"affected","introduced":"6.2","fixed":"6.6.120"},{"status":"affected","introduced":"6.7","fixed":"6.12.64"},{"status":"affected","introduced":"6.13","fixed":"6.18.3"},{"status":"affected","version":"2.6.18"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/3dceb68f6ad33156032ef4da21a93d84059cca6d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bf5b03227f2e6d4360004886d268f9df8993ef8f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f2b579a0c37c0df19603d719894a942a295f634a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f94800fbc26ccf7c81eb791707b038a57aa39a18","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a9fb6e8835a22f5796c1182ed612daed3fd273af","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c8cf0c2bdcccc6634b6915ff793b844e12436680","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/670d7ef945d3a84683594429aea6ab2cdfa5ceb4","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-10T20:42:13.069Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71111","url":"https://www.cve.org/CVERecord?id=CVE-2025-71111","licence":"CVE Terms of Use","modified":"2026-10-19T18:15:13.644Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71111","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71111","licence":"Public domain","modified":"2026-10-19T19:17:12.643Z"}],"updatedAt":"2026-11-25T22:59:10.611Z","epss":{"score":0.00104,"percentile":0.01117,"date":"2026-12-01T12:00:22.000Z"}}