{"api_version":"1","generated_at":"2026-12-01T13:19:08+00:00","cve":"CVE-2026-139566","urls":{"html":"https://cve.report/CVE-2026-139566","api":"https://cve.report/api/cve/CVE-2026-139566.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139566","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139566"},"summary":{"title":"ice: rebuild ring stats arrays instead of reallocating them in place","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nice: rebuild ring stats arrays instead of reallocating them in place\n\nice_vsi_realloc_stat_arrays() resized the ring stats arrays in place\nwith krealloc_array(), sizing them from vsi->req_txq/req_rxq. That is\nnot what ice_vsi_set_num_qs() computes later in ice_vsi_cfg_def(), so\nafter a rebuild the arrays could end up shorter than vsi->alloc_txq /\nvsi->alloc_rxq, and ice_vsi_alloc_ring_stats() then walked past their\nend.\n\nThe VF case shows the divergence. ice_sriov_set_msix_vec_count() writes\nvsi->req_txq and then calls ice_vsi_rebuild(), so the old resizer sized\nfrom req_txq, while ice_vsi_get_num_qs() reads vf->num_req_qs ?:\nvf->num_vf_qs and ignores req_txq entirely. Once a guest has raised\nvf->num_req_qs through VIRTCHNL_OP_REQUEST_QUEUES the two disagree and\nthe arrays come out shorter than the alloc_txq/alloc_rxq the rebuild\ninstalls. The reset that such a request triggers is a different path,\nice_vf_reconfig_vsi(), which does not use this resizer at all; that one\nis handled by the next patch.\n\nReplace it with ice_vsi_resize_stat_arrays(), which allocates a fresh\nstruct ice_vsi_stats instead, sized with ice_vsi_get_num_qs() and the\nqueues ice_vsi_decfg() is about to return to the PF pool, which is\nexactly what ice_vsi_set_num_qs() will compute once they are back\nthere, barring a concurrent change of the PF pool; the next patch stops\nrelying on that. Copy the surviving entry pointers over and install\nthe new structure, all before ice_vsi_decfg() runs. The entries that\ndid not fit are freed by ice_vsi_free_unused_stat_arrays(); the old\ncontainer itself then goes through __ice_vsi_free_stats() with\n@free_entries set to false, since the entries it still points at now\nbelong to the new structure.\n\nAllocating up front also means a failure no longer leaves a half-updated\nice_vsi_stats behind, with the Tx array already swapped and its surplus\nTx entries already freed, but the Rx allocation failed.\n\nPut the allocate-install-free-surplus sequence in\nice_vsi_install_stat_arrays(), next to ice_vsi_new_stat_arrays(), so\nthat only the sizing decision is left in the resizer.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:37","updated_at":"2026-11-30 14:19:37"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/2f7b37855ac4e12bab04224b67645282bce55550","name":"https://git.kernel.org/stable/c/2f7b37855ac4e12bab04224b67645282bce55550","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/66444f06a9fe96ac49f5c168d06aaebbfa109c9e","name":"https://git.kernel.org/stable/c/66444f06a9fe96ac49f5c168d06aaebbfa109c9e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139566","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139566","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 2f7b37855ac4e12bab04224b67645282bce55550 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 66444f06a9fe96ac49f5c168d06aaebbfa109c9e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.3.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/net/ethernet/intel/ice/ice_lib.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"2f7b37855ac4e12bab04224b67645282bce55550","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"66444f06a9fe96ac49f5c168d06aaebbfa109c9e","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"7.3.6","status":"affected","version":"0","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/net/ethernet/intel/ice/ice_lib.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nice: rebuild ring stats arrays instead of reallocating them in place\n\nice_vsi_realloc_stat_arrays() resized the ring stats arrays in place\nwith krealloc_array(), sizing them from vsi->req_txq/req_rxq. That is\nnot what ice_vsi_set_num_qs() computes later in ice_vsi_cfg_def(), so\nafter a rebuild the arrays could end up shorter than vsi->alloc_txq /\nvsi->alloc_rxq, and ice_vsi_alloc_ring_stats() then walked past their\nend.\n\nThe VF case shows the divergence. ice_sriov_set_msix_vec_count() writes\nvsi->req_txq and then calls ice_vsi_rebuild(), so the old resizer sized\nfrom req_txq, while ice_vsi_get_num_qs() reads vf->num_req_qs ?:\nvf->num_vf_qs and ignores req_txq entirely. Once a guest has raised\nvf->num_req_qs through VIRTCHNL_OP_REQUEST_QUEUES the two disagree and\nthe arrays come out shorter than the alloc_txq/alloc_rxq the rebuild\ninstalls. The reset that such a request triggers is a different path,\nice_vf_reconfig_vsi(), which does not use this resizer at all; that one\nis handled by the next patch.\n\nReplace it with ice_vsi_resize_stat_arrays(), which allocates a fresh\nstruct ice_vsi_stats instead, sized with ice_vsi_get_num_qs() and the\nqueues ice_vsi_decfg() is about to return to the PF pool, which is\nexactly what ice_vsi_set_num_qs() will compute once they are back\nthere, barring a concurrent change of the PF pool; the next patch stops\nrelying on that. Copy the surviving entry pointers over and install\nthe new structure, all before ice_vsi_decfg() runs. The entries that\ndid not fit are freed by ice_vsi_free_unused_stat_arrays(); the old\ncontainer itself then goes through __ice_vsi_free_stats() with\n@free_entries set to false, since the entries it still points at now\nbelong to the new structure.\n\nAllocating up front also means a failure no longer leaves a half-updated\nice_vsi_stats behind, with the Tx array already swapped and its surplus\nTx entries already freed, but the Rx allocation failed.\n\nPut the allocate-install-free-surplus sequence in\nice_vsi_install_stat_arrays(), next to ice_vsi_new_stat_arrays(), so\nthat only the sizing decision is left in the resizer."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:35:56.600Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/2f7b37855ac4e12bab04224b67645282bce55550"},{"url":"https://git.kernel.org/stable/c/66444f06a9fe96ac49f5c168d06aaebbfa109c9e"}],"title":"ice: rebuild ring stats arrays instead of reallocating them in place","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139566","datePublished":"2026-11-30T13:35:56.600Z","dateReserved":"2026-11-30T13:22:15.941Z","dateUpdated":"2026-11-30T13:35:56.600Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:37","lastModifiedDate":"2026-11-30 14:19:37","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139566","Ordinal":"1","Title":"ice: rebuild ring stats arrays instead of reallocating them in p","CVE":"CVE-2026-139566","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139566","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nice: rebuild ring stats arrays instead of reallocating them in place\n\nice_vsi_realloc_stat_arrays() resized the ring stats arrays in place\nwith krealloc_array(), sizing them from vsi->req_txq/req_rxq. That is\nnot what ice_vsi_set_num_qs() computes later in ice_vsi_cfg_def(), so\nafter a rebuild the arrays could end up shorter than vsi->alloc_txq /\nvsi->alloc_rxq, and ice_vsi_alloc_ring_stats() then walked past their\nend.\n\nThe VF case shows the divergence. ice_sriov_set_msix_vec_count() writes\nvsi->req_txq and then calls ice_vsi_rebuild(), so the old resizer sized\nfrom req_txq, while ice_vsi_get_num_qs() reads vf->num_req_qs ?:\nvf->num_vf_qs and ignores req_txq entirely. Once a guest has raised\nvf->num_req_qs through VIRTCHNL_OP_REQUEST_QUEUES the two disagree and\nthe arrays come out shorter than the alloc_txq/alloc_rxq the rebuild\ninstalls. The reset that such a request triggers is a different path,\nice_vf_reconfig_vsi(), which does not use this resizer at all; that one\nis handled by the next patch.\n\nReplace it with ice_vsi_resize_stat_arrays(), which allocates a fresh\nstruct ice_vsi_stats instead, sized with ice_vsi_get_num_qs() and the\nqueues ice_vsi_decfg() is about to return to the PF pool, which is\nexactly what ice_vsi_set_num_qs() will compute once they are back\nthere, barring a concurrent change of the PF pool; the next patch stops\nrelying on that. Copy the surviving entry pointers over and install\nthe new structure, all before ice_vsi_decfg() runs. The entries that\ndid not fit are freed by ice_vsi_free_unused_stat_arrays(); the old\ncontainer itself then goes through __ice_vsi_free_stats() with\n@free_entries set to false, since the entries it still points at now\nbelong to the new structure.\n\nAllocating up front also means a failure no longer leaves a half-updated\nice_vsi_stats behind, with the Tx array already swapped and its surplus\nTx entries already freed, but the Rx allocation failed.\n\nPut the allocate-install-free-surplus sequence in\nice_vsi_install_stat_arrays(), next to ice_vsi_new_stat_arrays(), so\nthat only the sizing decision is left in the resizer.","Type":"Description","Title":"ice: rebuild ring stats arrays instead of reallocating them in p"}]}}}