staging: fbtft: make dirty_lock IRQ-safe
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c296d5f9957c03994a699d6739c27d4581a9f6c7 · < f0c869df2c33793c8828acaab3e4a5e0176f9f00| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
staging: fbtft: make dirty_lock IRQ-safe
fbtft_mkdirty() can be reached from the fbcon rendering path while processing printk() in hardirq context. Meanwhile, dirty_lock is also taken by fbtft_deferred_io() in workqueue context with local interrupts enabled.
Lockdep reports a possible IRQ lock inversion involving dirty_lock and console_owner. A hardirq can interrupt a CPU holding dirty_lock and enter the console rendering path, which can attempt to acquire dirty_lock again.
The following lockdep report was observed on an RK3566 system with CONFIG_PROVE_LOCKING enabled:
WARNING: possible irq lock inversion dependency detected swapper/2/0 just changed the state of lock: (console_owner){-...}-{0:0} but this lock took another, HARDIRQ-unsafe lock in the past: (&par->dirty_lock){+.+.}-{2:2}
CPU0 CPU1 ---- ---- lock(&par->dirty_lock); local_irq_disable(); lock(console_owner); lock(&par->dirty_lock); <Interrupt> lock(console_owner);
*** DEADLOCK ***
From the CVE record · Linux
The Linux kernel’s staging fbtft driver has an IRQ-unsafe lock that can cause a deadlock. This can occur when console rendering runs during a hard interrupt while deferred I/O holds the same lock with interrupts enabled. The input does not establish an attacker-controlled trigger or authentication requirements.
Engineers running Linux kernels with the staging fbtft driver should check their affected versions; no version range is provided.