syzbot


KMSAN: uninit-value in ip6_tnl_start_xmit

Status: fixed on 2018/10/11 14:33
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+3fde91d4d394747d6db4@syzkaller.appspotmail.com
Fix commit: 76c0ddd8c3a6 ip6_tunnel: be careful when accessing the inner header
First crash: 2179d, last: 2029d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 3.16 000/328] 3.16.62-rc1 review 338 (338) 2018/12/16 22:01
[PATCH 4.9 00/71] 4.9.134-stable review 82 (82) 2018/11/29 12:54
[PATCH 3.18 000/144] 3.18.125-stable review 152 (152) 2018/11/10 00:44
[PATCH 4.4 00/48] 4.4.162-stable review 57 (57) 2018/10/22 13:05
[PATCH 4.14 000/109] 4.14.77-stable review 116 (116) 2018/10/18 07:12
[PATCH 4.18 000/135] 4.18.15-stable review 156 (156) 2018/10/18 07:11
[PATCH net] ip6_tunnel: be careful when accessing the inner header 4 (4) 2018/09/24 11:03
KMSAN: uninit-value in ip6_tnl_start_xmit 0 (1) 2018/09/17 15:23

Sample crash report:
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
8021q: adding VLAN 0 to HW filter on device team0
==================================================================
BUG: KMSAN: uninit-value in ip6ip6_tnl_xmit net/ipv6/ip6_tunnel.c:1307 [inline]
BUG: KMSAN: uninit-value in ip6_tnl_start_xmit+0x7d2/0x1ef0 net/ipv6/ip6_tunnel.c:1390
CPU: 0 PID: 4504 Comm: syz-executor558 Not tainted 4.16.0+ #87
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
 ip6ip6_tnl_xmit net/ipv6/ip6_tunnel.c:1307 [inline]
 ip6_tnl_start_xmit+0x7d2/0x1ef0 net/ipv6/ip6_tunnel.c:1390
 __netdev_start_xmit include/linux/netdevice.h:4066 [inline]
 netdev_start_xmit include/linux/netdevice.h:4075 [inline]
 xmit_one net/core/dev.c:3026 [inline]
 dev_hard_start_xmit+0x5f1/0xc70 net/core/dev.c:3042
 __dev_queue_xmit+0x27ee/0x3520 net/core/dev.c:3557
 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3590
 packet_snd net/packet/af_packet.c:2944 [inline]
 packet_sendmsg+0x7c70/0x8a30 net/packet/af_packet.c:2969
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
 __sys_sendmmsg+0x42d/0x800 net/socket.c:2136
 SYSC_sendmmsg+0xc4/0x110 net/socket.c:2167
 SyS_sendmmsg+0x63/0x90 net/socket.c:2162
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x441819
RSP: 002b:00007ffe58ee8268 EFLAGS: 00000213 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441819
RDX: 0000000000000002 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00000000006cd018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000213 R12: 0000000000402510
R13: 00000000004025a0 R14: 0000000000000000 R15: 0000000000000000

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]
 alloc_skb_with_frags+0x1d4/0xb20 net/core/skbuff.c:5234
 sock_alloc_send_pskb+0xb56/0x1190 net/core/sock.c:2085
 packet_alloc_skb net/packet/af_packet.c:2803 [inline]
 packet_snd net/packet/af_packet.c:2894 [inline]
 packet_sendmsg+0x6454/0x8a30 net/packet/af_packet.c:2969
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
 __sys_sendmmsg+0x42d/0x800 net/socket.c:2136
 SYSC_sendmmsg+0xc4/0x110 net/socket.c:2167
 SyS_sendmmsg+0x63/0x90 net/socket.c:2162
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
==================================================================

Crashes (69):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/05/01 15:17 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report syz C ci-upstream-kmsan-gce
2018/09/27 23:14 https://github.com/google/kmsan.git master a5bff9bd1b2a 0c2fa87b .config console log report ci-upstream-kmsan-gce
2018/09/25 21:10 https://github.com/google/kmsan.git master eb2e67596de2 b7e11289 .config console log report ci-upstream-kmsan-gce
2018/09/25 08:08 https://github.com/google/kmsan.git master f94b97e38776 0e7547d7 .config console log report ci-upstream-kmsan-gce
2018/09/24 23:03 https://github.com/google/kmsan.git master f94b97e38776 2f485cdf .config console log report ci-upstream-kmsan-gce
2018/09/24 20:00 https://github.com/google/kmsan.git master f94b97e38776 2f485cdf .config console log report ci-upstream-kmsan-gce
2018/09/24 04:19 https://github.com/google/kmsan.git master 7ace43031cfc 28d9ac76 .config console log report ci-upstream-kmsan-gce
2018/09/22 19:26 https://github.com/google/kmsan.git master 7ace43031cfc 37079712 .config console log report ci-upstream-kmsan-gce
2018/09/21 10:28 https://github.com/google/kmsan.git master 7ace43031cfc 37079712 .config console log report ci-upstream-kmsan-gce
2018/09/21 06:00 https://github.com/google/kmsan.git master 9cb6f201b7dc 6cee973c .config console log report ci-upstream-kmsan-gce
2018/09/21 04:35 https://github.com/google/kmsan.git master 9cb6f201b7dc 6cee973c .config console log report ci-upstream-kmsan-gce
2018/09/08 00:33 https://github.com/google/kmsan.git master 42a037ca8d9d 69cfeb80 .config console log report ci-upstream-kmsan-gce
2018/09/07 17:37 https://github.com/google/kmsan.git master 42a037ca8d9d 69cfeb80 .config console log report ci-upstream-kmsan-gce
2018/09/06 16:20 https://github.com/google/kmsan.git master 43e4752ae5dc 0bb7a7eb .config console log report ci-upstream-kmsan-gce
2018/09/06 08:54 https://github.com/google/kmsan.git master 43e4752ae5dc 873745f2 .config console log report ci-upstream-kmsan-gce
2018/09/04 20:25 https://github.com/google/kmsan.git master 28f0ca98eadf a4718693 .config console log report ci-upstream-kmsan-gce
2018/09/02 17:54 https://github.com/google/kmsan.git master 28f0ca98eadf a4718693 .config console log report ci-upstream-kmsan-gce
2018/09/02 13:07 https://github.com/google/kmsan.git master 28f0ca98eadf a4718693 .config console log report ci-upstream-kmsan-gce
2018/09/01 09:03 https://github.com/google/kmsan.git master 28f0ca98eadf a4718693 .config console log report ci-upstream-kmsan-gce
2018/08/31 14:25 https://github.com/google/kmsan.git master ab98bd30a4ba a4718693 .config console log report ci-upstream-kmsan-gce
2018/08/30 20:31 https://github.com/google/kmsan.git master 25114c64b719 938220fd .config console log report ci-upstream-kmsan-gce
2018/08/28 13:26 https://github.com/google/kmsan.git master 72cde92031e1 7ef1de9e .config console log report ci-upstream-kmsan-gce
2018/08/28 06:36 https://github.com/google/kmsan.git master 0cc51dc9a291 7ef1de9e .config console log report ci-upstream-kmsan-gce
2018/08/27 08:52 https://github.com/google/kmsan.git master 0cc51dc9a291 758cd203 .config console log report ci-upstream-kmsan-gce
2018/08/26 22:35 https://github.com/google/kmsan.git master 0cc51dc9a291 758cd203 .config console log report ci-upstream-kmsan-gce
2018/08/26 07:10 https://github.com/google/kmsan.git master 0cc51dc9a291 758cd203 .config console log report ci-upstream-kmsan-gce
2018/08/26 00:50 https://github.com/google/kmsan.git master 0cc51dc9a291 76e7c3df .config console log report ci-upstream-kmsan-gce
2018/08/25 11:06 https://github.com/google/kmsan.git master 0cc51dc9a291 9be5aa1d .config console log report ci-upstream-kmsan-gce
2018/08/24 19:47 https://github.com/google/kmsan.git master 0cc51dc9a291 9b0f5c75 .config console log report ci-upstream-kmsan-gce
2018/08/24 14:45 https://github.com/google/kmsan.git master 0cc51dc9a291 95b5c82b .config console log report ci-upstream-kmsan-gce
2018/08/23 23:50 https://github.com/google/kmsan.git master 0cc51dc9a291 95b5c82b .config console log report ci-upstream-kmsan-gce
2018/08/23 06:09 https://github.com/google/kmsan.git master 0cc51dc9a291 95b5c82b .config console log report ci-upstream-kmsan-gce
2018/08/22 20:25 https://github.com/google/kmsan.git master 0cc51dc9a291 95b5c82b .config console log report ci-upstream-kmsan-gce
2018/08/20 08:48 https://github.com/google/kmsan.git master 0cc51dc9a291 2dc4378f .config console log report ci-upstream-kmsan-gce
2018/08/20 02:07 https://github.com/google/kmsan.git master 0cc51dc9a291 2dc4378f .config console log report ci-upstream-kmsan-gce
2018/08/18 21:43 https://github.com/google/kmsan.git master 0cc51dc9a291 de20bcbb .config console log report ci-upstream-kmsan-gce
2018/08/18 18:21 https://github.com/google/kmsan.git master 0cc51dc9a291 db1858f6 .config console log report ci-upstream-kmsan-gce
2018/08/16 15:08 https://github.com/google/kmsan.git master 0cc51dc9a291 9ccc1d45 .config console log report ci-upstream-kmsan-gce
2018/08/15 00:38 https://github.com/google/kmsan.git master 0cc51dc9a291 0e6dcb88 .config console log report ci-upstream-kmsan-gce
2018/08/13 13:49 https://github.com/google/kmsan.git master 0cc51dc9a291 7a88b141 .config console log report ci-upstream-kmsan-gce
2018/08/11 23:18 https://github.com/google/kmsan.git master 0cc51dc9a291 7a88b141 .config console log report ci-upstream-kmsan-gce
2018/08/11 04:55 https://github.com/google/kmsan.git master 0cc51dc9a291 7a88b141 .config console log report ci-upstream-kmsan-gce
2018/08/10 21:50 https://github.com/google/kmsan.git master 0cc51dc9a291 1fb62d58 .config console log report ci-upstream-kmsan-gce
2018/07/24 10:31 https://github.com/google/kmsan.git master d1c2a46a46f6 912c93d7 .config console log report ci-upstream-kmsan-gce
2018/07/24 06:40 https://github.com/google/kmsan.git master d1c2a46a46f6 912c93d7 .config console log report ci-upstream-kmsan-gce
2018/07/22 21:39 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/22 09:35 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/21 23:38 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/20 20:33 https://github.com/google/kmsan.git master d1c2a46a46f6 af255b09 .config console log report ci-upstream-kmsan-gce
2018/05/01 12:03 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.