Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-10-21 Thread Tycho Andersen
On Wed, Oct 17, 2018 at 06:15:47PM +, Michael Tirado wrote: > Tycho, Sorry for the duplicate, I forgot to CC the list :( > > On Wed, Oct 17, 2018 at 3:00 PM Tycho Andersen wrote: > > > > > > That's one of the use cases, but there are a large number of others. I > > discuss a few in patch 1: >

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-10-17 Thread Michael Tirado
Tycho, Sorry for the duplicate, I forgot to CC the list :( On Wed, Oct 17, 2018 at 3:00 PM Tycho Andersen wrote: > > > That's one of the use cases, but there are a large number of others. I > discuss a few in patch 1: > https://www.spinics.net/lists/linux-containers/msg33956.html > Thanks this i

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-10-17 Thread Kees Cook
On Wed, Oct 17, 2018 at 12:25 AM, Michael Tirado wrote: > On Thu, Sep 13, 2018 at 12:02 AM Andy Lutomirski wrote: >> >> Or we could have a >> seccomp() mode that adds a filter but only kicks in after execve(). >> >> --Andy > > Hey that's a pretty good idea, then we could block execve in a seccomp

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-10-17 Thread Tycho Andersen
On Wed, Oct 17, 2018 at 07:25:00AM +, Michael Tirado wrote: > On Thu, Sep 13, 2018 at 12:02 AM Andy Lutomirski wrote: > > > > Or we could have a > > seccomp() mode that adds a filter but only kicks in after execve(). > > > > --Andy > > Hey that's a pretty good idea, then we could block execve

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-10-17 Thread Michael Tirado
On Thu, Sep 13, 2018 at 12:02 AM Andy Lutomirski wrote: > > Or we could have a > seccomp() mode that adds a filter but only kicks in after execve(). > > --Andy Hey that's a pretty good idea, then we could block execve in a seccomp launcher without post-exec cooperation, or that patch I wrote that

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-09-13 Thread Tycho Andersen
On Wed, Sep 12, 2018 at 05:00:54PM -0700, Andy Lutomirski wrote: > On Thu, Sep 6, 2018 at 8:28 AM, Tycho Andersen wrote: > > As an alternative to SECCOMP_FILTER_FLAG_GET_LISTENER, perhaps a ptrace() > > version which can acquire filters is useful. There are at least two reasons > > this is prefera

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-09-12 Thread Andy Lutomirski
On Thu, Sep 6, 2018 at 8:28 AM, Tycho Andersen wrote: > As an alternative to SECCOMP_FILTER_FLAG_GET_LISTENER, perhaps a ptrace() > version which can acquire filters is useful. There are at least two reasons > this is preferable, even though it uses ptrace: > > 1. You can control tasks that aren't

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-09-06 Thread Tycho Andersen
On Thu, Sep 06, 2018 at 05:45:25PM +0200, Jann Horn wrote: > On Thu, Sep 6, 2018 at 5:29 PM Tycho Andersen wrote: > > > > As an alternative to SECCOMP_FILTER_FLAG_GET_LISTENER, perhaps a ptrace() > > version which can acquire filters is useful. There are at least two reasons > > this is preferable

Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-09-06 Thread Jann Horn
On Thu, Sep 6, 2018 at 5:29 PM Tycho Andersen wrote: > > As an alternative to SECCOMP_FILTER_FLAG_GET_LISTENER, perhaps a ptrace() > version which can acquire filters is useful. There are at least two reasons > this is preferable, even though it uses ptrace: > > 1. You can control tasks that aren'

[PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace

2018-09-06 Thread Tycho Andersen
As an alternative to SECCOMP_FILTER_FLAG_GET_LISTENER, perhaps a ptrace() version which can acquire filters is useful. There are at least two reasons this is preferable, even though it uses ptrace: 1. You can control tasks that aren't cooperating with you 2. You can control tasks whose filters blo