# CVE-2026-31649: net: stmmac: fix integer underflow in chain mode

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2026-04-24 · Modified: 2026-11-10
- Aliases: UBUNTU-CVE-2026-31649, DEBIAN-CVE-2026-31649
- Record: https://cvemate.com/vulnerability/CVE-2026-31649 · JSON: https://cvemate.com/vulnerability/CVE-2026-31649/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

net: stmmac: fix integer underflow in chain mode

The jumbo_frm() chain-mode implementation unconditionally computes

    len = nopaged_len - bmax;

where nopaged_len = skb_headlen(skb) (linear bytes only) and bmax is
BUF_SIZE_8KiB or BUF_SIZE_2KiB.  However, the caller stmmac_xmit()
decides to invoke jumbo_frm() based on skb->len (total length including
page fragments):

    is_jumbo = stmmac_is_jumbo_frm(priv, skb->len, enh_desc);

When a packet has a small linear portion (nopaged_len <= bmax) but a
large total length due to page fragments (skb->len > bmax), the
subtraction wraps as an unsigned integer, producing a huge len value
(~0xFFFFxxxx).  This causes the while (len != 0) loop to execute
hundreds of thousands of iterations, passing skb->data + bmax * i
pointers far beyond the skb buffer to dma_map_single().  On IOMMU-less
SoCs (the typical deployment for stmmac), this maps arbitrary kernel
memory to the DMA engine, constituting a kernel memory disclosure and
potential memory corruption from hardware.

Fix this by introducing a buf_len local variable clamped to
min(nopaged_len, bmax).  Computing len = nopaged_len - buf_len is then
always safe: it is zero when the linear portion fits within a single
descriptor, causing the while (len != 0) loop to be skipped naturally,
and the fragment loop in stmmac_xmit() handles page fragments afterward.
```

## Signals

- CVSS: 9.8 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.597%, percentile 49.977%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 161)

- debian linux (Debian): \< 6.1.170-1 \| \< 6.12.85-1 \| \< 6.19.13-1
- ubuntu linux (Ubuntu): \< 3.13.0-215.266 \| \< 4.4.0-284.318 \| \< 4.15.0-254.266 \| \< 5.4.0-233.253 \| \< 5.15.0-185.195 \| \< 6.8.0-134.134 \| \< 6.17.0-40.40
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.4.0-1157.163 \| \< 4.4.0-1195.210 \| \< 4.15.0-1195.208 \| \< 5.4.0-1161.172 \| \< 5.15.0-1111.118 \| \< 6.8.0-1060.63 \| \< 6.17.0-1019.19
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1111.118~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1161.172~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.17 (Ubuntu): \< 6.17.0-1019.19~24.04.1
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1060.63~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2133.139 \| All versions (No fix recorded) \| \< 5.4.0-1161.172+fips1 \| \< 5.15.0-1111.118+fips1 \| \< 6.8.0-1060.63+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1195.208~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1205.220~14.04.1 \| \< 4.15.0-1205.220~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1166.172 \| \< 5.15.0-1116.125 \| \< 6.8.0-1063.71

## References (first 20 of 53)

- <https://git.kernel.org/stable/c/513e06735f5be575b409d195822195348b164e48>
- <https://git.kernel.org/stable/c/275bdf762e82082f064e60a92448fa2ac43cf95b>
- <https://git.kernel.org/stable/c/a2b68a9a476b9544ff31f1fbcd5d80867a8a5e2f>
- <https://git.kernel.org/stable/c/b7b8012193fd98236d7ae05d4b553f010a77b2ef>
- <https://git.kernel.org/stable/c/2c91b39912278d0878f9ba60ba04d2518b18a08d>
- <https://git.kernel.org/stable/c/6fca757c20396dc2e604dcc61922264e9e3dc803>
- <https://git.kernel.org/stable/c/10d12b9240ebf96c785f0e2e4228318cd5f3a3eb>
- <https://git.kernel.org/stable/c/51f4e090b9f87b40c21b6daadb5c06e6c0a07b67>
- <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- <https://ubuntu.com/security/CVE-2026-31649>
- <https://www.cve.org/CVERecord?id=CVE-2026-31649>
- <https://git.kernel.org/linus/51f4e090b9f87b40c21b6daadb5c06e6c0a07b67>
- <https://ubuntu.com/security/notices/USN-8490-1>
- <https://ubuntu.com/security/notices/USN-8491-1>
- <https://ubuntu.com/security/notices/USN-8492-1>
- <https://ubuntu.com/security/notices/USN-8493-1>
- <https://ubuntu.com/security/notices/USN-8492-2>
- <https://ubuntu.com/security/notices/USN-8497-1>
- <https://ubuntu.com/security/notices/USN-8498-1>

---

Data as of 2026-12-05T05:05:59.819Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
