Junglewise Threat Intelligence

CVE-2024-27004: Linux Kernel deadlock in clk subsystem during runtime PM

CVE-2024-27004 · Severity: medium · CVSS 5.5 · Published 2024-05-01

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A flaw was found in the Linux kernel's clock management system, which handles how hardware components are powered on and off. Under specific conditions, the system can enter a 'deadlock' state where two internal processes wait for each other indefinitely, causing the system to hang or become unresponsive. This primarily affects system stability and availability, potentially requiring a hard reboot to recover.

Technical details

A classic ABBA deadlock exists in the Linux kernel clk subsystem. The vulnerability occurs when one thread walking the clk tree holds the 'prepare_lock' and attempts to resume a device via 'clk_pm_runtime_get()', while a second thread performing a runtime PM resume of the same device attempts to acquire the 'prepare_lock' via 'clk_prepare()'. This circular dependency leads to a hung task. The fix involves ensuring runtime PM references are acquired before walking the clk tree and holding the 'prepare_lock' during the 'disable_unused' phase. The issue is more easily triggered on specific hardware platforms like Qualcomm sc7180.

Affected products

  • Linux Linux Kernel All versions prior to fixed releases in 5.15.y, 6.1.y, 6.6.y, etc.

Timeline

  • 2024-03-25: patched: Initial patch submitted by Stephen Boyd
  • 2024-05-01: advisory: CVE-2024-27004 published in NVD

References

Related threats