syzbot


KMSAN: uninit-value in ip_tunnel_lookup (2)

Status: fixed on 2018/11/12 21:25
Subsystems: net
[Documentation on labels]
Fix commit: b0350d51f001 ip_gre: fix parsing gre header in ipgre_err
First crash: 2009d, last: 2008d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in ip_tunnel_lookup net 1 2031d 2031d 0/26 closed as invalid on 2018/10/03 18:03

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 __read_once_size include/linux/compiler.h:197 [inline]
BUG: KMSAN: uninit-value in ip_tunnel_lookup+0x17b/0x1610 net/ipv4/ip_tunnel.c:108
CPU: 1 PID: 6469 Comm: syz-executor963 Not tainted 4.19.0-rc8+ #70
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+0x306/0x460 lib/dump_stack.c:113
 kmsan_report+0x1a2/0x2e0 mm/kmsan/kmsan.c:917
 __msan_warning+0x7c/0xe0 mm/kmsan/kmsan_instr.c:500
 __read_once_size include/linux/compiler.h:197 [inline]
 ip_tunnel_lookup+0x17b/0x1610 net/ipv4/ip_tunnel.c:108
 ipgre_err net/ipv4/ip_gre.c:188 [inline]
 gre_err+0x9e8/0xf40 net/ipv4/ip_gre.c:254
 gre_err+0x1a5/0x200 net/ipv4/gre_demux.c:165
 icmp_socket_deliver net/ipv4/icmp.c:766 [inline]
 icmp_unreach+0xa35/0x1070 net/ipv4/icmp.c:883
 icmp_rcv+0x19d5/0x1a90 net/ipv4/icmp.c:1065
 ip_local_deliver_finish+0x8b7/0xf70 net/ipv4/ip_input.c:215
 NF_HOOK include/linux/netfilter.h:289 [inline]
 ip_local_deliver+0x44e/0x510 net/ipv4/ip_input.c:256
 dst_input include/net/dst.h:450 [inline]
 ip_rcv_finish net/ipv4/ip_input.c:415 [inline]
 NF_HOOK include/linux/netfilter.h:289 [inline]
 ip_rcv+0x6b6/0x740 net/ipv4/ip_input.c:524
 __netif_receive_skb_one_core net/core/dev.c:4913 [inline]
 __netif_receive_skb net/core/dev.c:5023 [inline]
 process_backlog+0x82b/0x11d0 net/core/dev.c:5829
 napi_poll net/core/dev.c:6249 [inline]
 net_rx_action+0x975/0x1cf0 net/core/dev.c:6315
 __do_softirq+0x601/0xa6d kernel/softirq.c:292
 do_softirq_own_stack+0x49/0x80 arch/x86/entry/entry_64.S:1055
 </IRQ>
 do_softirq kernel/softirq.c:336 [inline]
 __local_bh_enable_ip+0x139/0x170 kernel/softirq.c:189
 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32
 rcu_read_unlock_bh include/linux/rcupdate.h:723 [inline]
 ip_finish_output2+0x13ca/0x14f0 net/ipv4/ip_output.c:231
 ip_finish_output+0xd3c/0x10e0 net/ipv4/ip_output.c:317
 NF_HOOK_COND include/linux/netfilter.h:278 [inline]
 ip_output+0x534/0x600 net/ipv4/ip_output.c:405
 dst_output include/net/dst.h:444 [inline]
 ip_local_out net/ipv4/ip_output.c:124 [inline]
 ip_send_skb net/ipv4/ip_output.c:1441 [inline]
 ip_push_pending_frames+0x230/0x420 net/ipv4/ip_output.c:1461
 raw_sendmsg+0x2ce5/0x43b0 net/ipv4/raw.c:677
 inet_sendmsg+0x4d8/0x7f0 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:621 [inline]
 sock_sendmsg net/socket.c:631 [inline]
 __sys_sendto+0x975/0xb70 net/socket.c:1788
 __do_sys_sendto net/socket.c:1800 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:1796
 __x64_sys_sendto+0x6e/0x90 net/socket.c:1796
 do_syscall_64+0xbe/0x100 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x455da9
Code: e8 ec ad 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 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 1b c9 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff59463228 EFLAGS: 00000212 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000020000040 RCX: 0000000000455da9
RDX: 000000000000029c RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000020000080 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000412b50
R13: 0000000000412be0 R14: 0000000000000000 R15: 0000000000000000

Local variable description: ----tpi@gre_err
Variable was created at:
 gre_err+0x69/0xf40 net/ipv4/ip_gre.c:216
 gre_err+0x1a5/0x200 net/ipv4/gre_demux.c:165
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/10/26 00:10 https://github.com/google/kmsan.git master 4bb25354f0b0 a8292de9 .config console log report syz C ci-upstream-kmsan-gce
2018/10/24 23:29 https://github.com/google/kmsan.git master 4bb25354f0b0 a8292de9 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.