]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
xfrm: replay: Fix ESN wrap around for GSO
authorChristian Langrock <christian.langrock@secunet.com>
Mon, 17 Oct 2022 06:34:47 +0000 (08:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:00:25 +0000 (14:00 +0100)
commit7c338c4629d88f0762fff58ead06da12fa8ef150
treec8605cec7055e35f6d046dba7dceceacfe710cfc
parentfe15a3b77a1223731320732902d547c6789e145e
xfrm: replay: Fix ESN wrap around for GSO

[ Upstream commit 4b549ccce941798703f159b227aa28c716aa78fa ]

When using GSO it can happen that the wrong seq_hi is used for the last
packets before the wrap around. This can lead to double usage of a
sequence number. To avoid this, we should serialize this last GSO
packet.

Fixes: d7dbefc45cf5 ("xfrm: Add xfrm_replay_overflow functions for offloading")
Co-developed-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Christian Langrock <christian.langrock@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 0c69a4658e94d3d66b96c5c181ff32698c974a3b)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
net/ipv4/esp4_offload.c
net/ipv6/esp6_offload.c
net/xfrm/xfrm_device.c
net/xfrm/xfrm_replay.c