All reports
Medium

kernel: hwmon: Fix potential UAF in pec_store

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-98000

Probability of exploitation in the next 30 days: 0.17%

FIRST EPSS · 2026-11-21

Description

In the Linux kernel, the following vulnerability has been resolved: hwmon: Fix potential UAF in pec_store Sashiko reports: In pec_store(), a guard(mutex)(&hwdev->lock) is taken. If the chip write operation returns an error other than -EOPNOTSUPP, the code jumps to the put label, which calls put_device(hdev). If this drops the final reference, the device is freed. When the function then returns, the guard cleanup function runs and attempts to unlock the freed mutex. Use scoped_guard() instead of guard() to avoid the problem.

A flaw was found in the Linux kernel's Hardware Monitoring (hwmon) subsystem. This vulnerability allows a local user to cause a Denial of Service (DoS) or potentially corrupt memory by triggering a use-after-free (UAF) condition. When an error occurs during a device write operation, the kernel releases the device prematurely, causing it to access and unlock an already-freed lock during cleanup.