From: Chuck Lever <cel@kernel.org>
To: NeilBrown <neil@brown.name>, Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v4 0/4] Fix unwanted memory overwrites
Date: Sun, 12 Oct 2025 13:07:42 -0400 [thread overview]
Message-ID: <20251012170746.9381-1-cel@kernel.org> (raw)
From: Chuck Lever <chuck.lever@oracle.com>
<rtm@csail.mit.edu> reported some memory overwrites that can be
triggered by NFS client input. I was able to observe overwrites
by enabling KASAN and running his reproducer [1].
NFSD caches COMPOUNDs containing only a single SEQUENCE operation
whether the client requests it to or not, in order to work around a
quirk in the NFSv4.1 protocol. However, the predicate that
identifies solo SEQUENCE operations was incorrect.
Changes since v3:
* Neil observes that in this code path, SEQUENCE always the first op
* Expanding the size of the replay cache buffer is unnecessary
* Reordered and simplified the remaining patches
* Haven't yet addressed imbalanced maxresponsesize values
Changes since v2:
* Never cache a COMPOUND if SEQUENCE fails
* Enable caching of solo SEQUENCE operations again
* Reserve enough slot replay cache space to cache solo SEQUENCE
Changes since v1:
* Reordered patches
* Disable caching of solo SEQUENCE operations
* Additional clean up
Chuck Lever (4):
NFSD: Skip close replay processing if XDR encoding fails
NFSD: Never cache a COMPOUND when the SEQUENCE operation fails
NFSD: Fix the "is this a solo SEQUENCE" predicate
NFSD: Move nfsd4_cache_this()
fs/nfsd/nfs4state.c | 37 ++++++++++++++++++++++++++++++++++++-
fs/nfsd/nfs4xdr.c | 3 +--
fs/nfsd/xdr4.h | 21 ---------------------
3 files changed, 37 insertions(+), 24 deletions(-)
--
2.51.0
next reply other threads:[~2025-10-12 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-12 17:07 Chuck Lever [this message]
2025-10-12 17:07 ` [PATCH v4 1/4] NFSD: Skip close replay processing if XDR encoding fails Chuck Lever
2025-10-13 4:28 ` NeilBrown
2025-10-12 17:07 ` [PATCH v4 2/4] NFSD: Never cache a COMPOUND when the SEQUENCE operation fails Chuck Lever
2025-10-13 4:31 ` NeilBrown
2025-10-12 17:07 ` [PATCH v4 3/4] NFSD: Fix the "is this a solo SEQUENCE" predicate Chuck Lever
2025-10-13 4:43 ` NeilBrown
2025-10-13 13:25 ` Chuck Lever
2025-10-13 23:39 ` NeilBrown
2025-10-12 17:07 ` [PATCH v4 4/4] NFSD: Move nfsd4_cache_this() Chuck Lever
2025-10-13 4:44 ` NeilBrown
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=20251012170746.9381-1-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/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.