Linux kernel deadlock in mce_kbd key locking
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: rc: mce_kbd: Fix inconsistent locking of keylock
data->keylock is taken with spin_lock() in ir_mce_kbd_decode(), which runs in the raw IR decode kthread with local interrupts enabled, but with spin_lock_irqsave() in mce_kbd_rx_timeout(), the rx_timeout timer callback, which runs in softirq context.
If the decode kthread is holding keylock via spin_lock() when a timer interrupt fires on the same CPU and the softirq runs mce_kbd_rx_timeout(), the softirq spins forever waiting for a lock that only the now-preempted kthread can release, while the kthread cannot run again until the softirq gives up the CPU. This deadlocks the CPU.
From the CVE record · Linux
The Linux kernel’s mce_kbd IR decoder and timeout callback use inconsistent locking. If a timer interrupt occurs on the same CPU while the decode thread holds the lock, the CPU can deadlock. The input does not specify an attacker, authentication requirement, or user interaction.
Engineers running Linux kernels with the mce_kbd component should check their versions; affected versions are not specified.