syzbot


KASAN: slab-out-of-bounds Read in fib6_nh_get_excptn_bucket

Status: auto-closed as invalid on 2020/05/26 18:38
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+ce7be3d2a9d20f463b76@syzkaller.appspotmail.com
First crash: 1686d, last: 1549d
Discussions (1)
Title Replies (including bot) Last reply
KASAN: slab-out-of-bounds Read in fib6_nh_get_excptn_bucket 0 (1) 2019/09/17 06:57
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in fib6_nh_get_excptn_bucket (3) net 2 1074d 1123d 0/26 auto-closed as invalid on 2021/09/13 13:28
upstream KASAN: slab-out-of-bounds Read in fib6_nh_get_excptn_bucket (2) net 1 1238d 1238d 0/26 auto-closed as invalid on 2021/03/03 21:59

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in fib6_nh_get_excptn_bucket+0x198/0x1b0 net/ipv6/route.c:1595
Read of size 8 at addr ffff88809374a2f8 by task udevd/15311

CPU: 0 PID: 15311 Comm: udevd Not tainted 5.4.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x197/0x210 lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
 kasan_report+0x12/0x20 mm/kasan/common.c:634
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
 fib6_nh_get_excptn_bucket+0x198/0x1b0 net/ipv6/route.c:1595
 fib6_nh_flush_exceptions+0x37/0x2d0 net/ipv6/route.c:1723
 fib6_nh_release+0x84/0x3a0 net/ipv6/route.c:3508
 fib6_info_destroy_rcu+0x11e/0x160 net/ipv6/ip6_fib.c:174
 __rcu_reclaim kernel/rcu/rcu.h:222 [inline]
 rcu_do_batch kernel/rcu/tree.c:2157 [inline]
 rcu_core+0x581/0x1560 kernel/rcu/tree.c:2377
 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2386
 __do_softirq+0x262/0x98c kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0x19b/0x1e0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:536 [inline]
 smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
 </IRQ>
RIP: 0010:nd_jump_root+0x6e/0x3e0 fs/namei.c:842
Code: e6 e8 c6 92 b8 ff 45 85 e4 0f 84 a5 01 00 00 e8 38 91 b8 ff 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 66 83 3c 02 00 <0f> 85 e0 02 00 00 48 8d 7b 20 48 b8 00 00 00 00 00 fc ff df 48 89
RSP: 0018:ffff88805a7a7a68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: dffffc0000000000 RBX: ffff88805a7a7c60 RCX: ffffffff81bac5da
RDX: 1ffff1100b4f4f8c RSI: ffffffff81bac5e8 RDI: 0000000000000005
RBP: ffff88805a7a7a88 R08: ffff888093ce2480 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000040
R13: ffff88805a7a7c98 R14: ffff88805a7a7c60 R15: ffff88805d13c760
 path_init+0x1234/0x18f0 fs/namei.c:2198
 path_lookupat.isra.0+0x97/0x8d0 fs/namei.c:2298
 filename_lookup+0x1b0/0x3f0 fs/namei.c:2338
 user_path_at_empty+0x43/0x50 fs/namei.c:2598
 do_readlinkat+0xe9/0x320 fs/stat.c:399
 __do_sys_readlink fs/stat.c:432 [inline]
 __se_sys_readlink fs/stat.c:429 [inline]
 __x64_sys_readlink+0x78/0xb0 fs/stat.c:429
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f351219c577
Code: f0 ff ff 77 02 f3 c3 48 8b 15 bd 38 2b 00 f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 90 90 b8 59 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 91 38 2b 00 31 d2 48 29 c2 64
RSP: 002b:00007fff772d94c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000059
RAX: ffffffffffffffda RBX: 00007fff772d9d00 RCX: 00007f351219c577
RDX: 0000000000000400 RSI: 00007fff772d98d0 RDI: 00007fff772d94d0
RBP: 0000000000000200 R08: 000000000041c733 R09: 00007f35121f15d0
R10: 7269762f73656369 R11: 0000000000000202 R12: 0000000000f56cc8
R13: 0000000000f56cbc R14: 0000000000f40250 R15: 0000000000f45e10

Allocated by task 22745:
 save_stack+0x23/0x90 mm/kasan/common.c:69
 set_track mm/kasan/common.c:77 [inline]
 __kasan_kmalloc mm/kasan/common.c:510 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483
 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524
 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3550
 kmalloc include/linux/slab.h:556 [inline]
 kzalloc include/linux/slab.h:690 [inline]
 fib6_info_alloc+0xb6/0x1b0 net/ipv6/ip6_fib.c:154
 ip6_route_info_create+0x2fe/0x1530 net/ipv6/route.c:3610
 ip6_route_add+0x27/0xc0 net/ipv6/route.c:3702
 inet6_rtm_newroute+0x16c/0x180 net/ipv6/route.c:5270
 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5245
 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477
 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5263
 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
 netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328
 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:637 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:657
 ___sys_sendmsg+0x803/0x920 net/socket.c:2311
 __sys_sendmsg+0x105/0x1d0 net/socket.c:2356
 __do_sys_sendmsg net/socket.c:2365 [inline]
 __se_sys_sendmsg net/socket.c:2363 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2363
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 22058:
 save_stack+0x23/0x90 mm/kasan/common.c:69
 set_track mm/kasan/common.c:77 [inline]
 kasan_set_free_info mm/kasan/common.c:332 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480
 __cache_free mm/slab.c:3425 [inline]
 kfree+0x10a/0x2c0 mm/slab.c:3756
 loopback_runtime_free+0x37/0x50 sound/drivers/aloop.c:573
 snd_pcm_detach_substream+0x95/0x377 sound/core/pcm.c:987
 snd_pcm_release_substream.part.0+0x23d/0x330 sound/core/pcm_native.c:2435
 snd_pcm_release_substream+0x61/0x80 sound/core/pcm_native.c:2418
 snd_pcm_oss_release_file.part.0+0x75/0xa0 sound/core/oss/pcm_oss.c:2368
 snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2363 [inline]
 snd_pcm_oss_release+0x116/0x290 sound/core/oss/pcm_oss.c:2547
 __fput+0x2ff/0x890 fs/file_table.c:280
 ____fput+0x16/0x20 fs/file_table.c:313
 task_work_run+0x145/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:163
 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:274 [inline]
 do_syscall_64+0x65f/0x760 arch/x86/entry/common.c:300
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88809374a200
 which belongs to the cache kmalloc-192 of size 192
The buggy address is located 56 bytes to the right of
 192-byte region [ffff88809374a200, ffff88809374a2c0)
The buggy address belongs to the page:
page:ffffea00024dd280 refcount:1 mapcount:0 mapping:ffff8880aa400000 index:0x0
raw: 01fffc0000000200 ffffea000258d8c8 ffffea0002a25088 ffff8880aa400000
raw: 0000000000000000 ffff88809374a000 0000000100000010 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88809374a180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff88809374a200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88809374a280: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
 ffff88809374a300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88809374a380: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/24 20:14 upstream 6b8a79467876 598ca6c8 .config console log report ci-upstream-kasan-gce
2019/10/14 04:51 upstream d4615e5a4680 2f661ec4 .config console log report ci-upstream-kasan-gce-selinux-root
2019/10/10 11:20 upstream 8a8c600de5dc a4efa8c0 .config console log report ci-upstream-kasan-gce-selinux-root
2019/09/28 17:27 upstream f1f2f614d535 eb6b9855 .config console log report ci-upstream-kasan-gce-selinux-root
2019/09/28 03:45 upstream 8f744bdee4fe d8074e0b .config console log report ci-upstream-kasan-gce
2019/09/25 05:14 upstream 351c8a09b00b e38a6630 .config console log report ci-upstream-kasan-gce
2019/09/23 18:10 upstream 3c6a6910a81e 1e9788a0 .config console log report ci-upstream-kasan-gce
2019/09/19 11:50 upstream b41dae061bbd eb940044 .config console log report ci-upstream-kasan-gce
2019/09/13 05:31 upstream 505a8ec7e11a 40fa42bc .config console log report ci-upstream-kasan-gce
2020/01/27 18:37 net-old 2821e26f3a0a dd56146d .config console log report ci-upstream-net-this-kasan-gce
2019/09/24 13:33 net-old 34b4688425d9 c68252d2 .config console log report ci-upstream-net-this-kasan-gce
2019/09/16 03:56 net-old 1609d7604b84 32d59357 .config console log report ci-upstream-net-this-kasan-gce
2019/09/13 01:58 net-old b456d72412ca 40fa42bc .config console log report ci-upstream-net-this-kasan-gce
2019/12/08 21:25 net-next-old 596cf45cbf6e 1508f453 .config console log report ci-upstream-net-kasan-gce
2019/11/13 20:36 net-next-old 90bc72b13c08 048f2d49 .config console log report ci-upstream-net-kasan-gce
2019/12/15 17:05 linux-next 32b8acf85223 eef6e580 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.