Skip to content
Commit afd59424 authored by Edward Cree's avatar Edward Cree Committed by Alexei Starovoitov
Browse files

bpf: fix off-by-one error in adjust_subprog_starts

When patching in a new sequence for the first insn of a subprog, the start
 of that subprog does not change (it's the first insn of the sequence), so
 adjust_subprog_starts should check start <= off (rather than < off).
Also added a test to test_verifier.c (it's essentially the syz reproducer).

Fixes: cc8b0b92

 ("bpf: introduce function calls (function boundaries)")
Reported-by: default avatar <syzbot+4fc427c7af994b0948be@syzkaller.appspotmail.com>
Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent da85d8bf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment