syzbot


KMSAN: uninit-value in do_tcp_getsockopt

Status: fixed on 2020/07/17 17:58
Subsystems: net
[Documentation on labels]
Fix commit: e776af608f69 net-backports: tcp: fix error recovery in tcp_zerocopy_receive()
First crash: 1502d, last: 1450d

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in tcp_zerocopy_receive net/ipv4/tcp.c:1833 [inline]
BUG: KMSAN: uninit-value in do_tcp_getsockopt+0x4494/0x6320 net/ipv4/tcp.c:3685
CPU: 1 PID: 10040 Comm: syz-executor.1 Not tainted 5.7.0-rc4-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+0x1c9/0x220 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
 tcp_zerocopy_receive net/ipv4/tcp.c:1833 [inline]
 do_tcp_getsockopt+0x4494/0x6320 net/ipv4/tcp.c:3685
 tcp_getsockopt+0xf8/0x1f0 net/ipv4/tcp.c:3728
 sock_common_getsockopt+0x13f/0x180 net/core/sock.c:3131
 __sys_getsockopt+0x533/0x7b0 net/socket.c:2177
 __do_sys_getsockopt net/socket.c:2192 [inline]
 __se_sys_getsockopt+0xe1/0x100 net/socket.c:2189
 __x64_sys_getsockopt+0x62/0x80 net/socket.c:2189
 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45cb29
Code: 0d 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 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fa4229d7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00000000004df4a0 RCX: 000000000045cb29
RDX: 0000000000000023 RSI: 0000000000000006 RDI: 0000000000000008
RBP: 000000000078bf00 R08: 0000000020000080 R09: 0000000000000000
R10: 0000000020000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000178 R14: 00000000004d2748 R15: 00007fa4229d86d4

Local variable ----zc@do_tcp_getsockopt created at:
 do_tcp_getsockopt+0x1a74/0x6320 net/ipv4/tcp.c:3670
 do_tcp_getsockopt+0x1a74/0x6320 net/ipv4/tcp.c:3670
=====================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/04 23:38 https://github.com/google/kmsan.git master f0d5ec902b23 51095195 .config console log report ci-upstream-kmsan-gce
2020/06/06 16:51 https://github.com/google/kmsan.git master f0d5ec902b23 e6b89e4e .config console log report ci-upstream-kmsan-gce
2020/05/14 02:14 https://github.com/google/kmsan.git master 8b97c6271626 a885920d .config console log report ci-upstream-kmsan-gce
2020/06/08 21:51 https://github.com/google/kmsan.git master f0d5ec902b23 7604bb03 .config console log report ci-upstream-kmsan-gce-386
2020/06/01 03:06 https://github.com/google/kmsan.git master f0d5ec902b23 a0331e89 .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.