lkml.org 
[lkml]   [2018]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] pipe: actually allow root to exceed the pipe buffer limits
On Tue, Jan 09, 2018 at 02:23:32PM -0800, Kees Cook wrote:
> On Sun, Jan 7, 2018 at 9:35 PM, Eric Biggers <ebiggers3@gmail.com> wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > pipe-user-pages-hard and pipe-user-pages-soft are only supposed to apply
> > to unprivileged users, as documented in both Documentation/sysctl/fs.txt
> > and the pipe(7) man page.
> >
> > However, the capabilities are actually only checked when increasing a
> > pipe's size using F_SETPIPE_SZ, not when creating a new pipe.
> > Therefore, if pipe-user-pages-hard has been set, the root user can run
> > into it and be unable to create pipes. Similarly, if
> > pipe-user-pages-soft has been set, the root user can run into it and
> > have their pipes limited to 1 page each.
> >
> > Fix this by allowing the privileged override in both cases.
>
> Should this be controlled per-namespace instead of via init-ns caps?
>

I don't think so. Users shouldn't be able to bypass the limits by creating a
user namespace.

Eric

\
 
 \ /
  Last update: 2018-01-14 23:20    [W:0.047 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site