Home
last modified time | relevance | path

Searched hist:"14 b20b784f59bdd95f6f1cfb112c9818bcec4d84" (Results 1 – 1 of 1) sorted by relevance

/linux/kernel/bpf/
H A Dsyscall.cdiff 14b20b784f59bdd95f6f1cfb112c9818bcec4d84 Tue Aug 16 22:55:16 CEST 2022 YiFei Zhu <zhuyifei@google.com> bpf: Restrict bpf_sys_bpf to CAP_PERFMON

The verifier cannot perform sufficient validation of any pointers passed
into bpf_attr and treats them as integers rather than pointers. The helper
will then read from arbitrary pointers passed into it. Restrict the helper
to CAP_PERFMON since the security model in BPF of arbitrary kernel read is
CAP_BPF + CAP_PERFMON.

Fixes: af2ac3e13e45 ("bpf: Prepare bpf syscall to be used from kernel and user space.")
Signed-off-by: YiFei Zhu <zhuyifei@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220816205517.682470-1-zhuyifei@google.com