[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d5cd426e18be_67732ae0ef5705bc4@john-XPS-13-9370.notmuch>
Date: Tue, 20 Aug 2019 22:18:30 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>,
David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: various TLS bug fixes...
Jakub Kicinski wrote:
> On Tue, 20 Aug 2019 16:05:17 -0700 (PDT), David Miller wrote:
> > Jakub,
> >
> > I just did a batch of networking -stable submissions, however I ran
> > into some troubles with the various TLS backports.
>
> Yes, the TLS back ports are a little messy :S
>
> > I was able to backport commit 414776621d10 ("net/tls: prevent
> > skb_orphan() from leaking TLS plain text with offload") to v5.2
> > but not to v4.19
>
> We can probably leave that out of v4.19. The only practical scenario
> where the issue occurs to my knowledge is if admin configured TC
> redirect, or netem in the setup. Let me know if you'd rather we did the
> backport, I'm not 100% sure the risk/benefit ratio is favourable.
>
> > I was not able to backport neither d85f01775850 ("net: tls, fix
> > sk_write_space NULL write when tx disabled") nor commit 57c722e932cf
> > ("net/tls: swap sk_write_space on close") to any release. It seems
> > like there are a bunch of dependencies and perhaps other fixes.
>
> Right, those should still be applicable but John and I rejigged
> the close path quite a bit. I think the back port would be this:
Looks correct to me but would need to double check as well.
>
> diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
> index 4c0ac79f82d4..3288bdff9889 100644
> --- a/net/tls/tls_main.c
> +++ b/net/tls/tls_main.c
> @@ -301,6 +301,8 @@ static void tls_sk_proto_close(struct sock *sk, long timeout)
> #else
> {
> #endif
> + if (sk->sk_write_space == tls_write_space)
> + sk->sk_write_space = ctx->sk_write_space;
> tls_ctx_free(ctx);
> ctx = NULL;
> }
>
> > I suspect you've triaged through this already on your side for other
> > reasons, so perhaps you could help come up with a sane set of TLS
> > bug fix backports that would be appropriate for -stable?
>
> I'm planning to spend tomorrow working exactly on v4.19 backport.
> I have internal reports of openssl failing on v4.19 while v4.20
> works fine.. Hopefully I'll be able to figure that one out, test the
> above and see if there are any other missing fixes.
>
> Is it okay if I come back to this tomorrow?
Is the failure with hw offload or sw case? If its sendpage related
looks like we also need to push the following patch back to 4.19,
commit 648ee6cea7dde4a5cdf817e5d964fd60b22006a4
Author: John Fastabend <john.fastabend@...il.com>
Date: Wed Jun 12 17:23:57 2019 +0000
net: tls, correctly account for copied bytes with multiple sk_msgs
If you have more details I can also spend some cycles looking into it.
.John
Powered by blists - more mailing lists