From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
borisp@nvidia.com, john.fastabend@gmail.com, maximmi@nvidia.com,
tariqt@nvidia.com, vfedorenko@novek.ru,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 4/4] tls: rx: fix the false positive warning
Date: Tue, 26 Jul 2022 20:15:24 -0700 [thread overview]
Message-ID: <20220727031524.358216-5-kuba@kernel.org> (raw)
In-Reply-To: <20220727031524.358216-1-kuba@kernel.org>
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>
---
net/tls/tls_sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 8bac7ea2c264..17db8c8811fa 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2026,7 +2026,7 @@ int tls_sw_recvmsg(struct sock *sk,
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 */
--
2.37.1
next prev parent reply other threads:[~2022-07-27 3:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 3:15 [PATCH net-next 0/4] tls: rx: follow ups to rx work Jakub Kicinski
2022-07-27 3:15 ` [PATCH net-next 1/4] selftests: tls: handful of memrnd() and length checks Jakub Kicinski
2022-07-27 3:15 ` [PATCH net-next 2/4] tls: rx: don't consider sock_rcvtimeo() cumulative Jakub Kicinski
2022-07-28 13:50 ` Paolo Abeni
2022-07-28 15:42 ` Jakub Kicinski
2022-07-28 15:47 ` Eric Dumazet
2022-07-28 20:04 ` Paolo Abeni
2022-07-27 3:15 ` [PATCH net-next 3/4] tls: strp: rename and multithread the workqueue Jakub Kicinski
2022-07-27 3:15 ` Jakub Kicinski [this message]
2022-07-29 5:00 ` [PATCH net-next 0/4] tls: rx: follow ups to rx work patchwork-bot+netdevbpf
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=20220727031524.358216-5-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=borisp@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=john.fastabend@gmail.com \
--cc=maximmi@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tariqt@nvidia.com \
--cc=vfedorenko@novek.ru \
/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).