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: <20250723023233.GL2580412@ZenIV>
Date: Wed, 23 Jul 2025 03:32:33 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Yangtao Li <frank.li@...o.com>
Cc: slava@...eyko.com, glaubitz@...sik.fu-berlin.de,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/3] hfsplus: fix to update ctime after rename

On Tue, Jul 22, 2025 at 01:13:45AM -0600, Yangtao Li wrote:

> @@ -552,9 +553,13 @@ static int hfsplus_rename(struct mnt_idmap *idmap,
>  	res = hfsplus_rename_cat((u32)(unsigned long)old_dentry->d_fsdata,
>  				 old_dir, &old_dentry->d_name,
>  				 new_dir, &new_dentry->d_name);
> -	if (!res)
> -		new_dentry->d_fsdata = old_dentry->d_fsdata;
> -	return res;
> +	if (res)
> +		return res;
> +
> +	new_dentry->d_fsdata = old_dentry->d_fsdata;

	Umm...  Is that assignment (either before or after that patch)
actually correct?

	Note that new_dentry essentially got unlinked here; old_dentry
is about to have its parent/name changed by the caller of ->rename(),
so...  that looks very odd.

	What is that line about?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ