]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfrm: Set transport header to fix UDP GRO handling
authorTobias Brunner <tobias@strongswan.org>
Tue, 24 Jun 2025 12:47:20 +0000 (14:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:48:40 +0000 (09:48 +0100)
commit07ab459024461d43af0266ae5fa73f7ad988d5aa
treef53396fe150b6e59a84bf022920f00b9e17a0d15
parent085f24f0be5517f89df5371a81567dfa807e5dfc
xfrm: Set transport header to fix UDP GRO handling

[ Upstream commit 3ac9e29211fa2df5539ba0d742c8fe9fe95fdc79 ]

The referenced commit replaced a call to __xfrm4|6_udp_encap_rcv() with
a custom check for non-ESP markers.  But what the called function also
did was setting the transport header to the ESP header.  The function
that follows, esp4|6_gro_receive(), relies on that being set when it calls
xfrm_parse_spi().  We have to set the full offset as the skb's head was
not moved yet so adding just the UDP header length won't work.

Fixes: e3fd05777685 ("xfrm: Fix UDP GRO handling for some corner cases")
Signed-off-by: Tobias Brunner <tobias@strongswan.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/xfrm4_input.c
net/ipv6/xfrm6_input.c