Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1671658 > unrolled thread
| Started by | Andrey Konovalov <andreyknvl@google.com> |
|---|---|
| First post | 2017-06-21 15:10 +0200 |
| Last post | 2017-06-21 23:10 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: net/ipv6: GPF in rt6_ifdown Andrey Konovalov <andreyknvl@google.com> - 2017-06-21 15:10 +0200
Re: net/ipv6: GPF in rt6_ifdown Andrey Konovalov <andreyknvl@google.com> - 2017-06-21 20:00 +0200
Re: net/ipv6: GPF in rt6_ifdown Cong Wang <xiyou.wangcong@gmail.com> - 2017-06-21 22:10 +0200
Re: net/ipv6: GPF in rt6_ifdown Cong Wang <xiyou.wangcong@gmail.com> - 2017-06-21 23:10 +0200
| From | Andrey Konovalov <andreyknvl@google.com> |
|---|---|
| Date | 2017-06-21 15:10 +0200 |
| Subject | Re: net/ipv6: GPF in rt6_ifdown |
| Message-ID | <tUNyq-6vN-13@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Jun 21, 2017 at 2:08 PM, Andrey Konovalov <andreyknvl@google.com> wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 9705596d08ac87c18aee32cc97f2783b7d14624e (4.12-rc6+). > > It might be related to: > https://groups.google.com/forum/#!topic/syzkaller/ZJaqAiFLe3k > > I only have a reproducer in the form of a syzkaller program, attached > together with my .config. I now have a C reproducer as well, attached. > > It can be executed as described here: > https://github.com/google/syzkaller/blob/master/docs/executing_syzkaller_programs.md > > With the following flags: > ./syz-execprog -repeat=0 -procs=8 -sandbox=namespace ./log > > Since I'm able to reproduce it, I can apply debug patches and test > with them if required. > > kasan: CONFIG_KASAN_INLINE enabled > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: 0000 [#1] SMP KASAN > Modules linked in: > CPU: 1 PID: 4499 Comm: syz-executor Not tainted 4.12.0-rc6+ #10 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 > task: ffff880068e88000 task.stack: ffff88005e0a0000 > RIP: 0010:rt6_uncached_list_flush_dev net/ipv6/route.c:167 > RIP: 0010:rt6_ifdown+0x3d4/0x910 net/ipv6/route.c:2824 > RSP: 0018:ffff88005e0a6e38 EFLAGS: 00010246 > RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc900029a2000 > RDX: 0000000000002dce RSI: ffffffff83ea9ee8 RDI: ffff88006ca25444 > RBP: ffff88005e0a6f98 R08: 0000000000000001 R09: c9811a8e00000000 > R10: ffff880068e88810 R11: dffffc0000000000 R12: ffff88005e0ad518 > R13: ffff88005e0ad500 R14: ffff88006200b300 R15: dffffc0000000000 > FS: 00007f4ccaad9700(0000) GS:ffff88006cb00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 000000002000f000 CR3: 00000000672e8000 CR4: 00000000000006e0 > Call Trace: > addrconf_ifdown+0x1a8/0x1a30 net/ipv6/addrconf.c:3588 > addrconf_notify+0x1cf/0x2630 net/ipv6/addrconf.c:3512 > notifier_call_chain+0x14a/0x2e0 kernel/notifier.c:93 > __raw_notifier_call_chain kernel/notifier.c:394 > raw_notifier_call_chain+0x32/0x40 kernel/notifier.c:401 > call_netdevice_notifiers_info+0x56/0x90 net/core/dev.c:1650 > call_netdevice_notifiers net/core/dev.c:1666 > __dev_notify_flags+0x202/0x330 net/core/dev.c:6647 > dev_change_flags+0xfa/0x150 net/core/dev.c:6678 > dev_ifsioc+0x62f/0x9f0 net/core/dev_ioctl.c:254 > dev_ioctl+0x24e/0x1160 net/core/dev_ioctl.c:532 > sock_do_ioctl+0x99/0xb0 net/socket.c:913 > sock_ioctl+0x294/0x440 net/socket.c:1004 > vfs_ioctl fs/ioctl.c:45 > do_vfs_ioctl+0x1c4/0x1660 fs/ioctl.c:685 > SYSC_ioctl fs/ioctl.c:700 > SyS_ioctl+0x94/0xc0 fs/ioctl.c:691 > entry_SYSCALL_64_fastpath+0x1f/0xbe arch/x86/entry/entry_64.S:203 > RIP: 0033:0x446349 > RSP: 002b:00007f4ccaad8c08 EFLAGS: 00000282 ORIG_RAX: 0000000000000010 > RAX: ffffffffffffffda RBX: 0000000000003210 RCX: 0000000000446349 > RDX: 00000000208befe0 RSI: 0000000000008914 RDI: 0000000000000018 > RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000018 > R13: 0000000000003210 R14: 00000000006e42d0 R15: 0000000000008914 > Code: 49 8b 9d 58 01 00 00 4c 89 e0 48 c1 e8 03 42 80 3c 38 00 0f 85 > 6d 04 00 00 49 8b 45 18 48 89 85 f0 fe ff ff 48 89 d8 48 c1 e8 03 <42> > 80 3c 38 00 0f 85 5d 04 00 00 4c 3b 33 0f 84 d7 01 00 00 e8 > RIP: rt6_ifdown+0x3d4/0x910 RSP: ffff88005e0a6e38 > ---[ end trace f2e889448df70bb4 ]--- > Kernel panic - not syncing: Fatal exception in interrupt > Kernel Offset: disabled > ---[ end Kernel panic - not syncing: Fatal exception in interrupt
[toc] | [next] | [standalone]
| From | Andrey Konovalov <andreyknvl@google.com> |
|---|---|
| Date | 2017-06-21 20:00 +0200 |
| Message-ID | <tUS54-VR-19@gated-at.bofh.it> |
| In reply to | #1671658 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Jun 21, 2017 at 3:09 PM, Andrey Konovalov <andreyknvl@google.com> wrote: > On Wed, Jun 21, 2017 at 2:08 PM, Andrey Konovalov <andreyknvl@google.com> wrote: >> Hi, >> >> I've got the following error report while fuzzing the kernel with syzkaller. >> >> On commit 9705596d08ac87c18aee32cc97f2783b7d14624e (4.12-rc6+). >> >> It might be related to: >> https://groups.google.com/forum/#!topic/syzkaller/ZJaqAiFLe3k >> >> I only have a reproducer in the form of a syzkaller program, attached >> together with my .config. > > I now have a C reproducer as well, attached. And here's a much simpler reproducer. > >> >> It can be executed as described here: >> https://github.com/google/syzkaller/blob/master/docs/executing_syzkaller_programs.md >> >> With the following flags: >> ./syz-execprog -repeat=0 -procs=8 -sandbox=namespace ./log >> >> Since I'm able to reproduce it, I can apply debug patches and test >> with them if required. >> >> kasan: CONFIG_KASAN_INLINE enabled >> kasan: GPF could be caused by NULL-ptr deref or user memory access >> general protection fault: 0000 [#1] SMP KASAN >> Modules linked in: >> CPU: 1 PID: 4499 Comm: syz-executor Not tainted 4.12.0-rc6+ #10 >> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 >> task: ffff880068e88000 task.stack: ffff88005e0a0000 >> RIP: 0010:rt6_uncached_list_flush_dev net/ipv6/route.c:167 >> RIP: 0010:rt6_ifdown+0x3d4/0x910 net/ipv6/route.c:2824 >> RSP: 0018:ffff88005e0a6e38 EFLAGS: 00010246 >> RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc900029a2000 >> RDX: 0000000000002dce RSI: ffffffff83ea9ee8 RDI: ffff88006ca25444 >> RBP: ffff88005e0a6f98 R08: 0000000000000001 R09: c9811a8e00000000 >> R10: ffff880068e88810 R11: dffffc0000000000 R12: ffff88005e0ad518 >> R13: ffff88005e0ad500 R14: ffff88006200b300 R15: dffffc0000000000 >> FS: 00007f4ccaad9700(0000) GS:ffff88006cb00000(0000) knlGS:0000000000000000 >> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 >> CR2: 000000002000f000 CR3: 00000000672e8000 CR4: 00000000000006e0 >> Call Trace: >> addrconf_ifdown+0x1a8/0x1a30 net/ipv6/addrconf.c:3588 >> addrconf_notify+0x1cf/0x2630 net/ipv6/addrconf.c:3512 >> notifier_call_chain+0x14a/0x2e0 kernel/notifier.c:93 >> __raw_notifier_call_chain kernel/notifier.c:394 >> raw_notifier_call_chain+0x32/0x40 kernel/notifier.c:401 >> call_netdevice_notifiers_info+0x56/0x90 net/core/dev.c:1650 >> call_netdevice_notifiers net/core/dev.c:1666 >> __dev_notify_flags+0x202/0x330 net/core/dev.c:6647 >> dev_change_flags+0xfa/0x150 net/core/dev.c:6678 >> dev_ifsioc+0x62f/0x9f0 net/core/dev_ioctl.c:254 >> dev_ioctl+0x24e/0x1160 net/core/dev_ioctl.c:532 >> sock_do_ioctl+0x99/0xb0 net/socket.c:913 >> sock_ioctl+0x294/0x440 net/socket.c:1004 >> vfs_ioctl fs/ioctl.c:45 >> do_vfs_ioctl+0x1c4/0x1660 fs/ioctl.c:685 >> SYSC_ioctl fs/ioctl.c:700 >> SyS_ioctl+0x94/0xc0 fs/ioctl.c:691 >> entry_SYSCALL_64_fastpath+0x1f/0xbe arch/x86/entry/entry_64.S:203 >> RIP: 0033:0x446349 >> RSP: 002b:00007f4ccaad8c08 EFLAGS: 00000282 ORIG_RAX: 0000000000000010 >> RAX: ffffffffffffffda RBX: 0000000000003210 RCX: 0000000000446349 >> RDX: 00000000208befe0 RSI: 0000000000008914 RDI: 0000000000000018 >> RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000 >> R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000018 >> R13: 0000000000003210 R14: 00000000006e42d0 R15: 0000000000008914 >> Code: 49 8b 9d 58 01 00 00 4c 89 e0 48 c1 e8 03 42 80 3c 38 00 0f 85 >> 6d 04 00 00 49 8b 45 18 48 89 85 f0 fe ff ff 48 89 d8 48 c1 e8 03 <42> >> 80 3c 38 00 0f 85 5d 04 00 00 4c 3b 33 0f 84 d7 01 00 00 e8 >> RIP: rt6_ifdown+0x3d4/0x910 RSP: ffff88005e0a6e38 >> ---[ end trace f2e889448df70bb4 ]--- >> Kernel panic - not syncing: Fatal exception in interrupt >> Kernel Offset: disabled >> ---[ end Kernel panic - not syncing: Fatal exception in interrupt
[toc] | [prev] | [next] | [standalone]
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Date | 2017-06-21 22:10 +0200 |
| Message-ID | <tUU6S-2DB-17@gated-at.bofh.it> |
| In reply to | #1671861 |
On Wed, Jun 21, 2017 at 10:53 AM, Andrey Konovalov <andreyknvl@google.com> wrote: > On Wed, Jun 21, 2017 at 3:09 PM, Andrey Konovalov <andreyknvl@google.com> wrote: >> On Wed, Jun 21, 2017 at 2:08 PM, Andrey Konovalov <andreyknvl@google.com> wrote: >>> Hi, >>> >>> I've got the following error report while fuzzing the kernel with syzkaller. >>> >>> On commit 9705596d08ac87c18aee32cc97f2783b7d14624e (4.12-rc6+). >>> >>> It might be related to: >>> https://groups.google.com/forum/#!topic/syzkaller/ZJaqAiFLe3k >>> >>> I only have a reproducer in the form of a syzkaller program, attached >>> together with my .config. >> >> I now have a C reproducer as well, attached. > > And here's a much simpler reproducer. Thanks a lot for your reproducer! I added a few printk's, and find that we somehow have rt->rt6i_idev set to NULL but still keep it in the uncached list. ip6_dst_destroy() unlinks it before NULL'ing, so it should not be that case.
[toc] | [prev] | [next] | [standalone]
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Date | 2017-06-21 23:10 +0200 |
| Message-ID | <tUV2W-3fo-23@gated-at.bofh.it> |
| In reply to | #1671999 |
On Wed, Jun 21, 2017 at 1:08 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote: > On Wed, Jun 21, 2017 at 10:53 AM, Andrey Konovalov > <andreyknvl@google.com> wrote: >> On Wed, Jun 21, 2017 at 3:09 PM, Andrey Konovalov <andreyknvl@google.com> wrote: >>> On Wed, Jun 21, 2017 at 2:08 PM, Andrey Konovalov <andreyknvl@google.com> wrote: >>>> Hi, >>>> >>>> I've got the following error report while fuzzing the kernel with syzkaller. >>>> >>>> On commit 9705596d08ac87c18aee32cc97f2783b7d14624e (4.12-rc6+). >>>> >>>> It might be related to: >>>> https://groups.google.com/forum/#!topic/syzkaller/ZJaqAiFLe3k >>>> >>>> I only have a reproducer in the form of a syzkaller program, attached >>>> together with my .config. >>> >>> I now have a C reproducer as well, attached. >> >> And here's a much simpler reproducer. > > Thanks a lot for your reproducer! > > I added a few printk's, and find that we somehow have rt->rt6i_idev set > to NULL but still keep it in the uncached list. ip6_dst_destroy() unlinks > it before NULL'ing, so it should not be that case. Heck... The loopback_dev->ip6_ptr is set to NULL because of its mtu is set to smaller than IPV6_MIN_MTU, this is why we have rt->rt6i_idev NULL after a rt6_uncached_list_flush_dev()... I am thinking about a right fix.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web