CVE-2025-71111: hwmon: (w83791d) Convert macros to functions to avoid TOCTOU

Published Jan 14, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

hwmon: (w83791d) Convert macros to functions to avoid TOCTOU

The macro FANFROMREG evaluates its arguments multiple times. When used in lockless contexts involving shared driver data, this leads to Time-of-Check to Time-of-Use (TOCTOU) race conditions, potentially causing divide-by-zero errors.

Convert the macro to a static function. This guarantees that arguments are evaluated only once (pass-by-value), preventing the race conditions.

Additionally, in storefandiv, move the calculation of the minimum limit inside the update lock. This ensures that the read-modify-write sequence operates on consistent data.

Adhere to the principle of minimal changes by only converting macros that evaluate arguments multiple times and are used in lockless contexts.

Affected Software

17 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=2.6.18.1<5.10.248
Linux Linux kernel>=5.11<5.15.198
Linux Linux kernel>=5.16<6.1.160
Linux Linux kernel>=6.2<6.6.120
Linux Linux kernel>=6.7<6.12.64
Linux Linux kernel>=6.13<6.18.3
Linux Linux kernel=2.6.18
Linux Linux kernel=6.19-rc1
Linux Linux kernel=6.19-rc2
Linux Linux kernel=6.19-rc3
Linux Linux kernel=6.19-rc4
Linux Linux kernel=6.19-rc5
Linux Linux kernel=6.19-rc6
Linux Linux kernel=6.19-rc7
Linux Linux kernel=6.19-rc8
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
  2. Compensating control

    In hwmon (w83791d), convert the FAN_FROM_REG macro to a static function so its arguments are evaluated only once, limiting this change to macros that evaluate arguments multiple times and are used in lockless contexts.

  3. Compensating control

    In store_fan_div, move the calculation of the minimum limit inside the update lock so the read-modify-write sequence operates on consistent data.

Event History

Jan 14, 2026
CVE Published
via MITRE·03:05 PM
Data Sourced
via MITRE·03:05 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-71111?

CVE-2025-71111 has been rated as a medium severity vulnerability.

2

How do I fix CVE-2025-71111?

To fix CVE-2025-71111, update to the latest version of the Linux kernel where this vulnerability has been patched.

3

What impact does CVE-2025-71111 have on system security?

CVE-2025-71111 can potentially lead to vulnerabilities in shared memory contexts, which may allow unauthorized access to sensitive data.

4

Which versions of the Linux kernel are affected by CVE-2025-71111?

CVE-2025-71111 affects multiple versions of the Linux kernel prior to the security patch.

5

Is CVE-2025-71111 remotely exploitable?

CVE-2025-71111 is not considered remotely exploitable, but it may pose risks in specific configurations involving shared memory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203