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:   Sat, 17 Mar 2018 18:04:38 +0100
From:   Dominik Brodowski <linux@...inikbrodowski.net>
To:     Arnd Bergmann <arnd@...db.de>,
        Christoph Hellwig <hch@...radead.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Andy Lutomirski <luto@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 17/36] fs: add ksys_chroot() helper; remove-in kernel
 calls to sys_chroot()

Arnd, Christoph,

On Thu, Mar 15, 2018 at 09:44:24PM +0100, Arnd Bergmann wrote:
> > diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
> > index 4afb04686c8e..5743f04014ca 100644
> > --- a/drivers/base/devtmpfs.c
> > +++ b/drivers/base/devtmpfs.c
> > @@ -387,7 +387,7 @@ static int devtmpfsd(void *p)
> >         if (*err)
> >                 goto out;
> >         sys_chdir("/.."); /* will traverse into overmounted root */
> > -       sys_chroot(".");
> > +       ksys_chroot(".");
> >         complete(&setup_done);
> >         while (1) {
> >                 spin_lock(&req_lock);
> 
> Could this be done using kern_path()/set_fs_root() instead so we
> avoid the __user pointer?
> 
>        Arnd

On Fri, Mar 16, 2018 at 01:49:41AM -0700, Christoph Hellwig wrote:
> Agreed.  Especially as we don't need any of the permission checks here.

Thanks for your input. As re-working this code to use the vfs-internal
helpers would probably mean that the syscall-cleanup code has to wait
for another release cycle, I propose to address this issue with the
following paragraph in the commit message:

	In the near future, the fs-external callers of ksys_chroot() should be
	converted to use kern_path()/set_fs_root() directly. Then ksys_chroot()
	can be moved within sys_chroot() again.

Thanks,
	Dominik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ