syzbot


KMSAN: uninit-value in __nf_ct_try_assign_helper

Status: closed as invalid on 2020/07/18 05:40
Subsystems: netfilter
[Documentation on labels]
First crash: 1377d, last: 1377d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in __nf_ct_try_assign_helper (2) netfilter C 12 1373d 1377d 0/26 closed as invalid on 2020/07/22 14:12

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in __nf_ct_helper_find net/netfilter/nf_conntrack_helper.c:65 [inline]
BUG: KMSAN: uninit-value in nf_ct_lookup_helper net/netfilter/nf_conntrack_helper.c:218 [inline]
BUG: KMSAN: uninit-value in __nf_ct_try_assign_helper+0xfbc/0xfe0 net/netfilter/nf_conntrack_helper.c:259
CPU: 0 PID: 12061 Comm: syz-executor.5 Not tainted 5.8.0-rc5-syzkaller #0
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+0x1df/0x240 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
 __nf_ct_helper_find net/netfilter/nf_conntrack_helper.c:65 [inline]
 nf_ct_lookup_helper net/netfilter/nf_conntrack_helper.c:218 [inline]
 __nf_ct_try_assign_helper+0xfbc/0xfe0 net/netfilter/nf_conntrack_helper.c:259
 init_conntrack+0x1482/0x1ff0 net/netfilter/nf_conntrack_core.c:1641
 resolve_normal_ct net/netfilter/nf_conntrack_core.c:1686 [inline]
 nf_conntrack_in+0x1341/0x26b1 net/netfilter/nf_conntrack_core.c:1846
 ipv6_conntrack_local+0x68/0x80 net/netfilter/nf_conntrack_proto.c:398
 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline]
 nf_hook_slow+0x16e/0x400 net/netfilter/core.c:512
 nf_hook include/linux/netfilter.h:262 [inline]
 __ip6_local_out+0x56d/0x750 net/ipv6/output_core.c:167
 ip6_local_out+0xa4/0x1d0 net/ipv6/output_core.c:177
 ip6_send_skb net/ipv6/ip6_output.c:1865 [inline]
 ip6_push_pending_frames+0x213/0x4f0 net/ipv6/ip6_output.c:1885
 rawv6_push_pending_frames net/ipv6/raw.c:613 [inline]
 rawv6_sendmsg+0x4233/0x5c30 net/ipv6/raw.c:956
 inet_sendmsg+0x2d8/0x2e0 net/ipv4/af_inet.c:814
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 kernel_sendmsg+0x384/0x440 net/socket.c:692
 sock_no_sendpage+0x235/0x300 net/core/sock.c:2853
 kernel_sendpage net/socket.c:3642 [inline]
 sock_sendpage+0x1e1/0x2c0 net/socket.c:945
 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:448
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x565/0xf00 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:834
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x1fd/0x580 fs/splice.c:1016
 splice_direct_to_actor+0x6b2/0xf50 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1601 [inline]
 __se_sys_sendfile64+0x2bb/0x360 fs/read_write.c:1587
 __x64_sys_sendfile64+0x56/0x70 fs/read_write.c:1587
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45c1d9
Code: Bad RIP value.
RSP: 002b:00007f58e733fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 0000000000025a00 RCX: 000000000045c1d9
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 000000000078bf48 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000a808 R11: 0000000000000246 R12: 000000000078bf0c
R13: 0000000000c9fb6f R14: 00007f58e73409c0 R15: 000000000078bf0c

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 kmsan_memcpy_memmove_metadata+0x272/0x2e0 mm/kmsan/kmsan.c:247
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:267
 __msan_memcpy+0x43/0x50 mm/kmsan/kmsan_instr.c:116
 __nf_conntrack_alloc+0x237/0x6e0 net/netfilter/nf_conntrack_core.c:1516
 init_conntrack+0x3ac/0x1ff0 net/netfilter/nf_conntrack_core.c:1588
 resolve_normal_ct net/netfilter/nf_conntrack_core.c:1686 [inline]
 nf_conntrack_in+0x1341/0x26b1 net/netfilter/nf_conntrack_core.c:1846
 ipv6_conntrack_local+0x68/0x80 net/netfilter/nf_conntrack_proto.c:398
 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline]
 nf_hook_slow+0x16e/0x400 net/netfilter/core.c:512
 nf_hook include/linux/netfilter.h:262 [inline]
 __ip6_local_out+0x56d/0x750 net/ipv6/output_core.c:167
 ip6_local_out+0xa4/0x1d0 net/ipv6/output_core.c:177
 ip6_send_skb net/ipv6/ip6_output.c:1865 [inline]
 ip6_push_pending_frames+0x213/0x4f0 net/ipv6/ip6_output.c:1885
 rawv6_push_pending_frames net/ipv6/raw.c:613 [inline]
 rawv6_sendmsg+0x4233/0x5c30 net/ipv6/raw.c:956
 inet_sendmsg+0x2d8/0x2e0 net/ipv4/af_inet.c:814
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 kernel_sendmsg+0x384/0x440 net/socket.c:692
 sock_no_sendpage+0x235/0x300 net/core/sock.c:2853
 kernel_sendpage net/socket.c:3642 [inline]
 sock_sendpage+0x1e1/0x2c0 net/socket.c:945
 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:448
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x565/0xf00 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:834
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x1fd/0x580 fs/splice.c:1016
 splice_direct_to_actor+0x6b2/0xf50 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1601 [inline]
 __se_sys_sendfile64+0x2bb/0x360 fs/read_write.c:1587
 __x64_sys_sendfile64+0x56/0x70 fs/read_write.c:1587
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 __msan_chain_origin+0x50/0x90 mm/kmsan/kmsan_instr.c:165
 nf_ct_invert_tuple+0x554/0x590 net/netfilter/nf_conntrack_core.c:445
 init_conntrack+0x116/0x1ff0 net/netfilter/nf_conntrack_core.c:1582
 resolve_normal_ct net/netfilter/nf_conntrack_core.c:1686 [inline]
 nf_conntrack_in+0x1341/0x26b1 net/netfilter/nf_conntrack_core.c:1846
 ipv6_conntrack_local+0x68/0x80 net/netfilter/nf_conntrack_proto.c:398
 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline]
 nf_hook_slow+0x16e/0x400 net/netfilter/core.c:512
 nf_hook include/linux/netfilter.h:262 [inline]
 __ip6_local_out+0x56d/0x750 net/ipv6/output_core.c:167
 ip6_local_out+0xa4/0x1d0 net/ipv6/output_core.c:177
 ip6_send_skb net/ipv6/ip6_output.c:1865 [inline]
 ip6_push_pending_frames+0x213/0x4f0 net/ipv6/ip6_output.c:1885
 rawv6_push_pending_frames net/ipv6/raw.c:613 [inline]
 rawv6_sendmsg+0x4233/0x5c30 net/ipv6/raw.c:956
 inet_sendmsg+0x2d8/0x2e0 net/ipv4/af_inet.c:814
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 kernel_sendmsg+0x384/0x440 net/socket.c:692
 sock_no_sendpage+0x235/0x300 net/core/sock.c:2853
 kernel_sendpage net/socket.c:3642 [inline]
 sock_sendpage+0x1e1/0x2c0 net/socket.c:945
 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:448
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x565/0xf00 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:834
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x1fd/0x580 fs/splice.c:1016
 splice_direct_to_actor+0x6b2/0xf50 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1601 [inline]
 __se_sys_sendfile64+0x2bb/0x360 fs/read_write.c:1587
 __x64_sys_sendfile64+0x56/0x70 fs/read_write.c:1587
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 __msan_chain_origin+0x50/0x90 mm/kmsan/kmsan_instr.c:165
 nf_ct_get_tuple+0x1280/0x1530 net/netfilter/nf_conntrack_core.c:319
 resolve_normal_ct net/netfilter/nf_conntrack_core.c:1674 [inline]
 nf_conntrack_in+0x6e0/0x26b1 net/netfilter/nf_conntrack_core.c:1846
 ipv6_conntrack_local+0x68/0x80 net/netfilter/nf_conntrack_proto.c:398
 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline]
 nf_hook_slow+0x16e/0x400 net/netfilter/core.c:512
 nf_hook include/linux/netfilter.h:262 [inline]
 __ip6_local_out+0x56d/0x750 net/ipv6/output_core.c:167
 ip6_local_out+0xa4/0x1d0 net/ipv6/output_core.c:177
 ip6_send_skb net/ipv6/ip6_output.c:1865 [inline]
 ip6_push_pending_frames+0x213/0x4f0 net/ipv6/ip6_output.c:1885
 rawv6_push_pending_frames net/ipv6/raw.c:613 [inline]
 rawv6_sendmsg+0x4233/0x5c30 net/ipv6/raw.c:956
 inet_sendmsg+0x2d8/0x2e0 net/ipv4/af_inet.c:814
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 kernel_sendmsg+0x384/0x440 net/socket.c:692
 sock_no_sendpage+0x235/0x300 net/core/sock.c:2853
 kernel_sendpage net/socket.c:3642 [inline]
 sock_sendpage+0x1e1/0x2c0 net/socket.c:945
 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:448
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x565/0xf00 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:834
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x1fd/0x580 fs/splice.c:1016
 splice_direct_to_actor+0x6b2/0xf50 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1601 [inline]
 __se_sys_sendfile64+0x2bb/0x360 fs/read_write.c:1587
 __x64_sys_sendfile64+0x56/0x70 fs/read_write.c:1587
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 kmsan_memcpy_memmove_metadata+0x272/0x2e0 mm/kmsan/kmsan.c:247
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:267
 __msan_memcpy+0x43/0x50 mm/kmsan/kmsan_instr.c:116
 csum_partial_copy+0xae/0x100 lib/checksum.c:154
 csum_and_memcpy lib/iov_iter.c:586 [inline]
 csum_and_copy_from_iter_full+0xdca/0x1800 lib/iov_iter.c:1495
 ip_generic_getfrag+0x1fb/0x3c0 net/ipv4/ip_output.c:932
 raw6_getfrag+0x552/0x600 net/ipv6/raw.c:763
 __ip6_append_data+0x507b/0x6320 net/ipv6/ip6_output.c:1623
 ip6_append_data+0x3cb/0x660 net/ipv6/ip6_output.c:1757
 rawv6_sendmsg+0x32bb/0x5c30 net/ipv6/raw.c:949
 inet_sendmsg+0x2d8/0x2e0 net/ipv4/af_inet.c:814
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 kernel_sendmsg+0x384/0x440 net/socket.c:692
 sock_no_sendpage+0x235/0x300 net/core/sock.c:2853
 kernel_sendpage net/socket.c:3642 [inline]
 sock_sendpage+0x1e1/0x2c0 net/socket.c:945
 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:448
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x565/0xf00 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:834
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x1fd/0x580 fs/splice.c:1016
 splice_direct_to_actor+0x6b2/0xf50 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1601 [inline]
 __se_sys_sendfile64+0x2bb/0x360 fs/read_write.c:1587
 __x64_sys_sendfile64+0x56/0x70 fs/read_write.c:1587
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Uninit was created at:
 kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:144
 kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:269 [inline]
 kmsan_alloc_page+0xb9/0x180 mm/kmsan/kmsan_shadow.c:293
 __alloc_pages_nodemask+0x56a2/0x5dc0 mm/page_alloc.c:4889
 alloc_pages_current+0x672/0x990 mm/mempolicy.c:2292
 alloc_pages include/linux/gfp.h:545 [inline]
 push_pipe+0x605/0xb70 lib/iov_iter.c:537
 __pipe_get_pages lib/iov_iter.c:1278 [inline]
 pipe_get_pages_alloc lib/iov_iter.c:1385 [inline]
 iov_iter_get_pages_alloc+0x18a9/0x21c0 lib/iov_iter.c:1403
 default_file_splice_read fs/splice.c:385 [inline]
 do_splice_to+0x4fc/0x14f0 fs/splice.c:871
 splice_direct_to_actor+0x45c/0xf50 fs/splice.c:950
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1601 [inline]
 __se_sys_sendfile64+0x2bb/0x360 fs/read_write.c:1587
 __x64_sys_sendfile64+0x56/0x70 fs/read_write.c:1587
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
=====================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/17 20:27 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce
2020/07/18 05:31 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/18 05:14 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/17 22:14 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/17 22:12 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/17 18:49 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/17 17:57 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.