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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 27 Oct 2018 18:17:29 +1100
From:   Aleksa Sarai <cyphar@...har.com>
To:     Ed Maste <emaste@...ebsd.org>
Cc:     David Drysdale <drysdale@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] namei: implement O_BENEATH-style AT_* flags

On 2018-10-27, Ed Maste <emaste@...ebsd.org> wrote:
> On Tue, 9 Oct 2018 at 02:53, Aleksa Sarai <cyphar@...har.com> wrote:
> >
> > +#ifndef O_BENEATH
> > +#define O_BENEATH      00040000000 /* *Not* the same as capsicum's O_BENEATH! */
> > +#endif
> [...]
> O_BENEATH originally came from the Capsicum Linux port, and inherited the
> restriction against ".." path components from years ago when the port was
> done.  In addition, FreeBSD did not originally implement O_BENEATH as the
> "beneath" behaviour is inherently provided once a process enters a
> capability mode sandbox.  However, Capsicum now allows ".." paths, and
> FreeBSD supports O_BENEATH separately from capability mode.  Absolute paths
> are not yet allowed with O_BENEATH but a change is in review to permit them.

What is the proposed semantic of O_BENEATH with absolute paths -- I
believe you don't have an openat(2) on FreeBSD (but please feel free to
correct me)?

> Ideally I would like to see us have the same API; none of this work has yet
> shipped in a FreeBSD release and there is an opportunity for us to make
> changes to match the interface and errors Linux may adopt.

I'm going to send out a v4 "soon" but I would like to know what folks
think about having resolveat(2) (or similar) to separate the scoping O_*
flags and produce an O_PATH -- since unsupported O_* flags are ignored
by older kernels userspace will have to do some plenty of checking after
each path operation.

Personally, I believe this (along with AT_EMPTY_PATH for openat(2))
would help with some other O_PATH issues.

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ