lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250418011009.1135794-1-andrew.zaborowski@intel.com>
Date: Fri, 18 Apr 2025 03:10:09 +0200
From: Andrew Zaborowski <andrew.zaborowski@...el.com>
To: linux-nfs@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	Trond Myklebust <trondmy@...nel.org>,
	Anna Schumaker <anna@...nel.org>,
	Jeff Layton <jlayton@...nel.org>,
	balrogg@...il.com
Subject: [RFC][PATCH] nfs: Revert "nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS"

This mainly reverts commit cb78f9b7d0c0c9f86d8c0ac9c46b8b684d8785a9
which added the requesting of FATTR4_OPEN_ARGUMENTS through
GETATTR_BITMAP to the get server capabilities sequence whenever protocol
version is 4.1 or higher.  This attribute was apparently defined in
RFC9754 as an extension to v4.2, never valid in v4.1, but it is neither
valid for use in OP_GETATTR.  As far as I understand, the client is
supposed to detect support for FATTR4_OPEN_ARGUMENTS using
FATTR4_SUPPORTED_ATTRS only.

In effect this seemed to break v4.1 client, server would return error to
this request.

While there, remove the unneeded initialization of bitmask[0] which is
soon overwritten.  The initialization was added in commit 707f13b3d081
which cb78f9b7d0c0 purported to fix.

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@...el.com>
---
 fs/nfs/nfs4proc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 970f28dbf253..3003f78e8764 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3943,9 +3943,7 @@ static bool nfs4_server_delegtime_capable(struct nfs4_server_caps_res *res)
 static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
 {
 	u32 minorversion = server->nfs_client->cl_minorversion;
-	u32 bitmask[3] = {
-		[0] = FATTR4_WORD0_SUPPORTED_ATTRS,
-	};
+	u32 bitmask[3] = {};
 	struct nfs4_server_caps_arg args = {
 		.fhandle = fhandle,
 		.bitmask = bitmask,
@@ -3967,8 +3965,7 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
 		     FATTR4_WORD0_CASE_INSENSITIVE |
 		     FATTR4_WORD0_CASE_PRESERVING;
 	if (minorversion)
-		bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT |
-			     FATTR4_WORD2_OPEN_ARGUMENTS;
+		bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT;
 
 	status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
 	if (status == 0) {
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ