diff options
| author | Jianbo Liu <jianbol@nvidia.com> | 2024-11-12 14:10:31 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-08 09:58:00 +0100 |
| commit | 87fdd4c4478f1741d69c6f7cb0bf2eeb1e3588c7 (patch) | |
| tree | 095350d046366897073ad75db3039b282685b311 /include/uapi | |
| parent | e69a9ca0c93e2d1041a158d22e17621cc23399a4 (diff) | |
| download | linux-87fdd4c4478f1741d69c6f7cb0bf2eeb1e3588c7.tar.gz linux-87fdd4c4478f1741d69c6f7cb0bf2eeb1e3588c7.tar.bz2 linux-87fdd4c4478f1741d69c6f7cb0bf2eeb1e3588c7.zip | |
xfrm: replay: Fix the update of replay_esn->oseq_hi for GSO
[ Upstream commit c05c5e5aa163f4682ca97a2f0536575fc7dbdecb ]
When skb needs GSO and wrap around happens, if xo->seq.low (seqno of
the first skb segment) is before the last seq number but oseq (seqno
of the last segment) is after it, xo->seq.low is still bigger than
replay_esn->oseq while oseq is smaller than it, so the update of
replay_esn->oseq_hi is missed for this case wrap around because of
the change in the cited commit.
For example, if sending a packet with gso_segs=3 while old
replay_esn->oseq=0xfffffffe, we calculate:
xo->seq.low = 0xfffffffe + 1 = 0x0xffffffff
oseq = 0xfffffffe + 3 = 0x1
(oseq < replay_esn->oseq) is true, but (xo->seq.low <
replay_esn->oseq) is false, so replay_esn->oseq_hi is not incremented.
To fix this issue, change the outer checking back for the update of
replay_esn->oseq_hi. And add new checking inside for the update of
packet's oseq_hi.
Fixes: 4b549ccce941 ("xfrm: replay: Fix ESN wrap around for GSO")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions
