PT-2026-163606
CVE-2026-139565
·
Publicado
2026-11-30
·
Atualizado
2026-11-30
Descrição por
Pontuação
N/A
Não disponívelNã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:
ice: size ring stats arrays from the final queue count
The ring stats arrays were sized in one place and indexed in another,
with nothing reconciling the two. ice vsi alloc stat arrays() gave up as
soon as a container existed:
if (pf->vsi stats[vsi->idx])
/* realloc will happen in rebuild path */
return 0;while ice vsi alloc ring stats() walks the arrays with
ice for each alloc txq() / ice for each alloc rxq(), that is, up to
vsi->alloc txq / vsi->alloc rxq. Whenever the arrays are shorter than
the count ice vsi set num qs() ends up computing, that loop reads and
stores past the end of the kmalloc'ed pointer arrays.
Deferring to "the rebuild path" does not hold. It cannot get the size
right, and some paths never call it at all.
ice devlink reinit down() is one of the latter. It calls ice vsi decfg()
directly, which does not free pf->vsi stats[], and nothing on the way
down releases the main VSI's entry either: ice dealloc vsis() runs only
from ice init()/ice deinit(), and the single entry that ice unload()
does drop is the control VSI's, via ice deinit fdir(). The main VSI's
arrays therefore survive the reload, while ice devlink reinit up() runs
ice vsi cfg() and recomputes the count from
netif get num default rss queues(), which follows cpu online mask.
Sizing the arrays with most CPUs offline and then onlining them is
enough, no VF involved:
for c in /sys/devices/system/cpu/cpu[0-9]/online; do echo 0 > $c; done
echo 0000:18:00.0 > /sys/bus/pci/drivers/ice/unbind
echo 0000:18:00.0 > /sys/bus/pci/drivers/ice/bind
for c in /sys/devices/system/cpu/cpu[0-9]/online; do echo 1 > $c; done
devlink dev reload pci/0000:18:00.0 action driver reinit
The unbind/bind is what makes the arrays actually be allocated at the
small size; a reload alone only reuses them.
The read then runs off the end of tx ring stats[] and picks up whatever
follows it in kmalloc-32. Here that was a string, 0x74756f5f6c697475
spelling "util out" in memory order. It is stored into ring->ring stats
and faults on the first dereference, in ice setup tx ring(), call trace:
RIP: 0010:ice setup tx ring+0x8d/0xe0 [ice]
ice vsi setup tx rings+0x2a/0x80 [ice]
ice vsi open+0x28/0x170 [ice]
ice open internal+0xc9/0x160 [ice]
dev open+0x138/0x2b0
dev change flags+0x1d5/0x250
netif change flags+0x21/0x60
do setlink.constprop.0+0x336/0xcf0
rtnl newlink+0x4a4/0x9b0
Even where the rebuild path does run, it sizes the arrays before
ice vsi decfg() returns the queues to the PF pool, and for an
ICE VSI PF VSI with no explicit request it derives the count from that
shared pool. Nothing serializes it against the recount in
ice vsi set num qs(), so a concurrent release, say
"echo 0 > sriov numvfs", leaves the final count larger than the arrays
that were already installed.
ice vsi alloc stat arrays() runs from ice vsi cfg def(), right after
ice vsi alloc def() called ice vsi set num qs(), so it is the first
place where the queue count is final. Make it the only authority: keep
the existing arrays when they are already long enough, and otherwise
grow them with ice vsi install stat arrays(), which carries the
surviving entries over. The check only forces a grow: while both arrays
are long enough they are kept, an oversized one being merely wasteful.
Once either is too short the whole container is replaced, and then the
other one follows the final count too, shrinking if that is what it
takes.
Michal Schmidt hit the same corruption through the VF path, where a
guest raises its queue count with VIRTCHNL OP REQUEST QUEUES and the
following VF reset reconfigures the VSI with the larger count while the
old, shorter arrays are still installed:
BUG: KASAN: slab-out-of-bounds in ice vsi alloc ring stats+0x385/0x4a0 [ice]
Workqueue: ice ice service task [ice]
Call Trace:
kasan report+0xd7/0x120
ice vsi alloc ring stats+0x385/0x4a0 [ice]
ice vsi cfg def+0
---truncated---
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾