KernelScan.io

HIGH Introduced in 2.6.28

hwmon FanPwm45 UAF

CVE-2026-98197

CVSS 7.0 / 10.0 NVD

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.7HIGH

01

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.

02

Engine v0.7.0

Risk summary

A local use-after-free exists in the w83791d hardware monitoring driver when optional fan/pwm 4-5 sysfs files are left behind after driver unbind. Any local user who can access these stale sysfs entries may read or write freed kernel memory, potentially leading to information disclosure, memory corruption, or a kernel crash. The bug requires the specific W83791D I2C sensor chip to be present and the driver to have been unbound.

Affecteddrivers/hwmon/w83791d.c (hwmon w83791d driver)

Vulnerability analysis

When the w83791d hardware monitoring driver is unbound from its I2C client device, it removes the main sysfs attribute group but fails to remove an optional group for fan/pwm channels 4-5. The callbacks behind those lingering sysfs files reference driver-private data that is automatically freed shortly after unbind completes, so any subsequent read or write to the files accesses stale, freed memory. The fix adds removal of the optional group to the normal teardown path, matching what the probe error path already does. The vulnerability is reachable locally by any user with access to the hwmon sysfs files, but only after the driver has been unbound (a privileged operation or hardware removal event), and it requires the W83791D sensor chip to be present on the system's I2C bus.

03

BranchIntroducedFixed inPatch commit
5.102.6.285.10.271081e3a784536
5.152.6.285.15.222b1d419eb3bc4
6.12.6.286.1.1892ccf6c512290
6.122.6.286.12.1122dd37d00f1f1
6.182.6.286.18.542c381e6e0f03
6.62.6.286.6.158f6e2ab72f32d
7.22.6.287.2.8583e04e88e75
mainline2.6.287.30ff9c7775e51
cip/5.102.6.285.10.271-cip78081e3a784536
cip/5.10-rt2.6.285.10.272-cip79-rt35081e3a784536
cip/6.12.6.286.1.189-cip612ccf6c512290
cip/6.1-rt2.6.286.1.189-cip61-rt322ccf6c512290
cip/6.122.6.286.12.112-cip332dd37d00f1f1

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtFixed in 5.10.272-cip79-rt35
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)