UBUNTU-CVE-2026-98200: Use After Free
In the Linux kernel, the following vulnerability has been resolved: hwmon: (hp-wmi-sensors) Fix use-after-free in fungibleshow() nsensor->currentstate is dynamically replaced as the sensor's state changes. updatenumericsensorfromwobj() does this by freeing the old string and installing a new one: if (strcmp(trimmed, nsensor->currentstate)) { newstring = hpwmistrdup(dev, trimmed); if (newstring) { devmkfree(dev, nsensor->currentstate); nsensor->currentstate = newstring; } } This function is only ever called from hpwmiupdateinfo() while state->lock is held, so the free-and-replace itself is properly serialized against concurrent updates. fungibleshow(), however, reads the same pointer after the lock has already been dropped: err = hpwmiupdateinfo(state, info); if (err) return err; switch (prop) { ... case HPWMIPROPERTYCURRENTSTATE: seqprintf(seqf, "%s\n", nsensor->currentstate); break; hpwmiupdateinfo() takes state->lock internally and releases it before returning, so by the time fungibleshow() dereferences nsensor->currentstate in seqprintf(), no lock is held. Two processes reading a sensor's currentstate debugfs entry at overlapping times (or one reading it while another read of the same sensor triggers a refresh) can race: one thread's seqprintf() can be part-way through printing the string at the moment another thread's call into updatenumericsensorfromwobj() frees it with devmkfree() and installs a new pointer, causing a use-after-free read. Take state->lock around the read in fungibleshow() as well, so it can never run concurrently with the free-and-replace in updatenumericsensorfromwobj().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
In fungible_show(), hold state->lock while reading and printing nsensor->current_state with seq_printf(), so the read cannot race with update_numeric_sensor_from_wobj() freeing and replacing the string.