[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zyps12C3+qvunTYp@tycho.pizza>
Date: Tue, 5 Nov 2024 12:07:03 -0700
From: Tycho Andersen <tycho@...ho.pizza>
To: Kees Cook <kees@...nel.org>
Cc: Al Viro <viro@...iv.linux.org.uk>,
syzbot+03e1af5c332f7e0eb84b@...kaller.appspotmail.com,
Christian Brauner <brauner@...nel.org>, 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: Tycho Andersen <tycho@...ho.pizza.
Thanks.
Powered by blists - more mailing lists