Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-04-23 Thread Kees Cook
On Tue, Apr 23, 2019 at 4:34 PM Tycho Andersen wrote: > > On Tue, Apr 23, 2019 at 04:31:45PM -0700, Kees Cook wrote: > > On Tue, Apr 23, 2019 at 3:09 PM Kees Cook wrote: > > > > > > On Wed, Mar 6, 2019 at 12:14 PM Tycho Andersen wrote: > > > > > > > > As the comment notes, the return codes for

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-04-23 Thread Tycho Andersen
On Tue, Apr 23, 2019 at 04:31:45PM -0700, Kees Cook wrote: > On Tue, Apr 23, 2019 at 3:09 PM Kees Cook wrote: > > > > On Wed, Mar 6, 2019 at 12:14 PM Tycho Andersen wrote: > > > > > > As the comment notes, the return codes for TSYNC and NEW_LISTENER > > > conflict, > > > because they both

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-04-23 Thread Kees Cook
On Tue, Apr 23, 2019 at 3:09 PM Kees Cook wrote: > > On Wed, Mar 6, 2019 at 12:14 PM Tycho Andersen wrote: > > > > As the comment notes, the return codes for TSYNC and NEW_LISTENER conflict, > > because they both return positive values, one in the case of success and > > one in the case of

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-04-23 Thread James Morris
On Tue, 23 Apr 2019, Kees Cook wrote: > Thanks! Sorry I missed this. James, can you take this for Linus's > fixes for v5.1? (Or should I send a pull request to you?) > > Acked-by: Kees Cook These are standalone for v5.1 fixes currently so you can send them directly to Linus. > > Let's also

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-04-23 Thread Kees Cook
On Wed, Mar 6, 2019 at 12:14 PM Tycho Andersen wrote: > > As the comment notes, the return codes for TSYNC and NEW_LISTENER conflict, > because they both return positive values, one in the case of success and > one in the case of error. So, let's disallow both of these flags together. > > While

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-03-06 Thread Tycho Andersen
On Wed, Mar 06, 2019 at 10:02:25PM +0100, Christian Brauner wrote: > On Wed, Mar 6, 2019 at 9:46 PM Tycho Andersen wrote: > > > > On Wed, Mar 06, 2019 at 09:39:35PM +0100, Christian Brauner wrote: > > > > + > > > > /* Prepare the new filter before holding any locks. */ > > > > prepared =

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-03-06 Thread Christian Brauner
On Wed, Mar 6, 2019 at 9:46 PM Tycho Andersen wrote: > > On Wed, Mar 06, 2019 at 09:39:35PM +0100, Christian Brauner wrote: > > > + > > > /* Prepare the new filter before holding any locks. */ > > > prepared = seccomp_prepare_user_filter(filter); > > > if (IS_ERR(prepared)) > > > @@

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-03-06 Thread Tycho Andersen
On Wed, Mar 06, 2019 at 09:39:35PM +0100, Christian Brauner wrote: > > + > > /* Prepare the new filter before holding any locks. */ > > prepared = seccomp_prepare_user_filter(filter); > > if (IS_ERR(prepared)) > > @@ -1302,7 +1315,7 @@ static long seccomp_set_mode_filter(unsigned int

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-03-06 Thread Christian Brauner
On Wed, Mar 06, 2019 at 01:14:13PM -0700, Tycho Andersen wrote: > As the comment notes, the return codes for TSYNC and NEW_LISTENER conflict, > because they both return positive values, one in the case of success and > one in the case of error. So, let's disallow both of these flags together. > >

[PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-03-06 Thread Tycho Andersen
As the comment notes, the return codes for TSYNC and NEW_LISTENER conflict, because they both return positive values, one in the case of success and one in the case of error. So, let's disallow both of these flags together. While this is technically a userspace break, all the users I know of are