lkml.org 
[lkml]   [2023]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Add a sysctl option to disable bpf offensive helpers.
On Sat, Jun 10, 2023 at 4:21 AM Yi He <clangllvm@126.com> wrote:
>
> Some eBPF helper functions have been long regarded as problematic[1].
> More than just used for powerful rootkit, these features can also be
> exploited to harm the containers by perform various attacks to the
> processes outside the container in the enrtire VM, such as process
> DoS, information theft, and container escape.
>
> When a container is granted to run eBPF tracing programs (which
> need CAP_SYS_ADMIN), it can use the eBPF KProbe programs to hijack the
> process outside the contianer and to escape the containers. This kind
> of risks is limited as privieleged containers are warned and can hardly
> be accessed by the attackers.
>
> Even without CAP_SYS_ADMIN, since Linux 5.6, programs with with CAP_BPF +
> CAP_PERFMON can use dangerous eBPF helpers such as bpf_read_user to steal
> sensitive data (e.g., sshd/nginx private key) in other containers.

You can do the same completely without BPF and with just CAP_PERFMON.
I'm not going to share how, because you'll write a "security paper"
about insecure linux just like last time:
https://lore.kernel.org/bpf/20230117151256.605977-1-clangllvm@126.com/
Note, our answers didn't change. Look for security glory somewhere else.

\
 
 \ /
  Last update: 2023-06-10 17:38    [W:1.069 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site