Skip to content
Commit 86f44fce authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

bpf: Disallow bpf programs call prog_run command.



The verifier cannot perform sufficient validation of bpf_attr->test.ctx_in
pointer, therefore bpf programs should not be allowed to call BPF_PROG_RUN
command from within the program.
To fix this issue split bpf_sys_bpf() bpf helper into normal kern_sys_bpf()
kernel function that can only be used by the kernel light skeleton directly.

Reported-by: default avatarYiFei Zhu <zhuyifei@google.com>
Fixes: b1d18a75 ("bpf: Extend sys_bpf commands for bpf_syscall programs.")
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent aada4766
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment