{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2"
            },
            {
              "fixed": "2f7b37855ac4e12bab04224b67645282bce55550"
            },
            {
              "fixed": "66444f06a9fe96ac49f5c168d06aaebbfa109c9e"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "7.3.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139566.json"
  },
  "details": "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-\u003ereq_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-\u003ealloc_txq /\nvsi-\u003ealloc_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-\u003ereq_txq and then calls ice_vsi_rebuild(), so the old resizer sized\nfrom req_txq, while ice_vsi_get_num_qs() reads vf-\u003enum_req_qs ?:\nvf-\u003enum_vf_qs and ignores req_txq entirely. Once a guest has raised\nvf-\u003enum_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.",
  "id": "CVE-2026-139566",
  "modified": "2026-11-30T14:45:24.619370554Z",
  "published": "2026-11-30T13:35:56.600Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/2f7b37855ac4e12bab04224b67645282bce55550"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/66444f06a9fe96ac49f5c168d06aaebbfa109c9e"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139566.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139566"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "ice: rebuild ring stats arrays instead of reallocating them in place"
}