PT-2026-166529

CVE-2026-142806

·

Publicado

2026-12-03

·

Atualizado

2026-12-03

Descrição por

Pontuação
N/A
Não disponível

Não há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.

In the Linux kernel, the following vulnerability has been resolved:
net/sched: sch teql: fix slaves lock IRQ deadlock
This is a followup of commit e5b811fe7931 ("net/sched: sch teql: Introduce slaves lock to avoid race condition and UAF") as reported by Sashiko.
The issue: master->slaves lock serializes the master's ring of slave qdiscs. The control paths -- teql dequeue(), teql destroy() and teql qdisc init() -- take it with spin lock bh(), while teql master xmit() (the master's ndo start xmit) takes it with plain spin lock().
netpoll send skb() wraps the transmit in local irq save(), and netpoll send skb() asserts lockdep assert irqs disabled(), so teql master xmit() reached from netconsole always acquires slaves lock with hard IRQs disabled. On PREEMPT RT spinlock t is an rtmutex, and Documentation/locking/locktypes.rst names
local irq disable();
spin lock(&lock);
as a sequence that breaks there because the rtmutex requires a fully preemptible context. This is reachable without any panic: the nbcon printer thread calls netconsole's write thread() callback on every message. The usual remedy -- folding the IRQ disable into the lock with spin lock irqsave() -- is unavailable because the local irq save() is netpoll's, not ours.
On non-RT the same asymmetry leaves slaves lock acquirable with hard IRQs disabled on one path and held with hard IRQs enabled on another. That is only exploitable during the panic console flush (netconsole is CON NBCON ATOMIC UNSAFE, so console is usable() admits its write atomic() only from nbcon atomic flush unsafe(), which panic() alone calls), and even then an IRQ-saving lock does not help if the holder oopsed inside the section or was stopped by panic other cpus shutdown(). So the non-RT half is hardening; the PREEMPT RT half is the bug.
The Fix: take slaves lock as a raw spinlock with IRQs saved at every site. Since skb queue purge() takes the queue's spinlock t and may not nest inside a raw lock on PREEMPT RT, move its call in teql destroy() outside the raw section; dat->q is the dying qdisc's own queue and was never serialized by slaves lock, so the move is behaviour-neutral.
The new critical sections contain only RCU pointer assignments and netdev get tx queue(); skb queue purge(), netif wake queue() and dev reset queue() are all outside them. teql destroy()'s ring walk is O(slaves), two pointer loads and a compare per iteration, so even a large ring is microseconds with IRQs off. Keeping the purge conditional rather than dropping it outright is the conservative call for a backport.
Some context: commit 6301f6a34ed8 ("net/sched: sch teql: move rcu read lock()/spin lock() from bh variants") hardened the parent fix; together they addressed the master->slaves resurrection use-after-free and the xmit-side BH warning but left the reverse direction -- a hard IRQ re-entering xmit while a control path holds the lock -- unaddressed.
Conditions to recreate the bug:
  • CONFIG PREEMPT RT, CONFIG NET SCH TEQL, CONFIG DUMMY and CONFIG NETCONSOLE.
  • Run ip link add dev teqlslave0 type dummy, bring teqlslave0 up, attach it with tc qdisc add dev teqlslave0 root teql0, and bring teql0 up.
  • Configure a netconsole target on teql0 with explicit local and remote IP addresses and a remote MAC address, then emit a console message. The nbcon printer thread reaches teql master xmit() with hard IRQs disabled by netpoll; taking slaves lock as a spinlock t is invalid on PREEMPT RT. No panic or concurrent qdisc change is required.
  • Reachable by an admin with CAP NET ADMIN; teql devices exist only in the initial netns (no per-netns ops), so a user namespace does not suffice.
Fornecedores
Produtos afetados
Identificadores relacionados
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾