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] [day] [month] [year] [list]
Message-ID: <20241106-balsam-untragbar-1aa86b2bb7bb@brauner>
Date: Wed, 6 Nov 2024 10:39:25 +0100
From: Christian Brauner <brauner@...nel.org>
To: Kees Cook <kees@...nel.org>
Cc: Al Viro <viro@...iv.linux.org.uk>, 
	syzbot+03e1af5c332f7e0eb84b@...kaller.appspotmail.com, Jan Kara <jack@...e.cz>, Eric Biederman <ebiederm@...ssion.com>, 
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org, Tycho Andersen <tandersen@...flix.com>, 
	Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>, linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] exec: NULL out bprm->argv0 when it is an ERR_PTR

On Tue, Nov 05, 2024 at 10:19:11AM -0800, Kees Cook wrote:
> Attempting to free an ERR_PTR will not work. ;)
> 
>     process 'syz-executor210' launched '/dev/fd/3' with NULL argv: empty string added
>     kernel BUG at arch/x86/mm/physaddr.c:23!
> 
> Set bprm->argv0 to NULL if it fails to get a string from userspace so
> that bprm_free() will not try to free an invalid pointer when cleaning up.
> 
> Reported-by: syzbot+03e1af5c332f7e0eb84b@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/all/6729d8d1.050a0220.701a.0017.GAE@google.com
> Fixes: 7bdc6fc85c9a ("exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case")
> Signed-off-by: Kees Cook <kees@...nel.org>
> ---

Reviewed-by: Christian Brauner <brauner@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ