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)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 19 Oct 2022 07:00:53 +0000 (09:00 +0200)
commit4b549ccce941798703f159b227aa28c716aa78fa
tree3fa86e1058150975d089ffa94dfe041fede45d0a
parentd83f7040e18489265b4b121f33f99b02e52dabda
xfrm: replay: Fix ESN wrap around for GSO

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>
net/ipv4/esp4_offload.c
net/ipv6/esp6_offload.c
net/xfrm/xfrm_device.c
net/xfrm/xfrm_replay.c