CVE-2026-98094: staging: fbtft: make dirty_lock IRQ-safe
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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 ***
Use spin_lock_irqsave() for fbtft_mkdirty() and spin_lock_irq() for fbtft_deferred_io(). They only access the dirty line range, so the IRQ-off regions remain short.
The Linux kernel CVE team has assigned CVE-2026-98094 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.0 with commit c296d5f9957c03994a699d6739c27d4581a9f6c7 and fixed in 6.12.111 with commit 2a609e29efbba79f9abd68c4ec8a2bd7ecf291e7 Issue introduced in 4.0 with commit c296d5f9957c03994a699d6739c27d4581a9f6c7 and fixed in 6.18.53 with commit f0c869df2c33793c8828acaab3e4a5e0176f9f00 Issue introduced in 4.0 with commit c296d5f9957c03994a699d6739c27d4581a9f6c7 and fixed in 7.2.7 with commit dcb48fde8003492256dee45815144aa5ed26ce7c Issue introduced in 4.0 with commit c296d5f9957c03994a699d6739c27d4581a9f6c7 and fixed in 7.3-rc2 with commit f576944a59f31bcffff121117ebf452c5dd162b7
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98094
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/staging/fbtft/fbtft-core.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/2a609e29efbba79f9abd68c4ec8a2bd7ecf291e7 https://git.kernel.org/stable/c/f0c869df2c33793c8828acaab3e4a5e0176f9f00 https://git.kernel.org/stable/c/dcb48fde8003492256dee45815144aa5ed26ce7c https://git.kernel.org/stable/c/f576944a59f31bcffff121117ebf452c5dd162b7