CVE-2026-143217: ipvlan: make outbound skb headers writable
In the Linux kernel, the following vulnerability has been resolved:
ipvlan: make outbound skb headers writable
In L3 and L3S modes, ipvlanprocessv4outbound() and ipvlanprocessv6outbound() hand the skb to iplocalout() and ip6localout(). The IP output path assumes it owns the network header: iplocalout() rewrites totlen and the header checksum, and transport-mode XFRM can memmove the network header into the headroom when xfrmskbcheckspace() finds enough room, without copying.
The skb reaching ipvlan can have its header shared with another skb, for example after an AFPACKET tap on the ipvlan device or a tc mirred mirror action. pskbnetworkmaypull() only makes the header linear; it does not unshare an already linear head. The writes above then modify the other skb. If that skb is on the receive path and its IPv4 header was already validated, IPv4 option processing can use the modified header, write past the linear data, and corrupt skbsharedinfo.
Use skbcowhead() before taking header pointers and entering the local IP output path, like ipforward() does with skbcow() before it touches the header. Only checking skbheadercloned() is enough here: skbs that TCP transmits are clones of the write-queue skb, whose header area has been released with skbheaderrelease(). Their headers are private, so they are not copied, which avoids a reallocation for every TCP segment sent through an ipvlan slave.
If the allocation fails, the existing error accounting and drop paths are used. L2 mode is unaffected.
[edumazet: use skbcowhead() instead of skbunclone() to avoid copying every TCP segment, reword changelog]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In L3 and L3S modes, call skb_cow_head() in ipvlan_process_v4_outbound() and ipvlan_process_v6_outbound() before taking network-header pointers and handing the skb to local output, so the skb header is writable.
Event History
Frequently Asked Questions
Which ipvlan configurations are affected?
The issue affects ipvlan traffic processed in L3 and L3S modes, where outbound IPv4 or IPv6 packets are passed to the local IP output path.
What packet-processing conditions can trigger the unsafe shared-header state?
The outbound skb header must be shared with another skb. The description gives an AF_PACKET tap on the ipvlan device and a tc mirred mirror action as examples that can create this condition.
What does the fix need to do?
Before taking network-header pointers and entering the local IP output path, the skb header must be made writable with skb_cow_head(). This prevents output-path header updates from modifying another skb that shares the header.