From: Stephen Smalley <firstname.lastname@example.org> To: James Morris <email@example.com> Cc: Andy Lutomirski <firstname.lastname@example.org>, Andy Lutomirski <email@example.com>, Matthew Garrett <firstname.lastname@example.org>, email@example.com, LKML <firstname.lastname@example.org>, Linux API <email@example.com>, David Howells <firstname.lastname@example.org>, Alexei Starovoitov <email@example.com>, Matthew Garrett <firstname.lastname@example.org>, Network Development <email@example.com>, Chun-Yi Lee <firstname.lastname@example.org>, Daniel Borkmann <email@example.com>, firstname.lastname@example.org Subject: Re: [PATCH V33 24/30] bpf: Restrict bpf when kernel lockdown is in confidentiality mode Date: Thu, 27 Jun 2019 16:16:17 -0400 Message-ID: <email@example.com> (raw) In-Reply-To: <alpine.LRH.firstname.lastname@example.org> On 6/27/19 2:06 PM, James Morris wrote: > On Thu, 27 Jun 2019, Stephen Smalley wrote: > >> There are two scenarios where finer-grained distinctions make sense: >> >> - Users may need to enable specific functionality that falls under the >> umbrella of "confidentiality" or "integrity" lockdown. Finer-grained lockdown >> reasons free them from having to make an all-or-nothing choice between lost >> functionality or no lockdown at all. > > Agreed. This will be used for more than just UEFI secure boot on desktops, > e.g. embedded systems using verified boot, where finer grained policy will > be needed for what are sometimes very specific use-cases (which may be > also covered by other mitigations). > >> This can be supported directly by the >> lockdown module without any help from SELinux or other security modules; we >> just need the ability to specify these finer-grained lockdown levels via the >> boot parameters and securityfs nodes. > > If the lockdown LSM implements fine grained policy (rather than the simple > coarse grained policy), I'd suggest adding a new lockdown level of > 'custom' which by default enables all hooks but allows selective > disablement via params/sysfs. > > This would be simpler than telling users to use a different lockdown LSM > for this. > >> - Different processes/programs may need to use different sets of functionality >> restricted via lockdown confidentiality or integrity categories. If we have >> to allow all-or-none for the set of interfaces/functionality covered by the >> generic confidentiality or integrity categories, then we'll end up having to >> choose between lost functionality or overprivileged processes, neither of >> which is optimal. >> >> Is it truly the case that everything under the "confidentiality" category >> poses the same level of risk to kernel confidentiality, and similarly for >> everything under the "integrity" category? If not, then being able to >> distinguish them definitely has benefit. > > Good question. We can't know the answer to this unless we know how an > attacker might leverage access. > > The value here IMHO is more in allowing tradeoffs to be made by system > designers vs. disabling lockdown entirely. > >> I'm still not clear though on how/if this will compose with or be overridden >> by other security modules. We would need some means for another security >> module to take over lockdown decisions once it has initialized (including >> policy load), and to be able to access state that is currently private to the >> lockdown module, like the level. > > Why not utilize stacking (restrictively), similarly to capabilities? That would only allow the LSM to further lock down the system above the lockdown level set at boot, not grant exemptions for specific functionality/interfaces required by the user or by a specific process/program. You'd have to boot with lockdown=none (or your lockdown=custom suggestion) in order for the LSM to allow anything covered by the integrity or confidentiality levels. And then the kernel would be unprotected prior to full initialization of the LSM, including policy load. It seems like one would want to be able to boot with lockdown=integrity to protect the kernel initially, then switch over to allowing the LSM to selectively override it.
next prev parent reply index Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <email@example.com> 2019-06-21 1:19 ` Matthew Garrett 2019-06-21 5:22 ` Andy Lutomirski 2019-06-21 20:05 ` Matthew Garrett 2019-06-26 20:22 ` James Morris 2019-06-27 0:57 ` Andy Lutomirski 2019-06-27 14:35 ` Stephen Smalley 2019-06-27 18:06 ` James Morris 2019-06-27 20:16 ` Stephen Smalley [this message] 2019-06-27 23:16 ` Matthew Garrett 2019-06-27 23:23 ` Andy Lutomirski 2019-06-27 23:27 ` Andy Lutomirski 2019-06-28 18:47 ` Matthew Garrett 2019-06-29 23:47 ` Andy Lutomirski
Reply instructions: You may reply publically to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Netdev Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \ firstname.lastname@example.org email@example.com public-inbox-index netdev Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.netdev AGPL code for this site: git clone https://public-inbox.org/ public-inbox