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>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna@kernel.org>
Cc: <linux-nfs@vger.kernel.org>
Subject: [PATCH v1 0/2] nfs_common: Encode an ACL with fewer than three entries as empty
Date: Thu, 24 Sep 2026 17:22:44 -0400 [thread overview]
Message-ID: <20260924212246.114355-1-cel@kernel.org> (raw)
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
next reply other threads:[~2026-09-24 21:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 21:22 Chuck Lever [this message]
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
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=20260924212246.114355-1-cel@kernel.org \
--to=cel@kernel.org \
--cc=anna@kernel.org \
--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 \
--cc=trond.myklebust@hammerspace.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox