From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8ED06A87 for ; Tue, 24 Jan 2017 10:38:31 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id F2F71AB for ; Tue, 24 Jan 2017 10:38:30 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id r126so33640347wmr.3 for ; Tue, 24 Jan 2017 02:38:30 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Alexey Dobriyan Date: Tue, 24 Jan 2017 13:38:28 +0300 Message-ID: To: Andy Lutomirski Content-Type: text/plain; charset=UTF-8 Cc: Josh Armour , "ksummit-discuss@lists.linuxfoundation.org" , Greg KH , Linux Kernel , Djalal Harouni Subject: Re: [Ksummit-discuss] security-related TODO items? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , [add linux-kernel] On Tue, Jan 24, 2017 at 5:38 AM, Andy Lutomirski wrote: > Here's another one: split up and modernize /proc. > > I'm imagining a whole series of changes: > > - Make a sysctlfs. You could mount it and get all the sysctls if you > have global privilege. If you only have privilege relative to some > namespace, you could pass a mount option like -o scope=net to get just > sysctls that belong to the mounting process' netns. If done > carefully, this should be safe for unprivileged mounting without the > fs_fully_visible() checks. > > - Teach procfs to understand mount options for real (per-superblock). > Shouldn't be that hard. > > - Make it possible to control hidepid per mount. systemd and such > could use this to tighten up daemons. > > - Make it possible to make /proc/PID/cmdline only show argv[0] via > per-mount option or perhaps sysctl. > > - Make it possible to mount a mini-proc that doesn't have all the > non-PID stuff. Presumably it would still have an empty directory > called sys and maybe some other minimal contents for compatibility Yes, please! mount -t sysctl ... mount -t proc-pid ... mount -t proc-kitchen-sink ...