[PATCH v1 15/17] Do not allow (N)VERIFY to check POSIX ACL attributes

rick.macklem
2025-12-31T02:22:36Z

Comparison of POSIX draft ACLs via (N)VERIFY is not
permitted by the IETF working group draft.
It is also not practical for the (N)VERIFY code in the
knfsd, since ordering of ACEs is not required.

Signed-off-by: Rick Macklem <rmacklem@uoguelph.ca>
---
fs/nfsd/nfs4proc.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 1dab7d3aa11e..ae5c1f5b714d 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -2373,6 +2373,11 @@ _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
if (verify->ve_attrlen & 3)
return nfserr_inval;

+ /* The POSIX draft ACLs cannot be tested via (N)VERIFY. */
+ if (verify->ve_bmval[2] & (FATTR4_WORD2_POSIX_DEFAULT_ACL |
+ FATTR4_WORD2_POSIX_ACCESS_ACL))
+ return nfserr_inval;
+
/* count in words:
* bitmap_len(1) + bitmap(2) + attr_len(1) = 4
*/
--
2.49.0