From: John Fastabend <john.fastabend@gmail.com>
To: netdev@vger.kernel.org, eadavis@qq.com, kuba@kernel.org
Cc: john.fastabend@gmail.com, bpf@vger.kernel.org, borisp@nvidia.com
Subject: [PATCH net 0/2] tls fixes for SPLICE with more hint
Date: Wed, 10 Jan 2024 14:01:22 -0800 [thread overview]
Message-ID: <20240110220124.452746-1-john.fastabend@gmail.com> (raw)
Syzbot found a splat where it tried to splice data over a tls socket
with the more hint and sending greater than the number of frags that
fit in a msg scatterlist. This resulted in an error where we do not
correctly send the data when the msg sg is full. The more flag being
just a hint not a strict contract. This then results in the syzbot
warning on the next send.
Edward generated an initial patch for this which checked for a full
msg on entry to the sendmsg hook. This fixed the WARNING, but didn't
fully resolve the issue because the full msg_pl scatterlist was never
sent resulting in a stuck socket. In this series instead avoid the
situation by forcing the send on the splice that fills the scatterlist.
Also in original thread I mentioned it didn't seem to be enough to
simply fix the send on full sg problem. That was incorrect and was
really a bug in my test program that was hanging the test program.
I had setup a repair socket and wasn't handling it correctly so my
tester got stuck.
Thanks. Please review. Fix in patch 1 and test in patch 2.
John Fastabend (2):
net: tls, fix WARNIING in __sk_msg_free
net: tls, add test to capture error on large splice
net/tls/tls_sw.c | 6 +++++-
tools/testing/selftests/net/tls.c | 14 ++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
--
2.33.0
next reply other threads:[~2024-01-10 22:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 22:01 John Fastabend [this message]
2024-01-10 22:01 ` [PATCH net 1/2] net: tls, fix WARNIING in __sk_msg_free John Fastabend
2024-01-12 1:05 ` Jakub Kicinski
2024-01-10 22:01 ` [PATCH net 2/2] net: tls, add test to capture error on large splice John Fastabend
2024-01-12 1:05 ` Jakub Kicinski
2024-01-12 21:52 ` John Fastabend
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=20240110220124.452746-1-john.fastabend@gmail.com \
--to=john.fastabend@gmail.com \
--cc=borisp@nvidia.com \
--cc=bpf@vger.kernel.org \
--cc=eadavis@qq.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.