Linux Kernel Spinlock IRQ Flag Vulnerability in Device Power Management

Vulnerability

A vulnerability exists in the Linux kernel's power management subsystem, specifically within the device_pm_check_callbacks() function. This issue arises because the function can be called while holding a spinlock, which leads to an improper handling of interrupt flags. The function uses spin_lock_irq() and spin_unlock_irq(), without preserving the CPU's interrupt state, creating a potential for interrupt handling errors. The vulnerability was identified in version 5.17.0-rc6.

Impact

The vulnerability can lead to incorrect interrupt flag handling, which may cause disruptions in how the system manages interrupts. This could potentially allow for interrupts to be missed or improperly processed, leading to unpredictable behavior in the system's operation.

Reproduction

The vulnerability can be reproduced by calling the device_pm_check_callbacks() function while holding a spinlock, particularly in scenarios where the generic power domain (genpd) is using spinlocks instead of mutexes. This sequence of actions will trigger a warning about the improper restoration of interrupt flags, indicating that the vulnerability is present.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
0.6
exploitability
4.3
remediation
0.0
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.