CVE-2026-139481

net: stmmac: fix TX coalesce race and div-by-zero in XDP/legacy path

Published Nov 30, 2026 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

net: stmmac: fix TX coalesce race and div-by-zero in XDP/legacy path

tx_coal_frames[] is written by ethtool (stmmac_set_coalesce) and read
locklessly from the TX fast path (stmmac_xmit, stmmac_tso_xmit,
stmmac_xdp_xmit_zc and stmmac_xdp_xmit_xdpf), so pair every access
with READ_ONCE()/WRITE_ONCE() to mark the intentional data race and
read a consistent value into a local variable.

Moreover, ethtool allows disabling TX coalescing by setting
tx_max_coalesced_frames to 0: guard the modulo operation in
stmmac_xdp_xmit_xdpf() against a zero tx_coal_frames[queue] to avoid
a division by zero.

Both issues were found by code inspection while extending the XDP TX
path with multi-buff support, and neither has ever been triggered, so
they are only theoretical. Tested on the Qualcomm RB3-gen2 board.

Analysis

AI-generated

Technical impact

The kernel vulnerability involves a race condition between writes to the TX coalescing configuration via ethtool and lockless reads within the stmmac transmit path, in addition to a potential division‑by‑zero error when a zero coalescing frame count is used in a modulo operation. Both conditions are theoretical; they have not been seen in production but could lead to a kernel crash and loss of network functionality. The weakness lies in improper synchronization and lack of bounds checking, exposing the system to an integrity compromise of the kernel scheduler, which can interrupt all network operations.

Affected Systems

The flaw is present in the Linux kernel’s stmmac driver across all distributions that ship the stock mainline kernel with the buggy stmmac code. Any hardware that uses a stmmac network driver—common on many embedded and router platforms—could be impacted if the kernel version predates the fix merged in commit 237782c3d416b392a12642f32959e9d3c94e0c26. The vulnerability does not affect userland applications directly; it requires the device to have a network interface managed by stmmac.

Risk and Exploitability

No CVSS or EPSS scores are published, and the vulnerability is not listed in CISA KEV. The likely attack vector is local privileged access on the host to configure the interface via ethtool and generate traffic that triggers the race or division condition. Because the issue remains theoretical and has not been observed in the wild, the probability of exploitation is low, but the impact—kernel crash and service denial—is significant if it occurs.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that includes the stmmac coalesce race and division‑by‑zero patch (e.g., commit 237782c3d416b392a12642f32959e9d3c94e0c26 or later).
  • Before upgrading, do not set tx_max_coalesced_frames to 0; instead disable TX coalescing via ethtool or leave the default setting, thereby removing the division‑by‑zero scenario.
  • After applying the patch or configuration change, monitor dmesg and system logs for any kernel panics or network disruption, and promptly apply subsequent kernel updates that address related bugs.

Generated by OpenCVE AI on December 1, 2026 at 12:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-369
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-362
CWE-369
Type Values Removed Values Added
Weaknesses CWE-362
CWE-369
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: net: stmmac: fix TX coalesce race and div-by-zero in XDP/legacy path tx_coal_frames[] is written by ethtool (stmmac_set_coalesce) and read locklessly from the TX fast path (stmmac_xmit, stmmac_tso_xmit, stmmac_xdp_xmit_zc and stmmac_xdp_xmit_xdpf), so pair every access with READ_ONCE()/WRITE_ONCE() to mark the intentional data race and read a consistent value into a local variable. Moreover, ethtool allows disabling TX coalescing by setting tx_max_coalesced_frames to 0: guard the modulo operation in stmmac_xdp_xmit_xdpf() against a zero tx_coal_frames[queue] to avoid a division by zero. Both issues were found by code inspection while extending the XDP TX path with multi-buff support, and neither has ever been triggered, so they are only theoretical. Tested on the Qualcomm RB3-gen2 board.
Title net: stmmac: fix TX coalesce race and div-by-zero in XDP/legacy path
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:35 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:35 PM