linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Fix unwanted memory overwrites
@ 2025-10-10 13:56 Chuck Lever
  2025-10-10 13:56 ` [PATCH v3 1/5] NFSD: Skip close replay processing if XDR encoding fails Chuck Lever
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Chuck Lever @ 2025-10-10 13:56 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey
  Cc: linux-nfs, Chuck Lever

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 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 (5):
  NFSD: Skip close replay processing if XDR encoding fails
  NFSD: Fix the "is this a solo SEQUENCE" predicate
  nfsd: Never cache a COMPOUND when the SEQUENCE operation fails
  NFSD: Increase minimum size of slot replay cache
  NFSD: Move nfsd4_cache_this()

 fs/nfsd/nfs4state.c | 45 +++++++++++++++++++++++++++++++++++++++------
 fs/nfsd/nfs4xdr.c   |  3 +--
 fs/nfsd/xdr4.h      | 21 ---------------------
 3 files changed, 40 insertions(+), 29 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-10-11  0:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10 13:56 [PATCH v3 0/5] Fix unwanted memory overwrites Chuck Lever
2025-10-10 13:56 ` [PATCH v3 1/5] NFSD: Skip close replay processing if XDR encoding fails Chuck Lever
2025-10-10 13:56 ` [PATCH v3 2/5] NFSD: Fix the "is this a solo SEQUENCE" predicate Chuck Lever
2025-10-11  0:26   ` NeilBrown
2025-10-10 13:56 ` [PATCH v3 3/5] nfsd: Never cache a COMPOUND when the SEQUENCE operation fails Chuck Lever
2025-10-10 15:19   ` Jeff Layton
2025-10-11  0:38   ` NeilBrown
2025-10-10 13:56 ` [PATCH v3 4/5] NFSD: Increase minimum size of slot replay cache Chuck Lever
2025-10-10 15:22   ` Jeff Layton
2025-10-11  0:04   ` NeilBrown
2025-10-10 13:56 ` [PATCH v3 5/5] NFSD: Move nfsd4_cache_this() Chuck Lever

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).