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

Published Apr 24, 2026
·
Updated

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

net: stmmac: fix integer underflow in chain mode

The jumbofrm() chain-mode implementation unconditionally computes

len = nopagedlen - bmax;

where nopagedlen = skbheadlen(skb) (linear bytes only) and bmax is BUFSIZE8KiB or BUFSIZE2KiB. However, the caller stmmacxmit() decides to invoke jumbofrm() based on skb->len (total length including page fragments):

isjumbo = stmmacisjumbofrm(priv, skb->len, enhdesc);

When a packet has a small linear portion (nopagedlen <= 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 dmamapsingle(). 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 buflen local variable clamped to min(nopagedlen, bmax). Computing len = nopagedlen - buflen 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 stmmacxmit() handles page fragments afterward.

Affected Software

17 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=3.2.1<5.10.253
Linux Linux kernel>=5.11<5.15.203
Linux Linux kernel>=5.16<6.1.169
Linux Linux kernel>=6.2<6.6.135
Linux Linux kernel>=6.7<6.12.82
Linux Linux kernel>=6.13<6.18.23
Linux Linux kernel>=6.19<6.19.13
Linux Linux kernel=3.2
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
Linux Linux kernel=7.0-rc6
Linux Linux kernel=7.0-rc7
Microsoft azl3 kernel 6.6.134.1-2

Event History

Apr 24, 2026
CVE Published
via MITRE·02:45 PM
Data Sourced
via MITRE·02:45 PM
DescriptionSeverity
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 26, 2026
Data Sourced
via Microsoft·08:08 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:08 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2026-31649?

CVE-2026-31649 is considered a moderate severity vulnerability due to the potential for integer underflow exploitation.

2

How do I fix CVE-2026-31649?

To fix CVE-2026-31649, update the Linux kernel to the latest stable version where the vulnerability is patched.

3

What types of systems are affected by CVE-2026-31649?

CVE-2026-31649 affects systems running the Linux kernel with the stmmac driver in chain mode.

4

What are the potential consequences of CVE-2026-31649?

Exploitation of CVE-2026-31649 may lead to system crashes or other unexpected behaviors due to the integer underflow.

5

Is CVE-2026-31649 actively being exploited in the wild?

As of now, there are no reported active exploits for CVE-2026-31649, but vigilance is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203