Re: WARNING in __mark_chain_precision (2)
From: Alexei Starovoitov <hidden>
Date: 2019-09-03 00:40:20
Also in:
bpf, lkml
On Thu, Aug 29, 2019 at 4:28 AM syzbot [off-list ref] wrote:
Hello, syzbot found the following crash on: HEAD commit: 47ee6e86 selftests/bpf: remove wrong nhoff in flow dissect.. git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=16227fa6600000 kernel config: https://syzkaller.appspot.com/x/.config?x=d4cf1ffb87d590d7 dashboard link: https://syzkaller.appspot.com/bug?extid=c8d66267fd2b5955287e compiler: gcc (GCC) 9.0.0 20181231 (experimental) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10d26ebc600000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=127805ca600000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+c8d66267fd2b5955287e@syzkaller.appspotmail.com ------------[ cut here ]------------ verifier backtracking bug WARNING: CPU: 0 PID: 8795 at kernel/bpf/verifier.c:1782 __mark_chain_precision+0x197a/0x1ea0 kernel/bpf/verifier.c:1782
fyi I found some time to debug it. The following program will be incorrectly rejected due to precision tracking bug. (b7) r2 = 0 (bf) r3 = r10 (16) if w3 == 0xf6fffdfd goto pc+0 (7a) *(u64 *)(r3 -16) = -8 (79) r4 = *(u64 *)(r10 -16) (b7) r6 = -1 (2d) if r4 > r6 goto pc+5 Still thinking how to fix it cleanly.