From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH 0/10] userns: sysctl limits for namespaces Date: Thu, 21 Jul 2016 11:46:48 -0700 Message-ID: References: <8737n5dscy.fsf@x220.int.ebiederm.org> <871t2n53o5.fsf@x220.int.ebiederm.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <871t2n53o5.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Eric W. Biederman" Cc: Linux Containers , Andy Lutomirski , Seth Forshee , Nikolay Borisov , Jann Horn List-Id: containers.vger.kernel.org On Thu, Jul 21, 2016 at 9:58 AM, Eric W. Biederman wrote: > Kees Cook writes: > >> On Tue, Jul 19, 2016 at 6:13 PM, Eric W. Biederman >> wrote: >>> >>> This patchset addresses two use cases: >>> - Implement a sane upper bound on the number of namespaces. >>> - Provide a way for sandboxes to limit the attack surface from >>> namespaces. >>> >>> The maximum sane case I can imagine is if every process is a fat >>> process, so I set the maximum number of namespaces to the maximum >>> number of threads. >>> >>> I make these limits recursive and per user namespace so that a >>> usernamespace root can reduce the limits further. If a user namespace >>> root raises the limit the limit in the parent namespace will be honored. >>> >>> I have cut this implementation to the bare minimum needed to achieve >>> these objections. >>> >>> Assuming nothing problematic shows up in the review I will add these to >>> my user namespace tree. >> >> This looks great; thank you! I think the design is effective. One >> thought that pops to mind is how does an admin query the current >> number of active namespaces of a given type? (It's likely this is >> already exposed somewhere and I just don't know where to look...) > > You want to give me your acked by on the patches? Sure thing, consider the series: Acked-by: Kees Cook -Kees -- Kees Cook Chrome OS & Brillo Security