hwmon: Fix potential UAF in pec_store
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.18.53, 7.2.7
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 3ad2a7b9b15d5072139a20be84adb36776eb6c9b · fixed in 8afab57bcdbc2186f325972e777880ac5a220f4f; From 3ad2a7b9b15d5072139a20be84adb36776eb6c9b · fixed in 01dd8b4fc2cf83c66565c0f382fb1841e9000a89; From 3ad2a7b9b15d5072139a20be84adb36776eb6c9b · fixed in 354ccc99b2dc8ba0cf6d4de34e520bcf6ecca5c2
- Linux Linux
6.18
- KernelLinux
From 6.18.0 · fixed in 6.18.53; From 6.19.0 · fixed in 7.2.7