Linux Kernel PowerPC IMC-PMU Mutex Misuse Vulnerability in IRQs Disabled Context

Vulnerability

A vulnerability has been identified in the Linux kernel's powerpc IMC-PMU component, where mutex locks are improperly used in sections with interrupts disabled. This issue can lead to performance warnings when certain debugging options are enabled. The vulnerability arises because the mutex_lock function can cause a thread to sleep, which is not permissible when interrupts are disabled, potentially leading to a deadlock situation. The warning can be triggered by executing a specific performance counter event while the system is in a sleep state, with the debug options CONFIG_DEBUG_ATOMIC_SLEEP and CONFIG_PROVE_LOCKING activated.

Impact

The vulnerability can cause performance degradation and potential deadlocks by allowing sleeping functions to be called in contexts where they could disrupt interrupt handling.

Reproduction

To reproduce this vulnerability, enable the CONFIG_DEBUG_ATOMIC_SLEEP and CONFIG_PROVE_LOCKING options in the Linux kernel. Then, run a thread IMC performance event while the system is in a sleep state. This will trigger a warning about sleeping functions being called from an invalid context, indicating that the mutex lock usage in the IMC-PMU code is problematic.

Remediation

The vulnerability has been addressed by changing the mutex lock to a spinlock, which is appropriate for use in interrupt-disabled contexts.

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

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
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.