CVE-2026-98197

hwmon: (w83791d) remove fan/pwm 4-5 sysfs group on remove

Published Oct 6, 2026 CVSS 3.1 · 7 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

hwmon: (w83791d) remove fan/pwm 4-5 sysfs group on remove

When the fan/pwm 4-5 pins are not used as GPIO, w83791d_probe()
creates the w83791d_group_fanpwm45 sysfs group on the I2C client
device.

The probe error path removes this group when a later initialization
step fails, but the normal remove path only removes w83791d_group.
As a result, the optional fan/pwm 4-5 sysfs files can remain after the
driver is unbound.

The callbacks associated with these files access the driver data,
which is devm allocated and released after driver unbind. Leaving the
sysfs files behind can therefore result in accesses to stale driver
data.

Remove w83791d_group_fanpwm45 during normal teardown as well.

This issue was found by manual code inspection.

Analysis

AI-generated

Technical impact

The w83791d hardware‑monitor driver for the W83791D I2C chip fails to clean up the fan/pwm 4‑5 sysfs group when it is normally torn down, a flaw that falls under the CWE‑825 category. During a normal removal, the driver deletes only its primary sysfs group, leaving the optional fan/pwm 4‑5 directory and its files in place. The callbacks for those files reference driver data that was allocated with devm and freed when the driver unbinds. Because the sysfs entries remain, any subsequent read or write to them can dereference a freed pointer, resulting in a use‑after‑free condition that may crash the kernel or leak kernel memory. As the callbacks run in kernel space, exploitation leads to denial of service.

Affected Systems

All Linux kernels that include the w83791d driver before the repair commit (identified by the commit SHA 081e3a7845). This includes any distribution kernel that ships the unpatched module for monitoring W83791D hardware on I2C buses. The vulnerability affects systems that load the driver and later unload or unbind it, regardless of vendor distribution.

Risk and Exploitability

The CVSS score of 7 indicates high severity, but the EPSS score of less than 1% shows a very low probability of exploitation in the wild. The vulnerability is not listed in CISA’s KEV catalog, so no publicly known exploits have been reported. The likely attack vector is local privilege escalation or administrative intervention, as the dangling sysfs entries are generally accessible only to root or users with write permission to /sys. An attacker who can trigger a module unload/rebind or manipulate the sysfs interface could induce a use‑after‑free in kernel space, leading to a denial‑of-service crash or potential memory disclosure.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the w83791d_group_fanpwm45 removal patch (e.g., the commit identified by SHA 081e3a7845).
  • If an update is not immediately possible, keep the w83791d driver loaded so that the cleanup routine is not skipped, or reload the module after unloading to trigger proper teardown.
  • If the driver must be unloaded and cannot be reloaded, manually delete any remaining /sys/class/hwmon/*/fan4_pwm or /sys/class/hwmon/*/fan5_pwm directories to eliminate the dangling callbacks.
  • Enable kernel module permissions that prevent unprivileged users from unloading or reloading the driver, ensuring only trusted administrators can perform these actions.

Generated by OpenCVE AI on October 9, 2026 at 05:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4841-1 linux security update
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
Debian DSA Debian DSA DSA-6568-1 linux security update
Ubuntu USN Ubuntu USN USN-8961-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9022-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9023-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9024-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9025-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9026-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9029-1 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-9039-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-9040-1 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9066-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9091-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9183-1 Linux kernel (FIPS) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: hwmon: (w83791d) remove fan/pwm 4-5 sysfs group on remove When the fan/pwm 4-5 pins are not used as GPIO, w83791d_probe() creates the w83791d_group_fanpwm45 sysfs group on the I2C client device. The probe error path removes this group when a later initialization step fails, but the normal remove path only removes w83791d_group. As a result, the optional fan/pwm 4-5 sysfs files can remain after the driver is unbound. The callbacks associated with these files access the driver data, which is devm allocated and released after driver unbind. Leaving the sysfs files behind can therefore result in accesses to stale driver data. Remove w83791d_group_fanpwm45 during normal teardown as well. This issue was found by manual code inspection.
Title hwmon: (w83791d) remove fan/pwm 4-5 sysfs group on remove
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-825

    Expired Pointer Dereference

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:15 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 6, 2026, 9:18 AM
Modified
Oct 19, 2026, 10:18 AM
Severity
Moderate
Public date
Oct 6, 2026, 12:00 AM