UBUNTU-CVE-2026-98198: Low severity ubuntu/linux-hwe-edge vulnerability
In the Linux kernel, the following vulnerability has been resolved: hwmon: (pwm-fan) Stop RPM timer before freeing tach data sampletimer() rearms the RPM timer and accesses the devm-managed ctx->tachs and ctx->pulsesperrevolution arrays. The cleanup action which stops the timer is registered before those arrays are allocated. Since devres releases entries in reverse order, driver detach can free the arrays before pwmfancleanup() shuts down the timer. A timer expiry in that window accesses the freed tach data. With a KASAN kernel, a test-only kprobe delayed entry to pwmfancleanup() while normal sysfs unbind ran. Each of three runs reported three four-byte reads and two four-byte writes in sampletimer() after its backing devm allocations had been freed. The helper did not invoke the timer callback, cleanup actions or free functions. With the fix, three matching unbind runs completed without KASAN, BUG, WARNING, Oops or panic. Instrumentation confirmed that timer retirement completed before the first timer backing allocation was released. Split timer retirement from the power cleanup and register its devres action after the timer backing data and IRQ actions are installed. This preserves the early power rollback action while ensuring the timer is retired before its backing data is released. Use timershutdownsync() because the callback can rearm itself.
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
Event History
Frequently Asked Questions
Which systems are most likely to encounter this issue?
Systems using the Linux pwm-fan driver with RPM tachometer sampling are relevant. The race occurs during driver detach, including normal sysfs unbind, when the RPM timer can run after its tachometer data has been freed.
What conditions trigger the use-after-free?
A timer expiry must occur in the window between freeing the devm-managed tach data and stopping the RPM timer during driver cleanup. The reported reproducer delayed entry to the cleanup routine while performing a sysfs unbind.
How can I identify a possible occurrence?
On a KASAN-enabled kernel, the issue was observed as four-byte reads and writes in sample_timer() after the timer backing allocations had been freed. The reported tests produced KASAN reports during pwm-fan driver unbind.
What can be done before an updated kernel is deployed?
Avoid detaching or unbinding the pwm-fan driver where practical, since that cleanup path creates the reported race window. The resolved change retires the timer before its backing allocations are released.