syzbot


KMSAN: uninit-value in inet_rcv_saddr_equal

Status: auto-closed as invalid on 2019/07/28 00:27
Subsystems: net
[Documentation on labels]
First crash: 1913d, last: 1913d

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in ipv4_rcv_saddr_equal net/ipv4/inet_connection_sock.c:83 [inline]
BUG: KMSAN: uninit-value in inet_rcv_saddr_equal+0x7b6/0xac0 net/ipv4/inet_connection_sock.c:105
CPU: 0 PID: 11410 Comm: syz-executor0 Not tainted 5.0.0-rc1+ #9
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+0x173/0x1d0 lib/dump_stack.c:113
 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:600
 __msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:313
 ipv4_rcv_saddr_equal net/ipv4/inet_connection_sock.c:83 [inline]
 inet_rcv_saddr_equal+0x7b6/0xac0 net/ipv4/inet_connection_sock.c:105
 inet_csk_bind_conflict+0x57c/0x990 net/ipv4/inet_connection_sock.c:159
 inet_csk_get_port+0x219a/0x22a0 net/ipv4/inet_connection_sock.c:331
 __inet_bind+0x9e6/0xf40 net/ipv4/af_inet.c:524
 inet_bind+0x21e/0x300 net/ipv4/af_inet.c:453
 __sys_bind+0x60b/0x7c0 net/socket.c:1483
 __do_sys_bind net/socket.c:1494 [inline]
 __se_sys_bind+0x8d/0xb0 net/socket.c:1492
 __x64_sys_bind+0x4a/0x70 net/socket.c:1492
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x458089
Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f551efecc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458089
RDX: 0000000000000010 RSI: 0000000020deb000 RDI: 0000000000000004
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f551efed6d4
R13: 00000000004be11f R14: 00000000004ce4c8 R15: 00000000ffffffff

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:220 [inline]
 kmsan_internal_chain_origin+0x134/0x230 mm/kmsan/kmsan.c:426
 __msan_chain_origin+0x70/0xe0 mm/kmsan/kmsan_instr.c:200
 inet_twsk_alloc+0xa8e/0xba0 net/ipv4/inet_timewait_sock.c:183
 tcp_time_wait+0xd2/0xf00 net/ipv4/tcp_minisocks.c:259
 tcp_rcv_state_process+0xc89/0x6940 net/ipv4/tcp_input.c:6202
 tcp_v4_do_rcv+0xb11/0xd70 net/ipv4/tcp_ipv4.c:1560
 sk_backlog_rcv include/net/sock.h:936 [inline]
 __release_sock+0x281/0x5f0 net/core/sock.c:2284
 tcp_close+0x299/0x18a0 net/ipv4/tcp.c:2418
 inet_release+0x162/0x2a0 net/ipv4/af_inet.c:428
 __sock_release net/socket.c:579 [inline]
 sock_close+0x13f/0x400 net/socket.c:1141
 __fput+0x4d1/0xbb0 fs/file_table.c:278
 ____fput+0x37/0x40 fs/file_table.c:309
 task_work_run+0x22e/0x2a0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop arch/x86/entry/common.c:166 [inline]
 prepare_exit_to_usermode+0x321/0x420 arch/x86/entry/common.c:197
 syscall_return_slowpath+0xb2/0x650 arch/x86/entry/common.c:268
 do_syscall_64+0xe2/0xf0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline]
 kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:159
 kmsan_kmalloc+0xa6/0x130 mm/kmsan/kmsan_hooks.c:176
 kmem_cache_alloc+0x585/0xb60 mm/slub.c:2772
 inet_twsk_alloc+0x135/0xba0 net/ipv4/inet_timewait_sock.c:163
 tcp_time_wait+0xd2/0xf00 net/ipv4/tcp_minisocks.c:259
 tcp_rcv_state_process+0xc89/0x6940 net/ipv4/tcp_input.c:6202
 tcp_v4_do_rcv+0xb11/0xd70 net/ipv4/tcp_ipv4.c:1560
 sk_backlog_rcv include/net/sock.h:936 [inline]
 __release_sock+0x281/0x5f0 net/core/sock.c:2284
 tcp_close+0x299/0x18a0 net/ipv4/tcp.c:2418
 inet_release+0x162/0x2a0 net/ipv4/af_inet.c:428
 __sock_release net/socket.c:579 [inline]
 sock_close+0x13f/0x400 net/socket.c:1141
 __fput+0x4d1/0xbb0 fs/file_table.c:278
 ____fput+0x37/0x40 fs/file_table.c:309
 task_work_run+0x22e/0x2a0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop arch/x86/entry/common.c:166 [inline]
 prepare_exit_to_usermode+0x321/0x420 arch/x86/entry/common.c:197
 syscall_return_slowpath+0xb2/0x650 arch/x86/entry/common.c:268
 do_syscall_64+0xe2/0xf0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

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