syzbot


KASAN: use-after-free Read in fib6_ifup

Status: closed as invalid on 2018/01/15 04:57
Subsystems: net
[Documentation on labels]
First crash: 2309d, last: 2305d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in fib6_ifup (2) net C 18 2304d 2301d 4/26 fixed on 2018/01/22 13:19

Sample crash report:
device lo left promiscuous mode
device lo entered promiscuous mode
==================================================================
BUG: KASAN: use-after-free in fib6_ifup+0x212/0x220 net/ipv6/route.c:3573
Read of size 8 at addr ffff8801cc1a4780 by task syz-executor2/30269

CPU: 1 PID: 30269 Comm: syz-executor2 Not tainted 4.15.0-rc7+ #188
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:53
 print_address_description+0x73/0x250 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report+0x25b/0x340 mm/kasan/report.c:409
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430
 fib6_ifup+0x212/0x220 net/ipv6/route.c:3573
 fib6_clean_node+0x389/0x580 net/ipv6/ip6_fib.c:1912
 fib6_walk_continue+0x46c/0x8a0 net/ipv6/ip6_fib.c:1838
 fib6_walk+0x91/0xf0 net/ipv6/ip6_fib.c:1886
 fib6_clean_tree+0x1e6/0x340 net/ipv6/ip6_fib.c:1963
 __fib6_clean_all+0x1f4/0x3a0 net/ipv6/ip6_fib.c:1979
 fib6_clean_all+0x27/0x30 net/ipv6/ip6_fib.c:1990
 rt6_sync_up+0x15e/0x1c0 net/ipv6/route.c:3592
 addrconf_notify+0x3f6/0x2310 net/ipv6/addrconf.c:3490
 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93
 __raw_notifier_call_chain kernel/notifier.c:394 [inline]
 raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401
 call_netdevice_notifiers_info+0x32/0x70 net/core/dev.c:1708
 call_netdevice_notifiers net/core/dev.c:1726 [inline]
 __dev_notify_flags+0x15d/0x430 net/core/dev.c:6933
 dev_change_flags+0xf5/0x140 net/core/dev.c:6969
 devinet_ioctl+0x125b/0x19e0 net/ipv4/devinet.c:1083
 inet_ioctl+0x117/0x1c0 net/ipv4/af_inet.c:904
 packet_ioctl+0x1ff/0x310 net/packet/af_packet.c:4068
 sock_do_ioctl+0x65/0xb0 net/socket.c:958
 sock_ioctl+0x2c2/0x440 net/socket.c:1055
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x452cf9
RSP: 002b:00007f4253679c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452cf9
RDX: 00000000208a3fe0 RSI: 0000000000008914 RDI: 0000000000000017
RBP: 0000000000000352 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f3050
R13: 00000000ffffffff R14: 00007f425367a6d4 R15: 0000000000000000

Allocated by task 29462:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551
 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489
 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3544
 dst_alloc+0x11f/0x1a0 net/core/dst.c:104
 __ip6_dst_alloc+0x35/0x90 net/ipv6/route.c:361
 ip6_dst_alloc+0x29/0xb0 net/ipv6/route.c:376
 ip6_route_info_create+0x4ff/0x2e20 net/ipv6/route.c:2538
 ip6_route_add+0xa2/0x190 net/ipv6/route.c:2779
 ipv6_route_ioctl+0x4db/0x6b0 net/ipv6/route.c:3299
 inet6_ioctl+0xef/0x1e0 net/ipv6/af_inet6.c:520
 sock_do_ioctl+0x65/0xb0 net/socket.c:958
 sock_ioctl+0x2c2/0x440 net/socket.c:1055
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 entry_SYSCALL_64_fastpath+0x23/0x9a

Freed by task 30266:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3488 [inline]
 kmem_cache_free+0x83/0x2a0 mm/slab.c:3746
 dst_destroy+0x257/0x370 net/core/dst.c:140
 dst_destroy_rcu+0x16/0x20 net/core/dst.c:153
 __rcu_reclaim kernel/rcu/rcu.h:195 [inline]
 rcu_do_batch kernel/rcu/tree.c:2758 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:3012 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2979 [inline]
 rcu_process_callbacks+0xd6c/0x17f0 kernel/rcu/tree.c:2996
 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285

The buggy address belongs to the object at ffff8801cc1a4780
 which belongs to the cache ip6_dst_cache of size 320
The buggy address is located 0 bytes inside of
 320-byte region [ffff8801cc1a4780, ffff8801cc1a48c0)
The buggy address belongs to the page:
page:ffffea0007306900 count:1 mapcount:0 mapping:ffff8801cc1a4000 index:0x0
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801cc1a4000 0000000000000000 000000010000000a
raw: ffffea000700e2e0 ffffea000732c6a0 ffff8801d32b9a80 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801cc1a4680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8801cc1a4700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff8801cc1a4780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8801cc1a4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8801cc1a4880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
==================================================================

Crashes (52):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/15 03:33 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/15 03:21 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/15 02:32 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/15 01:36 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/15 01:02 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/15 00:37 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 23:39 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 23:20 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 22:40 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 22:22 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 21:35 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 20:43 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 20:03 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 18:50 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 18:28 net-next-old 1988c7957881 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 16:40 net-next-old 6bd39bc3da0f 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 15:57 net-next-old 6bd39bc3da0f 66d492a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 14:42 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/14 10:39 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/14 09:40 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/14 07:26 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/14 07:03 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/14 03:12 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/14 03:00 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/13 22:58 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/13 21:46 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/13 19:24 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/13 13:53 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/13 13:38 net-next-old 6bd39bc3da0f c9e7aeae .config console log report ci-upstream-net-kasan-gce
2018/01/13 09:51 net-next-old 6bd39bc3da0f 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/13 08:35 net-next-old 6bd39bc3da0f 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/13 06:34 net-next-old 6bd39bc3da0f 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/13 05:46 net-next-old 6bd39bc3da0f 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/13 05:14 net-next-old 6bd39bc3da0f 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/13 04:12 net-next-old 6bd39bc3da0f 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/13 02:12 net-next-old 19d28fbd306e 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/13 01:34 net-next-old 19d28fbd306e 9dc808a6 .config console log report ci-upstream-net-kasan-gce
2018/01/14 18:51 mmots ce3c209f6733 66d492a6 .config console log report ci-upstream-mmots-kasan-gce
2018/01/14 13:23 linux-next 3e53c7415294 c9e7aeae .config console log report ci-upstream-next-kasan-gce
2018/01/14 10:26 mmots ce3c209f6733 c9e7aeae .config console log report ci-upstream-mmots-kasan-gce
* Struck through repros no longer work on HEAD.