{
  "id": "CVE-2026-31649",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-31649",
  "published_at": "2026-04-24T14:45:02.52Z",
  "title": "net: stmmac: fix integer underflow in chain mode",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: stmmac: fix integer underflow in chain mode\n\nThe jumbo_frm() chain-mode implementation unconditionally computes\n\n    len = nopaged_len - bmax;\n\nwhere nopaged_len = skb_headlen(skb) (linear bytes only) and bmax is\nBUF_SIZE_8KiB or BUF_SIZE_2KiB.  However, the caller stmmac_xmit()\ndecides to invoke jumbo_frm() based on skb-\u003elen (total length including\npage fragments):\n\n    is_jumbo = stmmac_is_jumbo_frm(priv, skb-\u003elen, enh_desc);\n\nWhen a packet has a small linear portion (nopaged_len \u003c= bmax) but a\nlarge total length due to page fragments (skb-\u003elen \u003e bmax), the\nsubtraction wraps as an unsigned integer, producing a huge len value\n(~0xFFFFxxxx).  This causes the while (len != 0) loop to execute\nhundreds of thousands of iterations, passing skb-\u003edata + bmax * i\npointers far beyond the skb buffer to dma_map_single().  On IOMMU-less\nSoCs (the typical deployment for stmmac), this maps arbitrary kernel\nmemory to the DMA engine, constituting a kernel memory disclosure and\npotential memory corruption from hardware.\n\nFix this by introducing a buf_len local variable clamped to\nmin(nopaged_len, bmax).  Computing len = nopaged_len - buf_len is then\nalways safe: it is zero when the linear portion fits within a single\ndescriptor, causing the while (len != 0) loop to be skipped naturally,\nand the fragment loop in stmmac_xmit() handles page fragments afterward.",
  "cwe": "CWE-190",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:3.2:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c 513e06735f5be575b409d195822195348b164e48",
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c 275bdf762e82082f064e60a92448fa2ac43cf95b",
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c a2b68a9a476b9544ff31f1fbcd5d80867a8a5e2f",
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c b7b8012193fd98236d7ae05d4b553f010a77b2ef",
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c 2c91b39912278d0878f9ba60ba04d2518b18a08d",
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c 6fca757c20396dc2e604dcc61922264e9e3dc803",
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c 10d12b9240ebf96c785f0e2e4228318cd5f3a3eb",
          "\u003e= 286a837217204b1ef105e3a554d0757e4fdfaac1, \u003c 51f4e090b9f87b40c21b6daadb5c06e6c0a07b67"
        ],
        "fixed_in": [
          "513e06735f5be575b409d195822195348b164e48",
          "275bdf762e82082f064e60a92448fa2ac43cf95b",
          "a2b68a9a476b9544ff31f1fbcd5d80867a8a5e2f",
          "b7b8012193fd98236d7ae05d4b553f010a77b2ef",
          "2c91b39912278d0878f9ba60ba04d2518b18a08d",
          "6fca757c20396dc2e604dcc61922264e9e3dc803",
          "10d12b9240ebf96c785f0e2e4228318cd5f3a3eb",
          "51f4e090b9f87b40c21b6daadb5c06e6c0a07b67"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "3.2"
        ],
        "fixed_in": [
          "0",
          "5.10.253",
          "5.15.203",
          "6.1.169",
          "6.6.135",
          "6.12.82",
          "6.18.23",
          "6.19.13",
          "7.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 513e06735f5be575b409d195822195348b164e48 or 275bdf762e82082f064e60a92448fa2ac43cf95b or a2b68a9a476b9544ff31f1fbcd5d80867a8a5e2f or b7b8012193fd98236d7ae05d4b553f010a77b2ef or 2c91b39912278d0878f9ba60ba04d2518b18a08d or 6fca757c20396dc2e604dcc61922264e9e3dc803 or 10d12b9240ebf96c785f0e2e4228318cd5f3a3eb or 51f4e090b9f87b40c21b6daadb5c06e6c0a07b67 or later.",
      "Upgrade Linux to 0 or 5.10.253 or 5.15.203 or 6.1.169 or 6.6.135 or 6.12.82 or 6.18.23 or 6.19.13 or 7.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
