CVE-2026-99719 in Linuxinfo

Summary

by MITRE • 11/20/2026

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

hwmon: (lm87) Fix drvdata type confusion in vrm_show() and vrm_store()

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 vrm_show() and vrm_store() in drivers/hwmon/lm87.c.

In lm87_probe(), the driver stores the struct lm87_data pointer on the I2C client via i2c_set_clientdata() and passes the struct i2c_client pointer as the drvdata argument to devm_hwmon_device_register_with_groups(), which attaches the attribute groups to the registered hwmon device with client as its driver_data. Unlike the other sysfs callbacks that retrieve client via dev_get_drvdata() and then obtain data via i2c_get_clientdata(), vrm_show() and vrm_store() assign dev_get_drvdata(dev) directly to struct lm87_data *. Dereferencing data->vrm therefore accesses the struct i2c_client instance at offsetof(struct lm87_data, vrm), causing vrm_show() to leak an unrelated byte from struct i2c_client to userspace and vrm_store() to corrupt a byte within struct i2c_client while failing to update the actual VRM value.

Fix the problem by assigning the return value from dev_get_drvdata(dev) to struct i2c_client *client and using i2c_get_clientdata() to get the actual client data.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel hardware monitoring subsystem contains a critical type confusion vulnerability within the lm87 driver, specifically affecting devices such as the LM87 and ADM1024 when VID support is enabled. This flaw resides in the sysfs attribute handlers vrm_show() and vrm_store(), which are responsible for reading and writing the Voltage Regulator Minimum value to userspace. The root cause stems from an incorrect assumption regarding how driver data is stored and retrieved within the kernel's device model framework during the probe phase of the I2C client lifecycle.

During initialization, the lm87_probe function correctly associates a struct lm87_data pointer with the I2C client using i2c_set_clientdata(). It then registers the hardware monitoring device by passing the struct i2c_client pointer as the drvdata argument to devm_hwmon_device_register_with_groups(). This establishes an indirect relationship where the hwmon device's driver data points to the I2C client, not directly to the lm87_data structure. While other sysfs callbacks in this driver correctly navigate this indirection by first retrieving the i2c_client via dev_get_drvdata() and then extracting the actual driver context using i2c_get_clientdata(), the vrm_show and vrm_store functions bypass this necessary step.

Instead of following the proper retrieval chain, these specific handlers directly cast the result of dev_get_drvdata to a struct lm87_data pointer. This type confusion leads to severe memory safety violations because the code interprets the memory layout of an i2c_client structure as that of an lm87_data structure. Since these two structures have different sizes and field offsets, accessing data->vrm actually accesses a byte offset within the i2c_client instance rather than the intended VRM configuration register in the hardware monitoring context.

The operational impact of this vulnerability is twofold, involving both information disclosure and memory corruption. In vrm_show(), the dereference results in reading an unrelated byte from the struct i2c_client structure and exposing it to userspace via sysfs. This constitutes a kernel information leak that could potentially reveal internal state or pointers depending on the specific offset accessed. Conversely, vrm_store() attempts to write data into this misinterpreted location, resulting in memory corruption of the I2C client object. This corruption can destabilize the driver's operation, lead to undefined behavior during subsequent I2C transactions, and potentially allow for privilege escalation if an attacker can control the written value to overwrite critical function pointers or state flags within the i2c_client structure.

From a classification perspective, this vulnerability aligns with CWE-843, Access of Resource Using Incompatible Type, as the code treats one data type as another incompatible type without proper conversion. It also relates to CWE-119, Improper Restriction of Operations within the Bounds of a Memory Buffer, due to the out-of-bounds or incorrect memory access resulting from the struct offset mismatch. Within the MITRE ATT&CK framework for Linux, this behavior is consistent with T1057, Process Discovery, if used for information gathering, but more critically falls under techniques involving local privilege escalation through kernel exploitation vectors such as arbitrary write primitives derived from type confusion bugs.

To mitigate this vulnerability, developers must ensure that all sysfs callbacks in the lm87 driver adhere to the standard pattern established by other handlers in the same file. This involves retrieving the i2c_client pointer first using dev_get_drvdata() and then extracting the actual device context via i2c_get_clientdata(). Static analysis tools should be configured to detect such type mismatches, particularly when casting void pointers returned from generic driver data accessors to specific structure types without verifying the underlying object identity. Furthermore, kernel maintainers should enforce consistent patterns for accessing hardware-specific data in multi-layered driver models where client devices wrap sensor drivers, ensuring that indirection levels are correctly resolved before any member access occurs.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!