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: <20220613200835.GG7401@sequoia>
Date:   Mon, 13 Jun 2022 15:08:35 -0500
From:   Tyler Hicks <tyhicks@...ux.microsoft.com>
To:     Dominique Martinet <asmadeus@...ewreck.org>
Cc:     Christian Schoenebeck <linux_oss@...debyte.com>,
        Eric Van Hensbergen <ericvh@...il.com>,
        Latchesar Ionkov <lucho@...kov.net>,
        v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/06] 9p: v9fs_fid_lookup_with_uid fix's fix suggestion

On 2022-06-12 17:53:26, Dominique Martinet wrote:
> Tyler, I can just squash this in your commit if you're ok with this,
> as I've already rebased the other patches on top of it.

Yes, that is fine. I've also tested this with my (binary-only)
reproducer and it works as expected.

Thanks!

Tyler

> 
> Cc: Tyler Hicks <tyhicks@...ux.microsoft.com>
> Signed-off-by: Dominique Martinet <asmadeus@...ewreck.org>
> ---
>  fs/9p/fid.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/9p/fid.c b/fs/9p/fid.c
> index 5a469b79c1ee..baf2b152229e 100644
> --- a/fs/9p/fid.c
> +++ b/fs/9p/fid.c
> @@ -221,12 +221,15 @@ static struct p9_fid *v9fs_fid_lookup_with_uid(struct dentry *dentry,
>  		 * walk to ensure none of the patch component change
>  		 */
>  		fid = p9_client_walk(fid, l, &wnames[i], clone);
> -		p9_client_clunk(old_fid);
> +		/* non-cloning walk will return the same fid */
> +		if (fid != old_fid) {
> +			p9_client_clunk(old_fid);
> +			old_fid = fid;
> +		}
>  		if (IS_ERR(fid)) {
>  			kfree(wnames);
>  			goto err_out;
>  		}
> -		old_fid = fid;
>  		i += l;
>  		clone = 0;
>  	}
> -- 
> 2.35.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ