CVE-2026-99719: hwmon: (lm87) Fix drvdata type confusion in vrm_show() and vrm_store()
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (lm87) Fix drvdata type confusion in vrmshow() and vrmstore()
When an LM87 or ADM1024 device is probed with VID support enabled, reading from or writing to the vrm sysfs attribute triggers a driver data type confusion in vrmshow() and vrmstore() in drivers/hwmon/lm87.c.
In lm87probe(), the driver stores the struct lm87data pointer on the I2C client via i2csetclientdata() and passes the struct i2cclient pointer as the drvdata argument to devmhwmondeviceregisterwithgroups(), which attaches the attribute groups to the registered hwmon device with client as its driverdata. Unlike the other sysfs callbacks that retrieve client via devgetdrvdata() and then obtain data via i2cgetclientdata(), vrmshow() and vrmstore() assign devgetdrvdata(dev) directly to struct lm87data . Dereferencing data->vrm therefore accesses the struct i2cclient instance at offsetof(struct lm87data, vrm), causing vrmshow() to leak an unrelated byte from struct i2cclient to userspace and vrmstore() to corrupt a byte within struct i2cclient while failing to update the actual VRM value.
Fix the problem by assigning the return value from devgetdrvdata(dev) to struct i2cclient client and using i2cgetclientdata() to get the actual client data.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux lm87 hwmon driver for an LM87 or ADM1024 device are affected when the device is probed with VID support enabled. The issue is reached through the driver's vrm sysfs attribute.
What access is needed to trigger the vulnerability?
An attacker needs the ability to read from or write to the vrm sysfs attribute. Reading it leaks an unrelated byte from the I2C client structure, while writing it corrupts a byte in that structure and does not update the real VRM value.
What can be done before the fix is deployed?
Prevent untrusted users or processes from accessing the vrm sysfs attribute. Avoid both reads and writes to that attribute on affected LM87 or ADM1024 devices with VID support enabled.
How can administrators determine whether a system is affected?
Check whether the lm87 driver has probed an LM87 or ADM1024 device with VID support enabled and exposes the vrm sysfs attribute. On such a device, accessing that attribute triggers the flawed driver-data handling.