[PATCH bpf] bpf: fix off-by-one error in adjust_subprog_starts

2018-11-16 Thread Edward Cree
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).

[PATCH bpf] bpf: fix off-by-one error in adjust_subprog_starts

2018-11-16 Thread Edward Cree
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).