Thread (10 messages) 10 messages, 5 authors, 2019-06-29

Re: [PATCH V33 24/30] bpf: Restrict bpf when kernel lockdown is in confidentiality mode

From: Andy Lutomirski <luto@amacapital.net>
Date: 2019-06-27 00:57:19
Also in: linux-api, lkml, netdev

On Jun 26, 2019, at 1:22 PM, James Morris [off-list ref] wrote:

[Adding the LSM mailing list: missed this patchset initially]
quoted
On Thu, 20 Jun 2019, Andy Lutomirski wrote:

This patch exemplifies why I don't like this approach:
quoted
@@ -97,6 +97,7 @@ enum lockdown_reason {
       LOCKDOWN_INTEGRITY_MAX,
       LOCKDOWN_KCORE,
       LOCKDOWN_KPROBES,
+       LOCKDOWN_BPF,
       LOCKDOWN_CONFIDENTIALITY_MAX,
quoted
--- a/security/lockdown/lockdown.c
+++ b/security/lockdown/lockdown.c
@@ -33,6 +33,7 @@ static char *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = {
       [LOCKDOWN_INTEGRITY_MAX] = "integrity",
       [LOCKDOWN_KCORE] = "/proc/kcore access",
       [LOCKDOWN_KPROBES] = "use of kprobes",
+       [LOCKDOWN_BPF] = "use of bpf",
       [LOCKDOWN_CONFIDENTIALITY_MAX] = "confidentiality",
The text here says "use of bpf", but what this patch is *really* doing
is locking down use of BPF to read kernel memory.  If the details
change, then every LSM needs to get updated, and we risk breaking user
policies that are based on LSMs that offer excessively fine
granularity.
Can you give an example of how the details might change?
quoted
I'd be more comfortable if the LSM only got to see "confidentiality"
or "integrity".
These are not sufficient for creating a useful policy for the SELinux 
case.
I may have misunderstood, but I thought that SELinux mainly needed to allow certain privileged programs to bypass the policy.  Is there a real example of what SELinux wants to do that can’t be done in the simplified model?

The think that specifically makes me uneasy about exposing all of these precise actions to LSMs is that they will get exposed to userspace in a way that forces us to treat them as stable ABIs.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help