Description
In the Linux kernel, the following vulnerability has been resolved:

hwmon: (occ) unregister sysfs devices outside occ lock

occ_active(false) and occ_shutdown() unregister sysfs-backed devices while
occ->lock is held. hwmon_device_unregister() and sysfs_remove_group() can
wait for active sysfs callbacks to drain, and those callbacks can enter the
OCC update path and try to take occ->lock again. That gives the unregister
paths the lock ordering occ->lock -> sysfs callback drain, while a callback
has the opposite edge sysfs callback -> occ->lock.

This issue was found by our static analysis tool and then manually
reviewed against the current tree.

The grounded PoC kept the real unregister and callback carrier:

occ_shutdown()
hwmon_device_unregister()
occ_show_temp_1()
occ_update_response()

Lockdep reported the circular dependency with occ_shutdown() already
holding the OCC mutex and hwmon_device_unregister() waiting on the sysfs
side:

WARNING: possible circular locking dependency detected
... (sysfs_lock) ... at: hwmon_device_unregister+0x12/0x30 [vuln_msv]
... (&test_occ.lock) ... at: occ_shutdown.constprop.0+0xe/0x40 [vuln_msv]
occ_update_response.isra.0+0xb/0x20 [vuln_msv]
occ_show_temp_1.constprop.0.isra.0+0x23/0x40 [vuln_msv]
*** DEADLOCK ***

Serialize hwmon registration and removal with a separate hwmon_lock.
Under that lock, detach occ->hwmon and update occ->active while occ->lock
is held so concurrent OCC state changes still see a stable state, then
drop occ->lock before calling hwmon_device_unregister(). Remove the
driver sysfs group before taking occ->lock in occ_shutdown(), so draining
the driver attributes cannot wait while the OCC mutex is held. Also make
OCC update callbacks return -ENODEV after deactivation, so callbacks that
already passed sysfs active protection do not poll the hardware after
teardown has detached the hwmon device.
Published: 2026-08-28
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A lock ordering bug in the Linux kernel’s hardware monitoring (hwmon) subsystem allows a deadlock to occur when sysfs devices are unregistered while the OCC (On‑Chip Controller) lock is held. The flaw arises because the unregister path holds the OCC mutex and then waits for active sysfs callbacks to drain, which in turn may request the OCC lock again, creating a circular dependency. This deadlock can halt kernel operations involving hwmon, potentially freezing the system or causing instability, and thereby constitutes a denial‑of‑service condition. The bug was identified through static analysis and validated with a reproducible test harness that demonstrates the lock dependency. The vulnerability is related to improper synchronization and deadlock conditions caused by inconsistent lock ordering within the kernel. It specifically targets the coordination between the OCC lock and the sysfs callback drain mechanism.

Affected Systems

This vulnerability affects the Linux kernel, all versions maintained by the Linux kernel developers that implement the hwmon subsystem prior to the patch commit. The CVE data does not specify exact affected releases, but the fix was applied in the mainline kernel, implying all previous kernel versions are potentially vulnerable.

Risk and Exploitability

The risk of exploitation is not quantified with a CVSS score because no official score is published, and the EPSS score is unavailable. The issue is not listed in CISA’s KEV catalog, and no public exploit has been reported. However, the bug can be triggered by operations that invoke occ_shutdown or hwmon device removal, which may be possible only by processes with elevated privileges. Therefore, the window for malicious exploitation is limited to privileged contexts, but an attacker with such access could induce a deadlock and disrupt service.

Generated by OpenCVE AI on August 28, 2026 at 11:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update to a Linux kernel version that implements the fix, ensuring that hwmon registration and removal are protected by a dedicated hwmon_lock and that the OCC mutex is released before calling hwmon_device_unregister()
  • If an immediate kernel upgrade is not feasible, disable or limit the use of OCC‑related hwmon devices in the system configuration to avoid reaching the code path that can trigger the deadlock
  • Restrict privileged processes that can invoke occ_shutdown or hwmon device removal to prevent accidental or malicious execution of the faulty code

Generated by OpenCVE AI on August 28, 2026 at 11:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 28 Aug 2026 11:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-322

Fri, 28 Aug 2026 07:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: hwmon: (occ) unregister sysfs devices outside occ lock occ_active(false) and occ_shutdown() unregister sysfs-backed devices while occ->lock is held. hwmon_device_unregister() and sysfs_remove_group() can wait for active sysfs callbacks to drain, and those callbacks can enter the OCC update path and try to take occ->lock again. That gives the unregister paths the lock ordering occ->lock -> sysfs callback drain, while a callback has the opposite edge sysfs callback -> occ->lock. This issue was found by our static analysis tool and then manually reviewed against the current tree. The grounded PoC kept the real unregister and callback carrier: occ_shutdown() hwmon_device_unregister() occ_show_temp_1() occ_update_response() Lockdep reported the circular dependency with occ_shutdown() already holding the OCC mutex and hwmon_device_unregister() waiting on the sysfs side: WARNING: possible circular locking dependency detected ... (sysfs_lock) ... at: hwmon_device_unregister+0x12/0x30 [vuln_msv] ... (&test_occ.lock) ... at: occ_shutdown.constprop.0+0xe/0x40 [vuln_msv] occ_update_response.isra.0+0xb/0x20 [vuln_msv] occ_show_temp_1.constprop.0.isra.0+0x23/0x40 [vuln_msv] *** DEADLOCK *** Serialize hwmon registration and removal with a separate hwmon_lock. Under that lock, detach occ->hwmon and update occ->active while occ->lock is held so concurrent OCC state changes still see a stable state, then drop occ->lock before calling hwmon_device_unregister(). Remove the driver sysfs group before taking occ->lock in occ_shutdown(), so draining the driver attributes cannot wait while the OCC mutex is held. Also make OCC update callbacks return -ENODEV after deactivation, so callbacks that already passed sysfs active protection do not poll the hardware after teardown has detached the hwmon device.
Title hwmon: (occ) unregister sysfs devices outside occ lock
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-28T06:49:04.992Z

Reserved: 2026-08-26T14:34:25.780Z

Link: CVE-2026-80660

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-28T08:16:51.160

Modified: 2026-08-28T08:16:51.160

Link: CVE-2026-80660

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T13:00:04Z

Weaknesses
  • CWE-322

    Key Exchange without Entity Authentication