]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfrm: BEET mode doesn't support fragments for inner packets
authorXin Long <lucien.xin@gmail.com>
Fri, 19 Mar 2021 10:27:58 +0000 (18:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:13:19 +0000 (13:13 +0200)
commit39bc1efe43b086e55019d765a8eb2952b6b89392
tree7d5ebb4dc239b5080e89618dbaca4a76d126688e
parente553ea86aad38784b92ae0a59a79137236e513a7
xfrm: BEET mode doesn't support fragments for inner packets

[ Upstream commit 68dc022d04eb0fd60a540e242dcb11ec1bee07e2 ]

BEET mode replaces the IP(6) Headers with new IP(6) Headers when sending
packets. However, when it's a fragment before the replacement, currently
kernel keeps the fragment flag and replace the address field then encaps
it with ESP. It would cause in RX side the fragments to get reassembled
before decapping with ESP, which is incorrect.

In Xiumei's testing, these fragments went over an xfrm interface and got
encapped with ESP in the device driver, and the traffic was broken.

I don't have a good way to fix it, but only to warn this out in dmesg.

Reported-by: Xiumei Mu <xmu@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_output.c