AZL-118616: CVE-2026-143342 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: fix VLAN tag stripping on short and non-linear RX frames
stmmacrxvlan() reads the VLAN header straight from skb->data and removes it with skbpull(), assuming the header is fully present in the linear part of the skb. XDP can change the frame length and head layout before the tag is stripped.
An XDP program can use bpfxdpadjusttail() to shrink a frame to as little as ETHHLEN while bytes 12-13 still contain a VLAN ethertype. The driver then reads hvlanTCI past skb->len and pops the tag, leaving less than ETHHLEN in the skb. ethtypetrans() cannot pull the MAC header, so a malformed skb is passed up. The TCI is also read from the wrong place when the tag is not fully in the linear head, e.g. when it spans into a frag.
Read hvlanproto after pulling ETHHLEN into the linear part, and check it together with the device features. Only if the tag is actually going to be popped, pull VLANETHHLEN and re-derive the header pointer afterwards, as pskbmaypull() may reallocate the skb head. Return an error so the callers can drop a frame that claims a VLAN tag but cannot provide the full header. This also drops and counts frames shorter than ETHHLEN in rxdropped, even when VLAN RX offload is disabled; bpfxdpadjusthead() and bpfxdpadjusttail() cannot produce such a frame, so it only affects a runt that reaches the driver, and dropping it is safer than handing it to ethtypetrans().
Also move the XDP metadata written with bpfxdpadjustmeta() together with the MAC header when the tag is popped, so datameta still points at the metadata after ethtypetrans() anchors macheader, instead of at the first bytes of the destination MAC.
Affected Software
Event History
Frequently Asked Questions
Which systems are most relevant to this issue?
The affected package identified is azure-linux/kernel version 6.6.161.1-1. The vulnerable receive path is in the stmmac network driver and concerns VLAN tag stripping.
What is required to trigger the described condition?
The described trigger uses an XDP program calling bpf_xdp_adjust_tail() to shrink a received frame while VLAN ethertype bytes remain present. The problematic handling also applies when a VLAN header is not fully contained in the linear portion of the skb, such as when it spans into a fragment.
What behavior indicates the vulnerable path was reached?
A shortened frame claiming a VLAN tag can cause the driver to read the VLAN TCI beyond skb->len and remove the tag, leaving an skb shorter than an Ethernet header. eth_type_trans() then cannot pull the MAC header, and a malformed skb may be passed up the stack.