syzbot


KMSAN: uninit-value in __nf_conntrack_find_get

Status: fixed on 2018/08/08 18:10
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+6f18401420df260e37ed@syzkaller.appspotmail.com
Fix commit: 6613b6173dee netfilter: conntrack: dccp: treat SYNC/SYNCACK as invalid if no prior state
First crash: 2281d, last: 2267d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 4.4 00/79] 4.4.152-stable review 89 (89) 2018/09/13 07:06
[PATCH 3.18 00/56] 3.18.120-stable review 58 (58) 2018/08/27 19:30
[PATCH 4.9 000/130] 4.9.124-stable review 130 (130) 2018/08/24 05:26
[PATCH 4.14 000/217] 4.14.67-stable review 213 (213) 2018/08/24 05:19
[PATCH 4.17 000/324] 4.17.19-stable review 308 (308) 2018/08/24 05:10
[PATCH 0/9] Netfilter fixes for net 11 (11) 2018/07/24 17:00
[PATCH net] netfilter: nf_conntrack: prevent uninit-value in gc_worker 8 (8) 2018/07/17 16:15
KMSAN: uninit-value in __nf_conntrack_find_get 0 (1) 2018/07/17 14:25
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in __nf_conntrack_find_get (2) netfilter 1 2110d 2110d 0/28 auto-closed as invalid on 2019/06/27 00:46

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
==================================================================
BUG: KMSAN: uninit-value in ____nf_conntrack_find net/netfilter/nf_conntrack_core.c:539 [inline]
BUG: KMSAN: uninit-value in __nf_conntrack_find_get+0xc15/0x2190 net/netfilter/nf_conntrack_core.c:573
CPU: 1 PID: 4597 Comm: syz-executor721 Not tainted 4.18.0-rc5+ #29
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+0x185/0x1e0 lib/dump_stack.c:113
 kmsan_report+0x195/0x2c0 mm/kmsan/kmsan.c:982
 __msan_warning+0x7d/0xe0 mm/kmsan/kmsan_instr.c:645
 ____nf_conntrack_find net/netfilter/nf_conntrack_core.c:539 [inline]
 __nf_conntrack_find_get+0xc15/0x2190 net/netfilter/nf_conntrack_core.c:573
 resolve_normal_ct net/netfilter/nf_conntrack_core.c:1331 [inline]
 nf_conntrack_in+0x1674/0x2070 net/netfilter/nf_conntrack_core.c:1416
 ipv6_conntrack_local+0xc3/0xf0 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c:179
 nf_hook_entry_hookfn include/linux/netfilter.h:119 [inline]
 nf_hook_slow+0x15d/0x3e0 net/netfilter/core.c:511
 nf_hook include/linux/netfilter.h:242 [inline]
 __ip6_local_out+0x64c/0x770 net/ipv6/output_core.c:164
 ip6_local_out+0xa4/0x1d0 net/ipv6/output_core.c:174
 ip6_send_skb net/ipv6/ip6_output.c:1696 [inline]
 ip6_push_pending_frames+0x218/0x4d0 net/ipv6/ip6_output.c:1716
 rawv6_push_pending_frames net/ipv6/raw.c:616 [inline]
 rawv6_sendmsg+0x45f0/0x5410 net/ipv6/raw.c:935
 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:641 [inline]
 sock_sendmsg net/socket.c:651 [inline]
 __sys_sendto+0x798/0x8e0 net/socket.c:1797
 __do_sys_sendto net/socket.c:1809 [inline]
 __se_sys_sendto net/socket.c:1805 [inline]
 __x64_sys_sendto+0x1a1/0x210 net/socket.c:1805
 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x4492d9
Code: e8 7c b7 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 ab d6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 
RSP: 002b:00007f47eee70d98 EFLAGS: 00000212 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 00000000004492d9
RDX: 000000000000fedf RSI: 0000000020000000 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000020000180 R09: 000000000000001a
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006dac20
R13: 7364612f7665642f R14: 00007f47eee719c0 R15: 0000000000000003

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:256 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:271 [inline]
 kmsan_internal_chain_origin+0x13c/0x240 mm/kmsan/kmsan.c:573
 __msan_chain_origin+0x76/0xd0 mm/kmsan/kmsan_instr.c:483
 __nf_conntrack_confirm+0x2700/0x3f70 net/netfilter/nf_conntrack_core.c:793
 nf_conntrack_confirm include/net/netfilter/nf_conntrack_core.h:71 [inline]
 ipv6_confirm+0x573/0x740 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c:165
 nf_hook_entry_hookfn include/linux/netfilter.h:119 [inline]
 nf_hook_slow+0x15d/0x3e0 net/netfilter/core.c:511
 nf_hook include/linux/netfilter.h:242 [inline]
 NF_HOOK_COND include/linux/netfilter.h:275 [inline]
 ip6_output+0x37d/0x710 net/ipv6/ip6_output.c:171
 dst_output include/net/dst.h:444 [inline]
 ip6_local_out+0x164/0x1d0 net/ipv6/output_core.c:176
 ip6_send_skb net/ipv6/ip6_output.c:1696 [inline]
 ip6_push_pending_frames+0x218/0x4d0 net/ipv6/ip6_output.c:1716
 rawv6_push_pending_frames net/ipv6/raw.c:616 [inline]
 rawv6_sendmsg+0x45f0/0x5410 net/ipv6/raw.c:935
 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:641 [inline]
 sock_sendmsg net/socket.c:651 [inline]
 __sys_sendto+0x798/0x8e0 net/socket.c:1797
 __do_sys_sendto net/socket.c:1809 [inline]
 __se_sys_sendto net/socket.c:1805 [inline]
 __x64_sys_sendto+0x1a1/0x210 net/socket.c:1805
 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:256 [inline]
 kmsan_internal_poison_shadow+0xc8/0x1d0 mm/kmsan/kmsan.c:181
 kmsan_kmalloc+0xa1/0x120 mm/kmsan/kmsan_hooks.c:91
 kmem_cache_alloc+0xad2/0xbb0 mm/slub.c:2739
 __nf_conntrack_alloc+0x166/0x670 net/netfilter/nf_conntrack_core.c:1137
 init_conntrack+0x635/0x2840 net/netfilter/nf_conntrack_core.c:1219
 resolve_normal_ct net/netfilter/nf_conntrack_core.c:1333 [inline]
 nf_conntrack_in+0x1812/0x2070 net/netfilter/nf_conntrack_core.c:1416
 ipv6_conntrack_local+0xc3/0xf0 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c:179
 nf_hook_entry_hookfn include/linux/netfilter.h:119 [inline]
 nf_hook_slow+0x15d/0x3e0 net/netfilter/core.c:511
 nf_hook include/linux/netfilter.h:242 [inline]
 __ip6_local_out+0x64c/0x770 net/ipv6/output_core.c:164
 ip6_local_out+0xa4/0x1d0 net/ipv6/output_core.c:174
 ip6_send_skb net/ipv6/ip6_output.c:1696 [inline]
 ip6_push_pending_frames+0x218/0x4d0 net/ipv6/ip6_output.c:1716
 rawv6_push_pending_frames net/ipv6/raw.c:616 [inline]
 rawv6_sendmsg+0x45f0/0x5410 net/ipv6/raw.c:935
 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:641 [inline]
 sock_sendmsg net/socket.c:651 [inline]
 __sys_sendto+0x798/0x8e0 net/socket.c:1797
 __do_sys_sendto net/socket.c:1809 [inline]
 __se_sys_sendto net/socket.c:1805 [inline]
 __x64_sys_sendto+0x1a1/0x210 net/socket.c:1805
 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

Crashes (67):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/22 09:00 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report syz C ci-upstream-kmsan-gce
2018/07/19 08:30 https://github.com/google/kmsan.git master 80ecacc456c1 49f35839 .config console log report syz C ci-upstream-kmsan-gce
2018/07/12 02:16 https://github.com/google/kmsan.git master b64f7ec04e12 2e0e3130 .config console log report syz C ci-upstream-kmsan-gce
2018/07/10 06:35 https://github.com/google/kmsan.git master 85c225c088f5 f25e5770 .config console log report syz C ci-upstream-kmsan-gce
2018/07/24 05:54 https://github.com/google/kmsan.git master d1c2a46a46f6 912c93d7 .config console log report ci-upstream-kmsan-gce
2018/07/24 04:26 https://github.com/google/kmsan.git master d1c2a46a46f6 912c93d7 .config console log report ci-upstream-kmsan-gce
2018/07/23 23:15 https://github.com/google/kmsan.git master d1c2a46a46f6 912c93d7 .config console log report ci-upstream-kmsan-gce
2018/07/23 21:52 https://github.com/google/kmsan.git master d1c2a46a46f6 912c93d7 .config console log report ci-upstream-kmsan-gce
2018/07/23 20:56 https://github.com/google/kmsan.git master d1c2a46a46f6 912c93d7 .config console log report ci-upstream-kmsan-gce
2018/07/23 11:33 https://github.com/google/kmsan.git master d1c2a46a46f6 f69c5fcd .config console log report ci-upstream-kmsan-gce
2018/07/22 15:11 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/22 13:09 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/22 08:23 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/22 05:55 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/21 16:20 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/21 09:28 https://github.com/google/kmsan.git master d1c2a46a46f6 8cc079c3 .config console log report ci-upstream-kmsan-gce
2018/07/20 22:20 https://github.com/google/kmsan.git master d1c2a46a46f6 af255b09 .config console log report ci-upstream-kmsan-gce
2018/07/20 20:21 https://github.com/google/kmsan.git master d1c2a46a46f6 af255b09 .config console log report ci-upstream-kmsan-gce
2018/07/20 15:48 https://github.com/google/kmsan.git master cf8cd3cd03e2 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/20 01:18 https://github.com/google/kmsan.git master cf8cd3cd03e2 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/19 23:37 https://github.com/google/kmsan.git master cf8cd3cd03e2 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/19 18:12 https://github.com/google/kmsan.git master cf8cd3cd03e2 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/19 14:53 https://github.com/google/kmsan.git master cf8cd3cd03e2 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/19 07:04 https://github.com/google/kmsan.git master 80ecacc456c1 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/19 05:53 https://github.com/google/kmsan.git master 80ecacc456c1 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/19 01:11 https://github.com/google/kmsan.git master 80ecacc456c1 49f35839 .config console log report ci-upstream-kmsan-gce
2018/07/18 16:30 https://github.com/google/kmsan.git master 80ecacc456c1 809256c3 .config console log report ci-upstream-kmsan-gce
2018/07/18 12:05 https://github.com/google/kmsan.git master 80ecacc456c1 809256c3 .config console log report ci-upstream-kmsan-gce
2018/07/17 17:52 https://github.com/google/kmsan.git master 80ecacc456c1 6d5bd5b5 .config console log report ci-upstream-kmsan-gce
2018/07/17 09:17 https://github.com/google/kmsan.git master 80ecacc456c1 13761366 .config console log report ci-upstream-kmsan-gce
2018/07/17 04:42 https://github.com/google/kmsan.git master 80ecacc456c1 13761366 .config console log report ci-upstream-kmsan-gce
2018/07/17 03:35 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 21:53 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 19:29 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 18:58 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 18:56 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 18:49 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 18:22 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 17:25 https://github.com/google/kmsan.git master 80ecacc456c1 40cb0c9a .config console log report ci-upstream-kmsan-gce
2018/07/16 15:02 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
2018/07/16 10:24 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
2018/07/16 00:56 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
2018/07/15 21:44 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
2018/07/15 20:11 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
2018/07/15 20:08 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
2018/07/15 09:54 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
2018/07/14 16:29 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.