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: <20241121023619.GM3387508@ZenIV>
Date: Thu, 21 Nov 2024 02:36:19 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Kees Cook <kees@...nel.org>, linux-kernel@...r.kernel.org,
	Christophe JAILLET <christophe.jaillet@...adoo.fr>,
	Dan Carpenter <dan.carpenter@...aro.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Nir Lichtman <nir@...htman.org>,
	syzbot+03e1af5c332f7e0eb84b@...kaller.appspotmail.com,
	Tycho Andersen <tandersen@...flix.com>,
	Vegard Nossum <vegard.nossum@...cle.com>,
	Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>
Subject: Re: [GIT PULL] execve updates for v6.13-rc1

On Wed, Nov 20, 2024 at 02:50:39PM -0800, Linus Torvalds wrote:
> So you probably want to do something like
> 
>         const char *name = smp_load_acquire(&dentry->d_name.name);
> 
> under the RCU read lock before then copying it with strscpy(). It
> should always be NULL-terminated.
> 
> If you want to be extra careful, you might surround it with a
> 
>         read_seqbegin_or_lock(&rename_lock, &seq);

What for?

	char name[something];

	sprintf(name, "%*pD", sizeof(name) - 1, file);

and be done with that...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ