Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v1 0/2] nfs_common: Encode an ACL with fewer than three entries as empty
@ 2026-09-24 21:22 Chuck Lever
  2026-09-24 21:22 ` [PATCH v1 1/2] nfs_common: Do not encode an ACL with fewer than three entries Chuck Lever
  2026-09-24 21:22 ` [PATCH v1 2/2] nfs_common: Do not stream-encode " Chuck Lever
  0 siblings, 2 replies; 4+ messages in thread
From: Chuck Lever @ 2026-09-24 21:22 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey,
	Trond Myklebust, Anna Schumaker
  Cc: linux-nfs

Both ACL encoders in fs/nfs_common report at least four wire entries
for any ACL that has entries, then walk a_entries[] up to that count.
An ACL with one or two entries sends the walk past the end of the
posix_acl allocation.

nfsacl_encode() builds only the NFS client's SETACL arguments, and
nfs_stream_encode_acl() builds only NFSD's GETACL replies. The fixes
are separate patches because a combined one does not apply to the
stable trees that predate nfs_stream_encode_acl().

The NFS client still caches a GETACL result without validating it.
This series does not change that.

Neither over-read has been observed at runtime. Both paths were
traced from the code, and the patches are build-tested only.

Patch 1 changes what the NFS client sends in SETACL, so it needs an
Acked-by from the NFS client maintainers before it goes through the
nfsd tree.

Chuck Lever (2):
  nfs_common: Do not encode an ACL with fewer than three entries
  nfs_common: Do not stream-encode an ACL with fewer than three entries

 fs/nfs_common/nfsacl.c | 6 ++++--
 include/linux/nfsacl.h | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-02 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24 21:22 [PATCH v1 0/2] nfs_common: Encode an ACL with fewer than three entries as empty Chuck Lever
2026-09-24 21:22 ` [PATCH v1 1/2] nfs_common: Do not encode an ACL with fewer than three entries Chuck Lever
2026-10-02 17:24   ` Anna Schumaker
2026-09-24 21:22 ` [PATCH v1 2/2] nfs_common: Do not stream-encode " Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox