diff options
| author | David Howells <[email protected]> | 2019-08-19 17:17:59 -0700 |
|---|---|---|
| committer | James Morris <[email protected]> | 2019-08-19 21:54:16 -0700 |
| commit | 9d1f8be5cf42b497a3bddf1d523f2bb142e9318c (patch) | |
| tree | fc926ba08f6b2b69c2b9341de2a16d2870b25bda /include/linux | |
| parent | a94549dd87f5ea4ca50fee493df08a2dc6256b53 (diff) | |
bpf: Restrict bpf when kernel lockdown is in confidentiality mode
bpf_read() and bpf_read_str() could potentially be abused to (eg) allow
private keys in kernel memory to be leaked. Disable them if the kernel
has been locked down in confidentiality mode.
Suggested-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
cc: [email protected]
cc: Chun-Yi Lee <[email protected]>
cc: Alexei Starovoitov <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Signed-off-by: James Morris <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/security.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 0b2529dbf0f4..e604f4c67f03 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -118,6 +118,7 @@ enum lockdown_reason { LOCKDOWN_INTEGRITY_MAX, LOCKDOWN_KCORE, LOCKDOWN_KPROBES, + LOCKDOWN_BPF_READ, LOCKDOWN_CONFIDENTIALITY_MAX, }; |