SeaBee Capabilities¶
This document exists as a way to track what the userspace program does and what it still needs to do.
Threats mitigated¶
- Block access to the userspace's eBPF maps via the
BPF_GET_FD_BY_IDcommand in thesecurity_bpfLSM hook - Block signals that would interrupt or terminate the userspace process group
via
security_task_kill - Block unlinking of eBPF pinned programs via the
security_inode_unlinkLSM hook - Block unmounting of
/sysor/sys/bpfvia thesecurity_sb_umountLSM hook - Block kernel module loading via the
security_kernel_read_file,security_kernel_load_data, andsecurity_kernel_module_requestLSM hooks - Block ptrace of the userspace via the
security_ptrace_access_checkLSM hook - Block killing a parent process of the userspace by running under systemd
Threats investigated and dismissed¶
- Multiple eBPF programs on the same LSM hook cannot override a "deny" result
- Blocking eBPF pinned map access because the userspace's maps aren't pinned
- ptrace through
security_ptrace_tracemeis out of scope since it is only invoked by the process requesting to be traced and the SeaBee userspace is not doing that - The
bpf_send_signalhelper can only signal thecurrenttask - uprobe attaching to the userspace process is not a concern as long as
bpf_probe_write_useris blocked
Threats addressed by other tools¶
Threats yet to be addressed¶
- Handle safe
security_kernel_module_requestcalls for kernel modules - Manipulating the BPF pinned programs through
sys_bpf- open, write, read, etc.
- prevention of blocking our necessary permissions
- Does mounting BPFFS in a container/namespace cause the umount protections to fail?
- Prevent removing
bpffrom the LSM kernel command-line in the GRUB config