syzbot


KMSAN: uninit-value in fib6_new_table

Status: fixed on 2018/05/08 18:30
Subsystems: net
[Documentation on labels]
Fix commit: aa8f8778493c ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy
First crash: 2221d, last: 2220d

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in __read_once_size include/linux/compiler.h:197 [inline]
BUG: KMSAN: uninit-value in fib6_get_table net/ipv6/ip6_fib.c:272 [inline]
BUG: KMSAN: uninit-value in fib6_new_table+0x106/0x630 net/ipv6/ip6_fib.c:249
CPU: 1 PID: 4510 Comm: syzkaller106961 Not tainted 4.16.0+ #85
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+0x185/0x1d0 lib/dump_stack.c:53
 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:683
 __read_once_size include/linux/compiler.h:197 [inline]
 fib6_get_table net/ipv6/ip6_fib.c:272 [inline]
 fib6_new_table+0x106/0x630 net/ipv6/ip6_fib.c:249
 ip6_route_info_create+0xa17/0x4d00 net/ipv6/route.c:2587
 ip6_route_add+0xa2/0x300 net/ipv6/route.c:2883
 inet6_rtm_newroute+0x37e/0x27a0 net/ipv6/route.c:4273
 rtnetlink_rcv_msg+0xa32/0x1560 net/core/rtnetlink.c:4635
 netlink_rcv_skb+0x378/0x600 net/netlink/af_netlink.c:2447
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4653
 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
 netlink_unicast+0x166b/0x1740 net/netlink/af_netlink.c:1337
 netlink_sendmsg+0x1048/0x1310 net/netlink/af_netlink.c:1900
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
 __sys_sendmsg net/socket.c:2080 [inline]
 SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091
 SyS_sendmsg+0x54/0x80 net/socket.c:2087
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x43fdc9
RSP: 002b:00007ffc905e0fe8 EFLAGS: 00000213 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fdc9
RDX: 0000000000000000 RSI: 000000002001bfc8 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000213 R12: 00000000004016f0
R13: 0000000000401780 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:293 [inline]
 kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684
 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:528
 rtm_to_fib6_config+0x1918/0x1b60 net/ipv6/route.c:3959
 inet6_rtm_newroute+0x138/0x27a0 net/ipv6/route.c:4266
 rtnetlink_rcv_msg+0xa32/0x1560 net/core/rtnetlink.c:4635
 netlink_rcv_skb+0x378/0x600 net/netlink/af_netlink.c:2447
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4653
 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
 netlink_unicast+0x166b/0x1740 net/netlink/af_netlink.c:1337
 netlink_sendmsg+0x1048/0x1310 net/netlink/af_netlink.c:1900
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
 __sys_sendmsg net/socket.c:2080 [inline]
 SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091
 SyS_sendmsg+0x54/0x80 net/socket.c:2087
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188
 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314
 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321
 slab_post_alloc_hook mm/slab.h:445 [inline]
 slab_alloc_node mm/slub.c:2737 [inline]
 __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369
 __kmalloc_reserve net/core/skbuff.c:138 [inline]
 __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206
 alloc_skb include/linux/skbuff.h:984 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1183 [inline]
 netlink_sendmsg+0x9a6/0x1310 net/netlink/af_netlink.c:1875
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
 __sys_sendmsg net/socket.c:2080 [inline]
 SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091
 SyS_sendmsg+0x54/0x80 net/socket.c:2087
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/04/22 08:40 https://github.com/google/kmsan.git master a7f95e9c8a95 d23fcf6c .config console log report syz C ci-upstream-kmsan-gce
2018/04/21 14:57 https://github.com/google/kmsan.git master a7f95e9c8a95 d23fcf6c .config console log report ci-upstream-kmsan-gce
2018/04/21 14:30 https://github.com/google/kmsan.git master a7f95e9c8a95 d23fcf6c .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.