]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: NFSv2/v3 clients should never be setting NFS_CAP_XATTR
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 22 Feb 2022 23:20:38 +0000 (18:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:17 +0000 (13:57 +0200)
commitfced445d0a9f4f57bfa608a46db8f77e725cc915
treef78b8041365297e785f72b913758888a4b0d0503
parent321276722a9e0c9d4323bc003fd32f9f44d7f87c
NFS: NFSv2/v3 clients should never be setting NFS_CAP_XATTR

commit b622ffe1d9ecbac71f0cddb52ff0831efdf8fb83 upstream.

Ensure that we always initialise the 'xattr_support' field in struct
nfs_fsinfo, so that nfs_server_set_fsinfo() doesn't declare our NFSv2/v3
client to be capable of supporting the NFSv4.2 xattr protocol by setting
the NFS_CAP_XATTR capability.

This configuration can cause nfs_do_access() to set access mode bits
that are unsupported by the NFSv3 ACCESS call, which may confuse
spec-compliant servers.

Reported-by: Olga Kornievskaia <kolga@netapp.com>
Fixes: b78ef845c35d ("NFSv4.2: query the server for extended attribute support")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs3xdr.c
fs/nfs/proc.c