aboutsummaryrefslogtreecommitdiff
path: root/tools/usb/testusb.c
diff options
context:
space:
mode:
authorDaniel Borkmann2018-01-16 23:30:10 +0100
committerAlexei Starovoitov2018-01-16 15:04:58 -0800
commitf37a8cb84cce18762e8f86a70bd6a49a66ab964c (patch)
treed6440b185e4d4810624fb59163ff419cd1a28ca4 /tools/usb/testusb.c
parenta2284d912bfc865cdca4c00488e08a3550f9a405 (diff)
bpf: reject stores into ctx via st and xadd
Alexei found that verifier does not reject stores into context via BPF_ST instead of BPF_STX. And while looking at it, we also should not allow XADD variant of BPF_STX. The context rewriter is only assuming either BPF_LDX_MEM- or BPF_STX_MEM-type operations, thus reject anything other than that so that assumptions in the rewriter properly hold. Add test cases as well for BPF selftests. Fixes: d691f9e8d440 ("bpf: allow programs to write to certain skb fields") Reported-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/usb/testusb.c')
0 files changed, 0 insertions, 0 deletions