HIGH Introduced in 2.6.28
hwmon FanPwm45 UAF
CVE-2026-98197
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.7HIGH
01Description
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.
02KernelScan AI Analysis
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.
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.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.28 | 5.10.271 | 081e3a784536 |
| 5.15 | 2.6.28 | 5.15.222 | b1d419eb3bc4 |
| 6.1 | 2.6.28 | 6.1.189 | 2ccf6c512290 |
| 6.12 | 2.6.28 | 6.12.112 | 2dd37d00f1f1 |
| 6.18 | 2.6.28 | 6.18.54 | 2c381e6e0f03 |
| 6.6 | 2.6.28 | 6.6.158 | f6e2ab72f32d |
| 7.2 | 2.6.28 | 7.2.8 | 583e04e88e75 |
| mainline | 2.6.28 | 7.3 | 0ff9c7775e51 |
| cip/4.19 | 2.6.28 | 4.19.325-cip137 | 6a2f8942e006 |
| cip/4.19-rt | 2.6.28 | 4.19.325-cip137-rt51 | 6a2f8942e006 |
| cip/4.4 | 2.6.28 | 4.4.302-cip116 | ce9eb028f2f0 |
| cip/5.10 | 2.6.28 | 5.10.271-cip78 | 081e3a784536 |
| cip/5.10-rt | 2.6.28 | 5.10.272-cip79-rt35 | 081e3a784536 |
| cip/6.1 | 2.6.28 | 6.1.189-cip61 | 2ccf6c512290 |
| cip/6.1-rt | 2.6.28 | 6.1.189-cip61-rt32 | 2ccf6c512290 |
| cip/6.12 | 2.6.28 | 6.12.112-cip33 | 2dd37d00f1f1 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |
| cip/4.19 | Fixed in 4.19.325-cip137 |
| cip/4.19-rt | Fixed in 4.19.325-cip137-rt51 |
| cip/4.4 | Fixed in 4.4.302-cip116 |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |