From mboxrd@z Thu Jan 1 00:00:00 1970 From: Djalal Harouni Subject: Re: [PATCH v3 2/2] modules:capabilities: add a per-task modules autoload restriction Date: Thu, 4 May 2017 15:07:49 +0200 Message-ID: References: <1492640420-27345-1-git-send-email-tixxdz@gmail.com> <1492640420-27345-3-git-send-email-tixxdz@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Lutomirski Cc: Kees Cook , Andy Lutomirski , Linux Kernel Mailing List , Andrew Morton , "Serge E. Hallyn" , "kernel-hardening-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org" , LSM List , Linux API , Dongsu Park , Casey Schaufler , James Morris , Paul Moore , Tetsuo Handa , Greg Kroah-Hartman , Jonathan Corbet , Jessica Yu , Rusty Russell , Arnaldo Carvalho de Melo List-Id: linux-api@vger.kernel.org On Sat, Apr 22, 2017 at 2:17 PM, Djalal Harouni wrote: > On Sat, Apr 22, 2017 at 1:28 AM, Andy Lutomirski wrote: [...] >> >> My point is that all of these need some way to handle configuration >> and inheritance, and I don't think that a bunch of per-task prctls is >> the right way. As just an example, saying that interactive users can >> autoload modules but other users can't, or that certain systemd >> services can, etc, might be nice. Linus already complained that he >> (i.e. user "torvalds" or whatever) should be able to profile the >> kernel but that other uids should not be able to. > > Neat, maybe this could already be achieved with this interface and > systemd-logind, "ModulesAutoloadUsers=andy" in logind.conf where > "andy" is the only logged-in user able to trigger and autoload kernel > modules. However maybe we should not restrict too much other bits or > functionality of the other users, please let me will follow up later > on it. > >> I personally like my implicit_rights idea, and it might be interesting >> to prototype it. > Andy following on the idea of per user settings, I'm curious did you manage to make some advance on how to store the user settings ? the user database format is old and not extensible, there was cgmanager or other libcgroup but for resources, and no simple thing for such restrictions example: "RestrictLinuxModules=user" that will prevent such users from making/loading extra Linux features/modules that are not already available... Thanks! -- tixxdz