AZL-117232: CVE-2026-139566 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ice: rebuild ring stats arrays instead of reallocating them in place
icevsireallocstatarrays() resized the ring stats arrays in place with kreallocarray(), sizing them from vsi->reqtxq/reqrxq. That is not what icevsisetnumqs() computes later in icevsicfgdef(), so after a rebuild the arrays could end up shorter than vsi->alloctxq / vsi->allocrxq, and icevsiallocringstats() then walked past their end.
The VF case shows the divergence. icesriovsetmsixveccount() writes vsi->reqtxq and then calls icevsirebuild(), so the old resizer sized from reqtxq, while icevsigetnumqs() reads vf->numreqqs ?: vf->numvfqs and ignores reqtxq entirely. Once a guest has raised vf->numreqqs through VIRTCHNLOPREQUESTQUEUES the two disagree and the arrays come out shorter than the alloctxq/allocrxq the rebuild installs. The reset that such a request triggers is a different path, icevfreconfigvsi(), which does not use this resizer at all; that one is handled by the next patch.
Replace it with icevsiresizestatarrays(), which allocates a fresh struct icevsistats instead, sized with icevsigetnumqs() and the queues icevsidecfg() is about to return to the PF pool, which is exactly what icevsisetnumqs() will compute once they are back there, barring a concurrent change of the PF pool; the next patch stops relying on that. Copy the surviving entry pointers over and install the new structure, all before icevsidecfg() runs. The entries that did not fit are freed by icevsifreeunusedstatarrays(); the old container itself then goes through icevsifreestats() with @freeentries set to false, since the entries it still points at now belong to the new structure.
Allocating up front also means a failure no longer leaves a half-updated icevsistats behind, with the Tx array already swapped and its surplus Tx entries already freed, but the Rx allocation failed.
Put the allocate-install-free-surplus sequence in icevsiinstallstatarrays(), next to icevsinewstatarrays(), so that only the sizing decision is left in the resizer.
Affected Software
Event History
Frequently Asked Questions
Which deployments are most likely exposed to this issue?
The described divergence occurs in the ice driver's SR-IOV virtual-function handling. It requires a VF whose requested queue count can differ from the queue count used during VSI rebuild calculations.
What attacker-controlled action is involved?
A guest can raise vf->num_req_qs through VIRTCHNL_OP_REQUEST_QUEUES. If a subsequent rebuild uses the affected resizing logic, the ring statistics arrays may be shorter than the allocated TX/RX queue counts and can be accessed out of bounds.