CVE-2026-98000 PUBLISHED

hwmon: Fix potential UAF in pec_store

Assigner: Linux
Reserved: 25.09.2026 Published: 25.09.2026 Updated: 25.09.2026

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.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 3ad2a7b9b15d5072139a20be84adb36776eb6c9b to 8afab57bcdbc2186f325972e777880ac5a220f4f (excl.)
  • affected from 3ad2a7b9b15d5072139a20be84adb36776eb6c9b to 01dd8b4fc2cf83c66565c0f382fb1841e9000a89 (excl.)
  • affected from 3ad2a7b9b15d5072139a20be84adb36776eb6c9b to 354ccc99b2dc8ba0cf6d4de34e520bcf6ecca5c2 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.18 is affected
  • unaffected from 0 to 6.18 (excl.)
  • unaffected from 6.18.53 to 6.18.* (incl.)
  • unaffected from 7.2.7 to 7.2.* (incl.)
  • unaffected from 7.3-rc3 to * (incl.)

References