CVE-2026-139472: bng_en: pad short frames before sampling nr_frags
In the Linux kernel, the following vulnerability has been resolved:
bngen: pad short frames before sampling nrfrags
bngestartxmit() samples skbshinfo(skb)->nrfrags into lastfrag, and stores it in txbuf->nrfrags, before calling ethskbpad().
If a nonlinear skb is shorter than ETHZLEN, skbpad() calls skblinearize(), which pulls the frags into the linear part, releases the frag pages and sets nrfrags to zero.
bngestartxmit() then uses the stale lastfrag to fill TXBDCNT() and to walk skbshinfo(skb)->frags[], DMA-mapping pages the skb no longer holds a reference on, and sending their content twice.
Fix this by calling ethskbpad() before nrfrags is sampled.
Found by Sashiko while reviewing the similar bnxten fix.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In bnge_start_xmit() in the bnxt_en driver, call eth_skb_pad() before sampling skb_shinfo(skb)->nr_frags.
Event History
Frequently Asked Questions
What traffic condition is required to trigger this issue?
The transmit path must handle a nonlinear socket buffer shorter than ETH_ZLEN. Padding such a frame can linearize it and reduce its fragment count to zero after the driver has already saved the old count.
What is the practical impact if the vulnerable path is reached?
The driver can use a stale fragment count to construct transmit descriptors and DMA-map fragment pages it no longer references. This can cause stale page content to be transmitted a second time.
How can I tell whether a system is affected?
Check whether the installed Linux kernel includes the bng_en change that calls eth_skb_pad() before sampling skb_shinfo(skb)->nr_frags in bnge_start_xmit(). The provided stable references identify commits containing the fix.