syzbot


KMSAN: uninit-value in ip6table_mangle_hook

Status: fixed on 2018/05/08 18:30
Subsystems: netfilter
[Documentation on labels]
Fix commit: b855ff827476 dccp: initialize ireq->ir_mark
First crash: 2208d, last: 2176d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in ip6table_mangle_hook (2) netfilter 10 1022d 1100d 0/26 auto-closed as invalid on 2021/10/03 15:10

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in ip6t_mangle_out net/ipv6/netfilter/ip6table_mangle.c:60 [inline]
BUG: KMSAN: uninit-value in ip6table_mangle_hook+0x97e/0xb00 net/ipv6/netfilter/ip6table_mangle.c:77
CPU: 1 PID: 3565 Comm: syzkaller679571 Not tainted 4.16.0+ #82
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:676
 ip6t_mangle_out net/ipv6/netfilter/ip6table_mangle.c:60 [inline]
 ip6table_mangle_hook+0x97e/0xb00 net/ipv6/netfilter/ip6table_mangle.c:77
 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline]
 nf_hook_slow+0x158/0x3d0 net/netfilter/core.c:483
 nf_hook include/linux/netfilter.h:243 [inline]
 NF_HOOK include/linux/netfilter.h:286 [inline]
 ip6_xmit+0x1c3b/0x2120 net/ipv6/ip6_output.c:277
 inet6_csk_xmit+0x35b/0x440 net/ipv6/inet6_connection_sock.c:139
 dccp_transmit_skb+0x15eb/0x1900 net/dccp/output.c:142
 dccp_xmit_packet+0x814/0x9e0 net/dccp/output.c:281
 dccp_write_xmit+0x20f/0x480 net/dccp/output.c:363
 dccp_sendmsg+0x12ca/0x12d0 net/dccp/proto.c:818
 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
 __sys_sendmsg net/socket.c:2080 [inline]
 SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091
 SyS_sendmsg+0x54/0x80 net/socket.c:2087
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x440519
RSP: 002b:00007ffe9ced82c8 EFLAGS: 00000217 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0100000000000000 RCX: 0000000000440519
RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000005
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000217 R12: 0000000000401e40
R13: 0000000000401ed0 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:293 [inline]
 kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684
 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521
 ip6_xmit+0x1899/0x2120 net/ipv6/ip6_output.c:260
 inet6_csk_xmit+0x35b/0x440 net/ipv6/inet6_connection_sock.c:139
 dccp_transmit_skb+0x15eb/0x1900 net/dccp/output.c:142
 dccp_xmit_packet+0x814/0x9e0 net/dccp/output.c:281
 dccp_write_xmit+0x20f/0x480 net/dccp/output.c:363
 dccp_sendmsg+0x12ca/0x12d0 net/dccp/proto.c:818
 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
 __sys_sendmsg net/socket.c:2080 [inline]
 SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091
 SyS_sendmsg+0x54/0x80 net/socket.c:2087
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:293 [inline]
 kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684
 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521
 inet_csk_clone_lock+0x503/0x580 net/ipv4/inet_connection_sock.c:797
 dccp_create_openreq_child+0x7f/0x890 net/dccp/minisocks.c:92
 dccp_v6_request_recv_sock+0x88a/0x2000 net/dccp/ipv6.c:465
 dccp_check_req+0x7b9/0x8f0 net/dccp/minisocks.c:197
 dccp_v6_rcv+0x1109/0x2340 net/dccp/ipv6.c:743
 ip6_input_finish+0xa62/0x2110 net/ipv6/ip6_input.c:284
 NF_HOOK include/linux/netfilter.h:288 [inline]
 ip6_input+0x294/0x320 net/ipv6/ip6_input.c:327
 dst_input include/net/dst.h:449 [inline]
 ip6_rcv_finish net/ipv6/ip6_input.c:71 [inline]
 NF_HOOK include/linux/netfilter.h:288 [inline]
 ipv6_rcv+0x20ec/0x26d0 net/ipv6/ip6_input.c:208
 __netif_receive_skb_core+0x47cf/0x4a80 net/core/dev.c:4562
 __netif_receive_skb net/core/dev.c:4627 [inline]
 process_backlog+0x62d/0xe20 net/core/dev.c:5307
 napi_poll net/core/dev.c:5705 [inline]
 net_rx_action+0x7c1/0x1a70 net/core/dev.c:5771
 __do_softirq+0x56d/0x93d kernel/softirq.c:285
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
 kmem_cache_alloc+0xaab/0xb90 mm/slub.c:2756
 reqsk_alloc include/net/request_sock.h:88 [inline]
 inet_reqsk_alloc+0xc4/0x7f0 net/ipv4/tcp_input.c:6145
 dccp_v6_conn_request+0x708/0x1880 net/dccp/ipv6.c:336
 dccp_rcv_state_process+0x2ea/0x2410 net/dccp/input.c:612
 dccp_v6_do_rcv+0x55b/0x1220 net/dccp/ipv6.c:637
 sk_backlog_rcv include/net/sock.h:908 [inline]
 __sk_receive_skb+0x60e/0xf20 net/core/sock.c:513
 dccp_v6_rcv+0x21d6/0x2340 net/dccp/ipv6.c:774
 ip6_input_finish+0xa62/0x2110 net/ipv6/ip6_input.c:284
 NF_HOOK include/linux/netfilter.h:288 [inline]
 ip6_input+0x294/0x320 net/ipv6/ip6_input.c:327
 dst_input include/net/dst.h:449 [inline]
 ip6_rcv_finish net/ipv6/ip6_input.c:71 [inline]
 NF_HOOK include/linux/netfilter.h:288 [inline]
 ipv6_rcv+0x20ec/0x26d0 net/ipv6/ip6_input.c:208
 __netif_receive_skb_core+0x47cf/0x4a80 net/core/dev.c:4562
 __netif_receive_skb net/core/dev.c:4627 [inline]
 process_backlog+0x62d/0xe20 net/core/dev.c:5307
 napi_poll net/core/dev.c:5705 [inline]
 net_rx_action+0x7c1/0x1a70 net/core/dev.c:5771
 __do_softirq+0x56d/0x93d kernel/softirq.c:285
==================================================================

Crashes (601):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/04/07 16:03 https://github.com/google/kmsan.git master e2ab7e8abba4 66f22a7f .config console log report syz C ci-upstream-kmsan-gce
2018/05/08 14:07 https://github.com/google/kmsan.git master d2d741e5d189 045bbd4a .config console log report ci-upstream-kmsan-gce
2018/05/08 12:33 https://github.com/google/kmsan.git master d2d741e5d189 045bbd4a .config console log report ci-upstream-kmsan-gce
2018/05/08 08:13 https://github.com/google/kmsan.git master d2d741e5d189 045bbd4a .config console log report ci-upstream-kmsan-gce
2018/05/08 05:26 https://github.com/google/kmsan.git master d2d741e5d189 045bbd4a .config console log report ci-upstream-kmsan-gce
2018/05/07 21:22 https://github.com/google/kmsan.git master d2d741e5d189 9e0846e8 .config console log report ci-upstream-kmsan-gce
2018/05/07 17:26 https://github.com/google/kmsan.git master d2d741e5d189 9e0846e8 .config console log report ci-upstream-kmsan-gce
2018/05/07 12:24 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report ci-upstream-kmsan-gce
2018/05/07 07:50 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report ci-upstream-kmsan-gce
2018/05/07 02:59 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report ci-upstream-kmsan-gce
2018/05/06 23:25 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report ci-upstream-kmsan-gce
2018/05/06 20:40 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report ci-upstream-kmsan-gce
2018/05/06 19:11 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report ci-upstream-kmsan-gce
2018/05/06 15:17 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report ci-upstream-kmsan-gce
2018/05/06 12:19 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report ci-upstream-kmsan-gce
2018/05/06 11:11 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report ci-upstream-kmsan-gce
2018/05/06 08:06 https://github.com/google/kmsan.git master d2d741e5d189 78b251cb .config console log report ci-upstream-kmsan-gce
2018/05/06 06:23 https://github.com/google/kmsan.git master d2d741e5d189 78b251cb .config console log report ci-upstream-kmsan-gce
2018/05/06 01:48 https://github.com/google/kmsan.git master d2d741e5d189 78b251cb .config console log report ci-upstream-kmsan-gce
2018/05/05 23:33 https://github.com/google/kmsan.git master d2d741e5d189 78b251cb .config console log report ci-upstream-kmsan-gce
2018/05/05 20:03 https://github.com/google/kmsan.git master d2d741e5d189 6a0382b5 .config console log report ci-upstream-kmsan-gce
2018/05/05 17:01 https://github.com/google/kmsan.git master d2d741e5d189 6a0382b5 .config console log report ci-upstream-kmsan-gce
2018/05/05 15:12 https://github.com/google/kmsan.git master d2d741e5d189 6a0382b5 .config console log report ci-upstream-kmsan-gce
2018/05/05 11:17 https://github.com/google/kmsan.git master d2d741e5d189 6a0382b5 .config console log report ci-upstream-kmsan-gce
2018/05/05 09:27 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/05 07:02 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/05 03:33 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/04 22:29 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/04 16:47 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/04 14:17 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/04 10:20 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/04 04:06 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/04 01:40 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/03 20:38 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/03 17:37 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report ci-upstream-kmsan-gce
2018/05/03 05:20 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/03 02:44 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 21:46 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 20:20 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 18:49 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 17:37 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 16:29 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 13:44 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 07:44 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/02 00:57 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/01 22:34 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/05/01 21:08 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report ci-upstream-kmsan-gce
2018/04/06 22:42 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.