summaryrefslogtreecommitdiffstats
path: root/scripts/tools-support-relr.sh
diff options
context:
space:
mode:
authorHao Sun <sunhao.th@gmail.com>2023-01-04 09:47:09 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-09 11:28:27 +0100
commit74eec8266f37aff609db6a2f2b093e56a11c28c4 (patch)
tree98a684693c4ae0fe77cb60f7e3369d91d3528b23 /scripts/tools-support-relr.sh
parentd458a0984429c2d47e60254f5bc4119cbafe83a2 (diff)
downloadlinux-stable-74eec8266f37aff609db6a2f2b093e56a11c28c4.tar.gz
linux-stable-74eec8266f37aff609db6a2f2b093e56a11c28c4.tar.bz2
linux-stable-74eec8266f37aff609db6a2f2b093e56a11c28c4.zip
bpf: Skip invalid kfunc call in backtrack_insn
commit d3178e8a434b58678d99257c0387810a24042fb6 upstream. The verifier skips invalid kfunc call in check_kfunc_call(), which would be captured in fixup_kfunc_call() if such insn is not eliminated by dead code elimination. However, this can lead to the following warning in backtrack_insn(), also see [1]: ------------[ cut here ]------------ verifier backtracking bug WARNING: CPU: 6 PID: 8646 at kernel/bpf/verifier.c:2756 backtrack_insn kernel/bpf/verifier.c:2756 __mark_chain_precision kernel/bpf/verifier.c:3065 mark_chain_precision kernel/bpf/verifier.c:3165 adjust_reg_min_max_vals kernel/bpf/verifier.c:10715 check_alu_op kernel/bpf/verifier.c:10928 do_check kernel/bpf/verifier.c:13821 [inline] do_check_common kernel/bpf/verifier.c:16289 [...] So make backtracking conservative with this by returning ENOTSUPP. [1] https://lore.kernel.org/bpf/CACkBjsaXNceR8ZjkLG=dT3P=4A8SBsg0Z5h5PWLryF5=ghKq=g@mail.gmail.com/ Reported-by: syzbot+4da3ff23081bafe74fc2@syzkaller.appspotmail.com Signed-off-by: Hao Sun <sunhao.th@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20230104014709.9375-1-sunhao.th@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/tools-support-relr.sh')
0 files changed, 0 insertions, 0 deletions