ice: size ring stats arrays from the final queue count

Summary

CVECVE-2026-139565
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:19:37 UTC
Updated2026-11-30 14:19:37 UTC
DescriptionIn 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---

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 288ecf491b1654845ae99c79b7fefad2d3ea47bd 3e010b031f15c6fd56eeea6d0800f02038e29fbd git Not specified
CNA Linux Linux affected 288ecf491b1654845ae99c79b7fefad2d3ea47bd f1c3b87896e656c1940a1dc3e2f286e000c62da8 git Not specified
CNA Linux Linux affected 6.2 Not specified
CNA Linux Linux unaffected 6.2 semver Not specified
CNA Linux Linux unaffected 7.3.6 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/f1c3b87896e656c1940a1dc3e2f286e000c62da8 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/3e010b031f15c6fd56eeea6d0800f02038e29fbd 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report