From: Chu Zhou <jack.wemmick@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: trondmy@kernel.org, anna@kernel.org, cel@kernel.org,
neil@brown.name, okorniev@redhat.com, Dai.Ngo@oracle.com,
tom@talpey.com
Subject: Re: [PATCH] SUNRPC: Validate TCP record marker length before trusting it
Date: Wed, 14 Oct 2026 15:02:41 +0800 [thread overview]
Message-ID: <179196136183.27384.12359852241151556822@gmail.com> (raw)
In-Reply-To: <6ab4b4fd.8f0cbdd2.2427cb.7612@mx.google.com>
Ping - three weeks on with no review or ack.
Re-verified this morning: it still applies cleanly to current mainline
(v7.3-rc7), diffstat unchanged at 2 files, 44 insertions.
https://lore.kernel.org/linux-nfs/6ab4b4fd.8f0cbdd2.2427cb.7612@mx.google.com/
I went back over the error path end to end, since the whole mechanism
rests on it. xs_read_stream()'s out_err label is
return ret != 0 ? ret : -ESHUTDOWN;
and at the point the new check fires, ret still holds the positive
byte count returned by xs_read_stream_header(), so the patch assigns
-ESHUTDOWN explicitly before branching there. That value then reaches
xs_stream_data_receive(), which calls
kernel_sock_shutdown(transport->sock, SHUT_RDWR), and the existing
transport reset machinery re-establishes the connection as described in
the commit message.
Worth restating that the failure mode is a hard hang, not a throughput
problem. The parser latched onto a bogus reclen after below-RPC
corruption, then discarded every genuine reply through the MSG_TRUNC
path while the TCP connection stayed ESTABLISHED - nothing ever
triggered a reset, and the hung task watchdog panicked the machine.
Restarting the server was the only recovery.
Two-line check plus a tracepoint, one comparison per fragment. The 16 MiB
bound is a judgement call - happy to lower it or tie it to a named
constant if that is preferred.
Thanks,
prev parent reply other threads:[~2026-10-14 7:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 5:28 [PATCH] SUNRPC: Validate TCP record marker length before trusting it Chu Zhou
2026-10-14 7:02 ` Chu Zhou [this message]
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=179196136183.27384.12359852241151556822@gmail.com \
--to=jack.wemmick@gmail.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=cel@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
--cc=trondmy@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox