syzbot


KMSAN: uninit-value in rtm_dump_nexthop

Status: fixed on 2019/09/06 20:45
Subsystems: net
[Documentation on labels]
Fix commit: d00ee64e1dcf netlink: Fix nlmsg_parse as a wrapper for strict message parsing
First crash: 1890d, last: 1874d

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in nh_valid_dump_req net/ipv4/nexthop.c:1678 [inline]
BUG: KMSAN: uninit-value in rtm_dump_nexthop+0x973/0x1670 net/ipv4/nexthop.c:1698
CPU: 1 PID: 11841 Comm: syz-executor189 Not tainted 5.3.0-rc3+ #17
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x162/0x2d0 mm/kmsan/kmsan_report.c:109
 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:294
 nh_valid_dump_req net/ipv4/nexthop.c:1678 [inline]
 rtm_dump_nexthop+0x973/0x1670 net/ipv4/nexthop.c:1698
 netlink_dump+0xab5/0x1b00 net/netlink/af_netlink.c:2244
 __netlink_dump_start+0xa3a/0xb30 net/netlink/af_netlink.c:2352
 netlink_dump_start include/linux/netlink.h:233 [inline]
 rtnetlink_rcv_msg+0x14e0/0x1580 net/core/rtnetlink.c:5186
 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5241
 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
 netlink_unicast+0xf6c/0x1050 net/netlink/af_netlink.c:1328
 netlink_sendmsg+0x110f/0x1330 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:637 [inline]
 sock_sendmsg net/socket.c:657 [inline]
 ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311
 __sys_sendmsg net/socket.c:2356 [inline]
 __do_sys_sendmsg net/socket.c:2365 [inline]
 __se_sys_sendmsg+0x305/0x460 net/socket.c:2363
 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x4401b9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe5d72b9b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401b9
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40
R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline]
 kmsan_internal_poison_shadow+0x53/0xa0 mm/kmsan/kmsan.c:146
 kmsan_slab_alloc+0xaa/0x120 mm/kmsan/kmsan_hooks.c:175
 slab_alloc_node mm/slub.c:2790 [inline]
 __kmalloc_node_track_caller+0xb55/0x1320 mm/slub.c:4388
 __kmalloc_reserve net/core/skbuff.c:141 [inline]
 __alloc_skb+0x306/0xa10 net/core/skbuff.c:209
 alloc_skb include/linux/skbuff.h:1056 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline]
 netlink_sendmsg+0x783/0x1330 net/netlink/af_netlink.c:1892
 sock_sendmsg_nosec net/socket.c:637 [inline]
 sock_sendmsg net/socket.c:657 [inline]
 ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311
 __sys_sendmsg net/socket.c:2356 [inline]
 __do_sys_sendmsg net/socket.c:2365 [inline]
 __se_sys_sendmsg+0x305/0x460 net/socket.c:2363
 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/08/11 00:49 https://github.com/google/kmsan.git master 61ccdad1fcdf acb51638 .config console log report syz C ci-upstream-kmsan-gce
2019/08/27 11:47 https://github.com/google/kmsan.git master 61ccdad1fcdf d21c5d9d .config console log report ci-upstream-kmsan-gce
2019/08/13 10:09 https://github.com/google/kmsan.git master 61ccdad1fcdf 8620c2c2 .config console log report ci-upstream-kmsan-gce
2019/08/13 10:07 https://github.com/google/kmsan.git master 61ccdad1fcdf 8620c2c2 .config console log report ci-upstream-kmsan-gce
2019/08/10 20:45 https://github.com/google/kmsan.git master 61ccdad1fcdf acb51638 .config console log report ci-upstream-kmsan-gce
2019/08/10 16:41 https://github.com/google/kmsan.git master 61ccdad1fcdf acb51638 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.