aboutsummaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-07-26 20:15:24 -0700
committerJakub Kicinski <kuba@kernel.org>2022-07-28 21:50:00 -0700
commite20691fa36c42ff89c2b582f38ca0cc9e3d043ba (patch)
treea1bfe1d82845b51a78ff8c12ef85df6965f13986 /net/tls
parentd11ef9cc5a6792c8508cb00308b604836f9a9053 (diff)
downloadlinux-e20691fa36c42ff89c2b582f38ca0cc9e3d043ba.tar.gz
tls: rx: fix the false positive warning
I went too far in the accessor conversion, we can't use tls_strp_msg() after decryption because the message may not be ready. What we care about on this path is that the output skb is detached, i.e. we didn't somehow just turn around and used the input skb with its TCP data still attached. So look at the anchor directly. Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_sw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 8bac7ea2c264d..17db8c8811fa4 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2026,7 +2026,7 @@ put_on_rx_list_err:
bool partially_consumed = chunk > len;
struct sk_buff *skb = darg.skb;
- DEBUG_NET_WARN_ON_ONCE(darg.skb == tls_strp_msg(ctx));
+ DEBUG_NET_WARN_ON_ONCE(darg.skb == ctx->strp.anchor);
if (async) {
/* TLS 1.2-only, to_decrypt must be text len */