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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 4 May 2017 18:27:10 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Jann Horn <jannh@...gle.com>,
        Linux API <linux-api@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: new ...at() flag: AT_NO_JUMPS

On Thu, May 4, 2017 at 5:30 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
>
> As for mountpoint crossing...  it might make sense to split those.
> O_BENEATH allowed it, and if we want AT_BENEATH to match that - let's
> do it.  Then this one would become AT_BENEATH | AT_XDEV (the latter named
> after find(1) option, obviously).

So I would still like to split that NO_JUMP flag even more.

I like the AT_BENEATH | AT_XDEV split, but I think XDEV should be
split further, and I think the symlink avoidance should be split more
too.

As mentioned last time, at least for the git usage, even relative
symlinks are a no-no - not because they'd escape, but simply because
git wants to see the *unique* name, and resolve relative symlinks to
either the symlink, or to the actual file it points to.

So I think that we'd want an additional flag that says "no symlinks at all".

And I think the "no mountpoint" traversal might be splittable too.

Yes, sometimes you'd probably want to say "stay exactly inside this
filesystem" (like find -xdev). So no arguments against AT_XDEV that
refuses any mount traversal (kind of like my "no symlink traversal"
thing).

But at other points you might want to just guarantee that the walk
stays below a certain starting point and doesn't escape.

That could still allow crossing mount-points, but only if they are
non-bind mounts and cannot let us escape.

I'm not sure if that's testable, though.

                  Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ