From: David Laight <David.Laight@ACULAB.COM>
To: 'Christian Brauner' <brauner@kernel.org>,
Eryu Guan <guan@eryu.me>,
"fstests@vger.kernel.org" <fstests@vger.kernel.org>
Cc: Ariadne Conill <ariadne@dereferenced.org>,
Kees Cook <keescook@chromium.org>, Rich Felker <dalias@libc.org>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Matthew Wilcox" <willy@infradead.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Eryu Guan <guaneryu@gmail.com>
Subject: RE: [PATCH] generic/633: adapt execveat() invocations
Date: Wed, 2 Feb 2022 08:36:05 +0000 [thread overview]
Message-ID: <08ff2c7dd57449a7ae9de70ba007c5fd@AcuMS.aculab.com> (raw)
In-Reply-To: <20220131171023.2836753-1-brauner@kernel.org>
From: Christian Brauner
> Sent: 31 January 2022 17:10
>
> There's a push by Ariadne to enforce that argv[0] cannot be NULL. So far
> we've allowed this. Fix the execveat() invocations to set argv[0] to the
> name of the file we're about to execute.
>
...
> src/idmapped-mounts/idmapped-mounts.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/idmapped-mounts/idmapped-mounts.c b/src/idmapped-mounts/idmapped-mounts.c
> index 4cf6c3bb..76b559ae 100644
> --- a/src/idmapped-mounts/idmapped-mounts.c
> +++ b/src/idmapped-mounts/idmapped-mounts.c
> @@ -3598,7 +3598,7 @@ static int setid_binaries(void)
> NULL,
> };
> static char *argv[] = {
> - NULL,
> + "",
> };
Isn't that just plain wrong?
argv[] needs to be terminated by a NULL so you need to add the ""
before the NULL not replace the NULL by it.
Quite how this matches the patch description is another matter...
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-02-02 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 17:10 [PATCH] generic/633: adapt execveat() invocations Christian Brauner
2022-01-31 20:46 ` Kees Cook
2022-02-01 13:31 ` Christian Brauner
2022-02-02 8:36 ` David Laight [this message]
2022-02-02 9:53 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=08ff2c7dd57449a7ae9de70ba007c5fd@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=akpm@linux-foundation.org \
--cc=ariadne@dereferenced.org \
--cc=brauner@kernel.org \
--cc=dalias@libc.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=guaneryu@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).