summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-07-10 01:43:22 +0300
committerAlexei Starovoitov <ast@kernel.org>2018-07-10 18:15:30 +0300
commit59ee4129a279070d8e2f9dc1660330f6593c7808 (patch)
treeae2b186ce2f62280bbd74b91a72a9166f8c34d39 /tools/perf/scripts/python/net_dropmonitor.py
parentb9626f45abccd044f8048269c67720f0719f2d4e (diff)
downloadlinux-59ee4129a279070d8e2f9dc1660330f6593c7808.tar.xz
bpf: fix ldx in ld_abs rewrite for large offsets
Mark reported that syzkaller triggered a KASAN detected slab-out-of-bounds bug in ___bpf_prog_run() with a BPF_LD | BPF_ABS word load at offset 0x8001. After further investigation it became clear that the issue was the BPF_LDX_MEM() which takes offset as an argument whereas it cannot encode larger than S16_MAX offsets into it. For this synthetical case we need to move the full address into tmp register instead and do the LDX without immediate value. Fixes: e0cea7ce988c ("bpf: implement ld_abs/ld_ind in native bpf") Reported-by: syzbot <syzkaller@googlegroups.com> Reported-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions