syzbot


KMSAN: uninit-value in nf_nat_ipv4_in

Status: closed as invalid on 2018/09/05 16:20
Subsystems: netfilter
[Documentation on labels]
First crash: 2453d, last: 2453d

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in skb_network_header include/linux/skbuff.h:2305 [inline]
BUG: KMSAN: uninit-value in ip_hdr include/linux/ip.h:25 [inline]
BUG: KMSAN: uninit-value in nf_nat_ipv4_in+0x1aa/0x3a0 net/ipv4/netfilter/nf_nat_l3proto_ipv4.c:333
CPU: 1 PID: 4539 Comm: syz-fuzzer Not tainted 4.17.0+ #16
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+0x185/0x1d0 lib/dump_stack.c:113
 kmsan_report+0x188/0x2a0 mm/kmsan/kmsan.c:1352
 __msan_warning_32+0x70/0xc0 mm/kmsan/kmsan_instr.c:634
 skb_network_header include/linux/skbuff.h:2305 [inline]
 ip_hdr include/linux/ip.h:25 [inline]
 nf_nat_ipv4_in+0x1aa/0x3a0 net/ipv4/netfilter/nf_nat_l3proto_ipv4.c:333
 iptable_nat_ipv4_in+0xa0/0xb0 net/ipv4/netfilter/iptable_nat.c:53
 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline]
 nf_hook_slow+0x15d/0x3e0 net/netfilter/core.c:483
 nf_hook include/linux/netfilter.h:243 [inline]
 NF_HOOK include/linux/netfilter.h:286 [inline]
 ip_rcv+0x10bf/0x16a0 net/ipv4/ip_input.c:492
 __netif_receive_skb_core+0x47f3/0x4aa0 net/core/dev.c:4592
 __netif_receive_skb net/core/dev.c:4657 [inline]
 netif_receive_skb_internal+0x49d/0x630 net/core/dev.c:4731
 napi_skb_finish net/core/dev.c:5093 [inline]
 napi_gro_receive+0x6a7/0xb60 net/core/dev.c:5124
 receive_buf+0x4c96/0x6ae0 drivers/net/virtio_net.c:945
 virtnet_receive drivers/net/virtio_net.c:1200 [inline]
 virtnet_poll+0x8ff/0x1420 drivers/net/virtio_net.c:1282
 napi_poll net/core/dev.c:5735 [inline]
 net_rx_action+0x766/0x1a80 net/core/dev.c:5801
 __do_softirq+0x592/0x979 kernel/softirq.c:285
 do_softirq_own_stack+0x49/0x80 arch/x86/entry/entry_64.S:1052
 </IRQ>
 do_softirq kernel/softirq.c:329 [inline]
 __local_bh_enable_ip+0x114/0x140 kernel/softirq.c:182
 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32
 rcu_read_unlock_bh include/linux/rcupdate.h:728 [inline]
 ip_finish_output2+0x136a/0x1480 net/ipv4/ip_output.c:231
 ip_finish_output+0xcbc/0x1000 net/ipv4/ip_output.c:317
 NF_HOOK_COND include/linux/netfilter.h:277 [inline]
 ip_output+0x505/0x5d0 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_queue_xmit+0x1b0f/0x1d00 net/ipv4/ip_output.c:504
 tcp_transmit_skb+0x3db5/0x5350 net/ipv4/tcp_output.c:1176
 tcp_write_xmit+0x2d81/0xb200 net/ipv4/tcp_output.c:2373
 __tcp_push_pending_frames+0x124/0x400 net/ipv4/tcp_output.c:2546
 tcp_push+0x803/0x8f0 net/ipv4/tcp.c:735
 tcp_sendmsg_locked+0x4eb1/0x6610 net/ipv4/tcp.c:1410
 tcp_sendmsg+0xb2/0x100 net/ipv4/tcp.c:1447
 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:629 [inline]
 sock_sendmsg net/socket.c:639 [inline]
 sock_write_iter+0x3bc/0x470 net/socket.c:908
 call_write_iter include/linux/fs.h:1784 [inline]
 new_sync_write fs/read_write.c:474 [inline]
 __vfs_write+0x808/0x9f0 fs/read_write.c:487
 vfs_write+0x467/0x8c0 fs/read_write.c:549
 ksys_write fs/read_write.c:598 [inline]
 __do_sys_write fs/read_write.c:610 [inline]
 __se_sys_write fs/read_write.c:607 [inline]
 __x64_sys_write+0x1bf/0x3e0 fs/read_write.c:607
 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x47fc44
RSP: 002b:000000c42ca196f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000047fc44
RDX: 0000000000000004 RSI: 000000c42012c200 RDI: 0000000000000003
RBP: 000000c42ca19740 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000c420168790
R13: 000000000000007f R14: 0000000000c13a40 R15: fffffffffffa7fff

Local variable description: ----skb.addr@__netif_receive_skb_core
Variable was created at:
 __netif_receive_skb_core+0xb7/0x4aa0 net/core/dev.c:4462
 __netif_receive_skb net/core/dev.c:4657 [inline]
 netif_receive_skb_internal+0x49d/0x630 net/core/dev.c:4731
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/03 01:29 https://github.com/google/kmsan.git master 6c3632ffef26 574780b0 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.