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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec15f97d-b9be-4bb0-b099-08d964f7f89a@oracle.com>
Date: Sat, 18 Oct 2025 15:37:38 -0400
From: Chuck Lever <chuck.lever@...cle.com>
To: Jeff Layton <jlayton@...nel.org>, Miklos Szeredi <miklos@...redi.hu>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
        Alexander Aring <alex.aring@...il.com>,
        Trond Myklebust
 <trondmy@...nel.org>,
        Anna Schumaker <anna@...nel.org>, Steve French <sfrench@...ba.org>,
        Paulo Alcantara <pc@...guebit.org>,
        Ronnie Sahlberg <ronniesahlberg@...il.com>,
        Shyam Prasad N <sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>,
        Bharath SM <bharathsm@...rosoft.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Danilo Krummrich <dakr@...nel.org>,
        David Howells <dhowells@...hat.com>, Tyler Hicks <code@...icks.com>,
        NeilBrown <neil@...wn.name>, Olga Kornievskaia <okorniev@...hat.com>,
        Dai Ngo <Dai.Ngo@...cle.com>, Amir Goldstein <amir73il@...il.com>,
        Namjae Jeon <linkinjeon@...nel.org>, Steve French <smfrench@...il.com>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Carlos Maiolino <cem@...nel.org>,
        Kuniyuki Iwashima <kuniyu@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-nfs@...r.kernel.org, linux-cifs@...r.kernel.org,
        samba-technical@...ts.samba.org, netfs@...ts.linux.dev,
        ecryptfs@...r.kernel.org, linux-unionfs@...r.kernel.org,
        linux-xfs@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2 10/11] nfsd: allow DELEGRETURN on directories

On 10/17/25 7:32 AM, Jeff Layton wrote:
> As Trond pointed out: "...provided that the presented stateid is
> actually valid, it is also sufficient to uniquely identify the file to
> which it is associated (see RFC8881 Section 8.2.4), so the filehandle
> should be considered mostly irrelevant for operations like DELEGRETURN."
> 
> Don't ask fh_verify to filter on file type.
> 
> Signed-off-by: Jeff Layton <jlayton@...nel.org>
> ---
>  fs/nfsd/nfs4state.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index c9053ef4d79f074f49ecaf0c7a3db78ec147136e..b06591f154aa372db710e071c69260f4639956d7 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -7824,7 +7824,8 @@ nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
>  	__be32 status;
>  	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
>  
> -	if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0)))
> +	status = fh_verify(rqstp, &cstate->current_fh, 0, 0);
> +	if (status)
>  		return status;
>  
>  	status = nfsd4_lookup_stateid(cstate, stateid, SC_TYPE_DELEG, SC_STATUS_REVOKED, &s, nn);
> 

Reviewed-by: Chuck Lever <chuck.lever@...cle.com>

-- 
Chuck Lever

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ