summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-08-24 10:04:41 -0400
committerChuck Lever <cel@kernel.org>2026-10-04 21:15:29 -0400
commitfb0ce2bc93f39722148141669bd70aae786a9e87 (patch)
tree94dad9d555fb79bcc1d019ca79455905a8c05b18 /include/linux
parentcbea14890783fead76f878caf0775a62a42049bf (diff)
NFSD: Fix POSIX ACL leak in unexecuted NFSv4 COMPOUND operations
nfsd4_decode_fattr4() allocates POSIX ACLs while decoding OP_OPEN, OP_CREATE, and OP_SETATTR, leaving the only reference to these ACLs in the operation's argument structure. Executing the operation hands that reference to struct nfsd_attrs, which drops it. However, if the operation is decoded but never executes, those ACLs are leaked. A client can repeat an aborting compound to force the server to leak memory. Give struct nfsd_attrs its own reference with posix_acl_dup() so nfsd_attrs_free() still balances the reference the operation took. Release the ACLs when the compound completes. Have the decoder record each ACL on the compound's temporary allocation chain, and give each chained item an optional release callback. The chain holds a reference for the life of the compound, so OP_OPEN no longer needs an op_release method. Fixes: 5fc51dfc2eb1 ("NFSD: Add support for XDR decoding POSIX draft ACLs") Cc: stable+noautosel@kernel.org # experimental, disabled by default Reported-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com> Closes: https://lore.kernel.org/linux-nfs/20260823113255.3417-1-prabhakar.pujeri@dell.com/ Reviewed-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260824-nfsd-posix-acl-ownership-v1-2-090fffc608ec@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions