RE: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-03 Thread David Laight
From: Aleksa Sarai > Sent: 01 October 2018 17:16 > > On 2018-10-01, David Laight wrote: ... > > > * Mountpoint crossings are blocked by AT_XDEV. > > > > You might want a mountpoint flag that allows crossing into the mounted > > filesystem (you may need to get out in order to do pwd()). > >

RE: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-03 Thread David Laight
From: Aleksa Sarai > Sent: 01 October 2018 17:16 > > On 2018-10-01, David Laight wrote: ... > > > * Mountpoint crossings are blocked by AT_XDEV. > > > > You might want a mountpoint flag that allows crossing into the mounted > > filesystem (you may need to get out in order to do pwd()). > >

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread James Morris
On Mon, 1 Oct 2018, Mickaël Salaün wrote: > Another way to apply a security policy could be to tied it to a file > descriptor, similarly to Capsicum, which could enable to create > programmable (real) capabilities. This way, it would be possible to > "wrap" a file descriptor with a Landlock

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread James Morris
On Mon, 1 Oct 2018, Mickaël Salaün wrote: > Another way to apply a security policy could be to tied it to a file > descriptor, similarly to Capsicum, which could enable to create > programmable (real) capabilities. This way, it would be possible to > "wrap" a file descriptor with a Landlock

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread Aleksa Sarai
On 2018-10-01, David Laight wrote: > > The need for some sort of control over VFS's path resolution (to avoid > > malicious paths resulting in inadvertent breakouts) has been a very > > long-standing desire of many userspace applications. This patchset is a > > revival of Al Viro's old

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread Aleksa Sarai
On 2018-10-01, David Laight wrote: > > The need for some sort of control over VFS's path resolution (to avoid > > malicious paths resulting in inadvertent breakouts) has been a very > > long-standing desire of many userspace applications. This patchset is a > > revival of Al Viro's old

RE: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread David Laight
From: Aleksa Sarai > Sent: 29 September 2018 11:35 > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's old

RE: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread David Laight
From: Aleksa Sarai > Sent: 29 September 2018 11:35 > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's old

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread Dave Chinner
On Mon, Oct 01, 2018 at 03:47:23PM +1000, Aleksa Sarai wrote: > On 2018-10-01, Dave Chinner wrote: > > > I've added some selftests for this, but it's not clear to me whether > > > they should live here or in xfstests (as far as I can tell there are no > > > other VFS tests in selftests, while

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-10-01 Thread Dave Chinner
On Mon, Oct 01, 2018 at 03:47:23PM +1000, Aleksa Sarai wrote: > On 2018-10-01, Dave Chinner wrote: > > > I've added some selftests for this, but it's not clear to me whether > > > they should live here or in xfstests (as far as I can tell there are no > > > other VFS tests in selftests, while

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Aleksa Sarai
On 2018-10-01, Dave Chinner wrote: > > I've added some selftests for this, but it's not clear to me whether > > they should live here or in xfstests (as far as I can tell there are no > > other VFS tests in selftests, while there are some tests that look like > > generic VFS tests in xfstests).

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Aleksa Sarai
On 2018-10-01, Dave Chinner wrote: > > I've added some selftests for this, but it's not clear to me whether > > they should live here or in xfstests (as far as I can tell there are no > > other VFS tests in selftests, while there are some tests that look like > > generic VFS tests in xfstests).

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Dave Chinner
On Sat, Sep 29, 2018 at 08:34:50PM +1000, Aleksa Sarai wrote: > I've added some selftests for this, but it's not clear to me whether > they should live here or in xfstests (as far as I can tell there are no > other VFS tests in selftests, while there are some tests that look like > generic VFS

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Dave Chinner
On Sat, Sep 29, 2018 at 08:34:50PM +1000, Aleksa Sarai wrote: > I've added some selftests for this, but it's not clear to me whether > they should live here or in xfstests (as far as I can tell there are no > other VFS tests in selftests, while there are some tests that look like > generic VFS

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Mickaël Salaün
On 9/30/18 23:46, Jann Horn wrote: > On Sun, Sep 30, 2018 at 10:39 PM Mickaël Salaün wrote: >> As a side note, I'm still working on Landlock which can achieve the same >> goal but in a more flexible and dynamic way: https://landlock.io > > Isn't Landlock mostly intended for userspace that wants

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Mickaël Salaün
On 9/30/18 23:46, Jann Horn wrote: > On Sun, Sep 30, 2018 at 10:39 PM Mickaël Salaün wrote: >> As a side note, I'm still working on Landlock which can achieve the same >> goal but in a more flexible and dynamic way: https://landlock.io > > Isn't Landlock mostly intended for userspace that wants

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Jann Horn
On Sun, Sep 30, 2018 at 10:39 PM Mickaël Salaün wrote: > As a side note, I'm still working on Landlock which can achieve the same > goal but in a more flexible and dynamic way: https://landlock.io Isn't Landlock mostly intended for userspace that wants to impose a custom Mandatory Access Control

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Jann Horn
On Sun, Sep 30, 2018 at 10:39 PM Mickaël Salaün wrote: > As a side note, I'm still working on Landlock which can achieve the same > goal but in a more flexible and dynamic way: https://landlock.io Isn't Landlock mostly intended for userspace that wants to impose a custom Mandatory Access Control

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Mickaël Salaün
As a side note, I'm still working on Landlock which can achieve the same goal but in a more flexible and dynamic way: https://landlock.io Regards, Mickaël On 9/29/18 12:34, Aleksa Sarai wrote: > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Mickaël Salaün
As a side note, I'm still working on Landlock which can achieve the same goal but in a more flexible and dynamic way: https://landlock.io Regards, Mickaël On 9/29/18 12:34, Aleksa Sarai wrote: > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Christian Brauner
On September 30, 2018 3:54:31 PM GMT+02:00, Alban Crequy wrote: >On Sat, Sep 29, 2018 at 12:35 PM Aleksa Sarai >wrote: >> >> The need for some sort of control over VFS's path resolution (to >avoid >> malicious paths resulting in inadvertent breakouts) has been a very >> long-standing desire of

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Christian Brauner
On September 30, 2018 3:54:31 PM GMT+02:00, Alban Crequy wrote: >On Sat, Sep 29, 2018 at 12:35 PM Aleksa Sarai >wrote: >> >> The need for some sort of control over VFS's path resolution (to >avoid >> malicious paths resulting in inadvertent breakouts) has been a very >> long-standing desire of

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Alban Crequy
On Sat, Sep 29, 2018 at 12:35 PM Aleksa Sarai wrote: > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Alban Crequy
On Sat, Sep 29, 2018 at 12:35 PM Aleksa Sarai wrote: > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Aleksa Sarai
On 2018-09-29, Christian Brauner wrote: > > Currently I've only enabled these for openat(2) and the stat(2) family. > > I would hope we could enable it for basically every *at(2) syscall -- > > but many of them appear to not have a @flags argument and thus we'll > > need to add several new

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Aleksa Sarai
On 2018-09-29, Christian Brauner wrote: > > Currently I've only enabled these for openat(2) and the stat(2) family. > > I would hope we could enable it for basically every *at(2) syscall -- > > but many of them appear to not have a @flags argument and thus we'll > > need to add several new

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Matthew Wilcox
On Sat, Sep 29, 2018 at 09:34:24AM -0700, Andy Lutomirski wrote: > Also, as a perhaps-silly suggestion: if you end up adding a new > syscall, I can see a use for a mode that does the path walk but, rather > than failing on a disallowed link, stops early and indicates where it > stopped. Then web

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Matthew Wilcox
On Sat, Sep 29, 2018 at 09:34:24AM -0700, Andy Lutomirski wrote: > Also, as a perhaps-silly suggestion: if you end up adding a new > syscall, I can see a use for a mode that does the path walk but, rather > than failing on a disallowed link, stops early and indicates where it > stopped. Then web

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Andy Lutomirski
> On Sep 29, 2018, at 8:45 AM, Aleksa Sarai wrote: > > On 2018-09-29, Andy Lutomirski wrote: >>> The most obvious change is that AT_NO_JUMPS has been split as dicussed >>> in the original thread, along with a further split of AT_NO_PROCLINKS >>> which means that each individual property of

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Andy Lutomirski
> On Sep 29, 2018, at 8:45 AM, Aleksa Sarai wrote: > > On 2018-09-29, Andy Lutomirski wrote: >>> The most obvious change is that AT_NO_JUMPS has been split as dicussed >>> in the original thread, along with a further split of AT_NO_PROCLINKS >>> which means that each individual property of

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Aleksa Sarai
On 2018-09-29, Andy Lutomirski wrote: > > The most obvious change is that AT_NO_JUMPS has been split as dicussed > > in the original thread, along with a further split of AT_NO_PROCLINKS > > which means that each individual property of AT_NO_JUMPS is now a > > separate flag: > > > > *

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Aleksa Sarai
On 2018-09-29, Andy Lutomirski wrote: > > The most obvious change is that AT_NO_JUMPS has been split as dicussed > > in the original thread, along with a further split of AT_NO_PROCLINKS > > which means that each individual property of AT_NO_JUMPS is now a > > separate flag: > > > > *

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Christian Brauner
On Sat, Sep 29, 2018 at 08:34:50PM +1000, Aleksa Sarai wrote: > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Christian Brauner
On Sat, Sep 29, 2018 at 08:34:50PM +1000, Aleksa Sarai wrote: > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Andy Lutomirski
> On Sep 29, 2018, at 3:34 AM, Aleksa Sarai wrote: > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Andy Lutomirski
> On Sep 29, 2018, at 3:34 AM, Aleksa Sarai wrote: > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's

[PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Aleksa Sarai
The need for some sort of control over VFS's path resolution (to avoid malicious paths resulting in inadvertent breakouts) has been a very long-standing desire of many userspace applications. This patchset is a revival of Al Viro's old AT_NO_JUMPS[1] patchset with a few additions. The most

[PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Aleksa Sarai
The need for some sort of control over VFS's path resolution (to avoid malicious paths resulting in inadvertent breakouts) has been a very long-standing desire of many userspace applications. This patchset is a revival of Al Viro's old AT_NO_JUMPS[1] patchset with a few additions. The most