From: Steffen Klassert <steffen.klassert@secunet.com>
To: Jiri Bohac <jbohac@suse.cz>
Cc: Sabrina Dubroca <sd@queasysnail.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
"Mike Maloney" <maloneykernel@gmail.com>,
Eric Dumazet <eric.dumazet@gmail.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] xfrm: fix MTU regression
Date: Wed, 19 Jan 2022 08:35:19 +0100 [thread overview]
Message-ID: <20220119073519.GJ1223722@gauss3.secunet.de> (raw)
In-Reply-To: <20220114174058.rqhtuwpfhq6czldn@dwarf.suse.cz>
On Fri, Jan 14, 2022 at 06:40:58PM +0100, Jiri Bohac wrote:
> Commit 749439bfac6e1a2932c582e2699f91d329658196 ("ipv6: fix udpv6
> sendmsg crash caused by too small MTU") breaks PMTU for xfrm.
>
> A Packet Too Big ICMPv6 message received in response to an ESP
> packet will prevent all further communication through the tunnel
> if the reported MTU minus the ESP overhead is smaller than 1280.
>
> E.g. in a case of a tunnel-mode ESP with sha256/aes the overhead
> is 92 bytes. Receiving a PTB with MTU of 1371 or less will result
> in all further packets in the tunnel dropped. A ping through the
> tunnel fails with "ping: sendmsg: Invalid argument".
>
> Apparently the MTU on the xfrm route is smaller than 1280 and
> fails the check inside ip6_setup_cork() added by 749439bf.
>
> We found this by debugging USGv6/ipv6ready failures. Failing
> tests are: "Phase-2 Interoperability Test Scenario IPsec" /
> 5.3.11 and 5.4.11 (Tunnel Mode: Fragmentation).
>
> Commit b515d2637276a3810d6595e10ab02c13bfd0b63a ("xfrm:
> xfrm_state_mtu should return at least 1280 for ipv6") attempted
> to fix this but caused another regression in TCP MSS calculations
> and had to be reverted.
>
> The patch below fixes the situation by dropping the MTU
> check and instead checking for the underflows described in the
> 749439bf commit message.
>
> Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Can you please add a 'Fixes:' tag so that it can be backported
to the stable trees?
Btw. this fixes a xfrm issue, but touches only generic IPv6 code.
To which tree should this patch be applied? I can take it to
the ipsec tee, but would also be ok if it is applied directly
to the net tree.
next prev parent reply other threads:[~2022-01-19 7:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 17:31 xfrm regression: TCP MSS calculation broken by commit b515d263, results in TCP stall Jiri Bohac
2022-01-14 17:40 ` [PATCH] xfrm: fix MTU regression Jiri Bohac
2022-01-19 7:35 ` Steffen Klassert [this message]
2022-01-19 9:12 ` Jiri Bohac
2022-01-19 9:22 ` [PATCH v2] " Jiri Bohac
2022-01-26 6:41 ` Steffen Klassert
2022-01-24 15:45 ` [PATCH] " Steffen Klassert
2022-01-25 9:41 ` Jiri Bohac
2022-01-26 6:42 ` Steffen Klassert
2022-01-26 15:00 ` [PATCH] Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6" Jiri Bohac
2022-02-01 6:46 ` Steffen Klassert
2022-02-15 14:59 ` Thorsten Leemhuis
2022-02-16 11:02 ` Steffen Klassert
2022-01-16 10:18 ` xfrm regression: TCP MSS calculation broken by commit b515d263, results in TCP stall Thorsten Leemhuis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220119073519.GJ1223722@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=jbohac@suse.cz \
--cc=maloneykernel@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sd@queasysnail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).