]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: Clear SECLABEL in the suppattr_exclcreat bitmap
authorChuck Lever <chuck.lever@oracle.com>
Mon, 17 Nov 2025 16:00:49 +0000 (11:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:24 +0000 (10:14 +0100)
commitfcb8d118e149255d28be2d799ddbb1c63d015b82
tree26df2b28e2074fbad4803608c27ce62e15fd4b4a
parent7b82a1d6ae869533d8bdb0282a3a78faed8e63dd
NFSD: Clear SECLABEL in the suppattr_exclcreat bitmap

commit 27d17641cacfedd816789b75d342430f6b912bd2 upstream.

>From RFC 8881:

5.8.1.14. Attribute 75: suppattr_exclcreat

> The bit vector that would set all REQUIRED and RECOMMENDED
> attributes that are supported by the EXCLUSIVE4_1 method of file
> creation via the OPEN operation. The scope of this attribute
> applies to all objects with a matching fsid.

There's nothing in RFC 8881 that states that suppattr_exclcreat is
or is not allowed to contain bits for attributes that are clear in
the reported supported_attrs bitmask. But it doesn't make sense for
an NFS server to indicate that it /doesn't/ implement an attribute,
but then also indicate that clients /are/ allowed to set that
attribute using OPEN(create) with EXCLUSIVE4_1.

Ensure that the SECURITY_LABEL and ACL bits are not set in the
suppattr_exclcreat bitmask when they are also not set in the
supported_attrs bitmask.

Fixes: 8c18f2052e75 ("nfsd41: SUPPATTR_EXCLCREAT attribute")
Cc: stable@vger.kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4xdr.c