From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753782AbdEENHD (ORCPT ); Fri, 5 May 2017 09:07:03 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:33862 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbdEENHB (ORCPT ); Fri, 5 May 2017 09:07:01 -0400 MIME-Version: 1.0 In-Reply-To: <20170504145832.GA28002@mail.hallyn.com> References: <1492640420-27345-1-git-send-email-tixxdz@gmail.com> <1492640420-27345-3-git-send-email-tixxdz@gmail.com> <20170504145832.GA28002@mail.hallyn.com> From: Djalal Harouni Date: Fri, 5 May 2017 15:06:59 +0200 Message-ID: Subject: Re: [PATCH v3 2/2] modules:capabilities: add a per-task modules autoload restriction To: "Serge E. Hallyn" Cc: Andy Lutomirski , Kees Cook , Andy Lutomirski , Linux Kernel Mailing List , Andrew Morton , "kernel-hardening@lists.openwall.com" , 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 , Mauro Carvalho Chehab , Ingo Molnar , belakhdar abdeldjalil , Peter Zijlstra , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Serge, On Thu, May 4, 2017 at 4:58 PM, Serge E. Hallyn wrote: > On Thu, May 04, 2017 at 03:07:49PM +0200, Djalal Harouni wrote: >> 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 > > (v2 is under very very early consideration, would love to stay in the loop > as this is considered) > For user database I'm not aware of any code, but it seems that if the database or settings are adapted to today use cases then systemd-logind may use them. Yes if there is something I'll Cc'you. Thanks! -- tixxdz 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: Fri, 5 May 2017 15:06:59 +0200 Message-ID: References: <1492640420-27345-1-git-send-email-tixxdz@gmail.com> <1492640420-27345-3-git-send-email-tixxdz@gmail.com> <20170504145832.GA28002@mail.hallyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20170504145832.GA28002@mail.hallyn.com> Sender: linux-kernel-owner@vger.kernel.org To: "Serge E. Hallyn" Cc: Andy Lutomirski , Kees Cook , Andy Lutomirski , Linux Kernel Mailing List , Andrew Morton , "kernel-hardening@lists.openwall.com" , 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 Hi Serge, On Thu, May 4, 2017 at 4:58 PM, Serge E. Hallyn wrote: > On Thu, May 04, 2017 at 03:07:49PM +0200, Djalal Harouni wrote: >> 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 > > (v2 is under very very early consideration, would love to stay in the loop > as this is considered) > For user database I'm not aware of any code, but it seems that if the database or settings are adapted to today use cases then systemd-logind may use them. Yes if there is something I'll Cc'you. Thanks! -- tixxdz From mboxrd@z Thu Jan 1 00:00:00 1970 From: tixxdz@gmail.com (Djalal Harouni) Date: Fri, 5 May 2017 15:06:59 +0200 Subject: [PATCH v3 2/2] modules:capabilities: add a per-task modules autoload restriction In-Reply-To: <20170504145832.GA28002@mail.hallyn.com> References: <1492640420-27345-1-git-send-email-tixxdz@gmail.com> <1492640420-27345-3-git-send-email-tixxdz@gmail.com> <20170504145832.GA28002@mail.hallyn.com> Message-ID: To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org Hi Serge, On Thu, May 4, 2017 at 4:58 PM, Serge E. Hallyn wrote: > On Thu, May 04, 2017 at 03:07:49PM +0200, Djalal Harouni wrote: >> 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 > > (v2 is under very very early consideration, would love to stay in the loop > as this is considered) > For user database I'm not aware of any code, but it seems that if the database or settings are adapted to today use cases then systemd-logind may use them. Yes if there is something I'll Cc'you. Thanks! -- tixxdz -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20170504145832.GA28002@mail.hallyn.com> References: <1492640420-27345-1-git-send-email-tixxdz@gmail.com> <1492640420-27345-3-git-send-email-tixxdz@gmail.com> <20170504145832.GA28002@mail.hallyn.com> From: Djalal Harouni Date: Fri, 5 May 2017 15:06:59 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: [kernel-hardening] Re: [PATCH v3 2/2] modules:capabilities: add a per-task modules autoload restriction To: "Serge E. Hallyn" Cc: Andy Lutomirski , Kees Cook , Andy Lutomirski , Linux Kernel Mailing List , Andrew Morton , "kernel-hardening@lists.openwall.com" , 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 , Mauro Carvalho Chehab , Ingo Molnar , belakhdar abdeldjalil , Peter Zijlstra , Linus Torvalds List-ID: Hi Serge, On Thu, May 4, 2017 at 4:58 PM, Serge E. Hallyn wrote: > On Thu, May 04, 2017 at 03:07:49PM +0200, Djalal Harouni wrote: >> 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 > > (v2 is under very very early consideration, would love to stay in the loop > as this is considered) > For user database I'm not aware of any code, but it seems that if the database or settings are adapted to today use cases then systemd-logind may use them. Yes if there is something I'll Cc'you. Thanks! -- tixxdz