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]
Date:   Wed, 2 Feb 2022 10:53:58 +0100
From:   Christian Brauner <brauner@...nel.org>
To:     David Laight <David.Laight@...LAB.COM>
Cc:     Eryu Guan <guan@...u.me>,
        "fstests@...r.kernel.org" <fstests@...r.kernel.org>,
        Ariadne Conill <ariadne@...eferenced.org>,
        Kees Cook <keescook@...omium.org>,
        Rich Felker <dalias@...c.org>,
        Michael Kerrisk <mtk.manpages@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Matthew Wilcox <willy@...radead.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Eryu Guan <guaneryu@...il.com>
Subject: Re: [PATCH] generic/633: adapt execveat() invocations

On Wed, Feb 02, 2022 at 08:36:05AM +0000, David Laight wrote:
> 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...

Bah, braino. I fired that too quickly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ