Re: [PATCH v5 0/4] Fix unsafe BPF_PROG_TEST_RUN interface

2018-12-04 Thread Alexei Starovoitov
On Mon, Dec 03, 2018 at 11:31:22AM +, Lorenz Bauer wrote: > Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. > This is because bpf_test_finish copies the output buffer to user space > without checking its size. This can lead to the kernel overwriting > data in user space

[PATCH v5 0/4] Fix unsafe BPF_PROG_TEST_RUN interface

2018-12-03 Thread Lorenz Bauer
Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. This is because bpf_test_finish copies the output buffer to user space without checking its size. This can lead to the kernel overwriting data in user space after the buffer if xdp_adjust_head and friends are in play. Thanks t