Re: WARNING in __mark_chain_precision (2)

2019-09-02 Thread Alexei Starovoitov
On Thu, Aug 29, 2019 at 4:28 AM syzbot
 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=16227fa660
> 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=10d26ebc60
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=127805ca60
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+c8d66267fd2b59552...@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.


Re: WARNING in __mark_chain_precision (2)

2019-09-01 Thread syzbot

syzbot has bisected this bug to:

commit e786741ff1b52769b044b7f4407f39cd13ee5d2d
Author: Linus Torvalds 
Date:   Thu Jul 11 22:36:02 2019 +

Merge tag 'staging-5.3-rc1' of  
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging


bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=11958f1260
start commit:   47ee6e86 selftests/bpf: remove wrong nhoff in flow dissect..
git tree:   bpf-next
final crash:https://syzkaller.appspot.com/x/report.txt?x=13958f1260
console output: https://syzkaller.appspot.com/x/log.txt?x=15958f1260
kernel config:  https://syzkaller.appspot.com/x/.config?x=d4cf1ffb87d590d7
dashboard link: https://syzkaller.appspot.com/bug?extid=c8d66267fd2b5955287e
syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=10d26ebc60
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=127805ca60

Reported-by: syzbot+c8d66267fd2b59552...@syzkaller.appspotmail.com
Fixes: e786741ff1b5 ("Merge tag 'staging-5.3-rc1' of  
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging")


For information about bisection process see: https://goo.gl/tpsmEJ#bisection