syzbot


KCSAN: data-race in inet_dgram_connect / udp_lib_get_port (5)

Status: fixed on 2021/11/10 00:50
Subsystems: net
[Documentation on labels]
Fix commit: dcd01eeac144 inet: annotate data race in inet_send_prepare() and inet_dgram_connect()
First crash: 1157d, last: 1088d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in inet_dgram_connect / udp_lib_get_port net 1 1668d 1668d 0/26 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in inet_dgram_connect / udp_lib_get_port (2) net 3 1636d 1642d 0/26 auto-closed as invalid on 2020/02/05 16:37
upstream KCSAN: data-race in inet_dgram_connect / udp_lib_get_port (3) net 1 1292d 1256d 0/26 auto-closed as invalid on 2020/12/25 11:24
upstream KCSAN: data-race in inet_dgram_connect / udp_lib_get_port (4) net 1 1205d 1205d 0/26 auto-closed as invalid on 2021/03/07 18:58

Sample crash report:
==================================================================
BUG: KCSAN: data-race in inet_dgram_connect / udp_lib_get_port

write to 0xffff888135c095ce of 2 bytes by task 31802 on cpu 1:
 udp_lib_get_port+0x4b2/0xe20 net/ipv4/udp.c:308
 udp_v6_get_port+0x5e/0x70 net/ipv6/udp.c:89
 inet_autobind net/ipv4/af_inet.c:183 [inline]
 inet_send_prepare+0xd0/0x210 net/ipv4/af_inet.c:807
 inet6_sendmsg+0x29/0x80 net/ipv6/af_inet6.c:639
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg net/socket.c:674 [inline]
 ____sys_sendmsg+0x360/0x4d0 net/socket.c:2350
 ___sys_sendmsg net/socket.c:2404 [inline]
 __sys_sendmmsg+0x315/0x4b0 net/socket.c:2490
 __do_sys_sendmmsg net/socket.c:2519 [inline]
 __se_sys_sendmmsg net/socket.c:2516 [inline]
 __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2516
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888135c095ce of 2 bytes by task 31800 on cpu 0:
 inet_dgram_connect+0x6d/0x180 net/ipv4/af_inet.c:578
 __sys_connect_file net/socket.c:1837 [inline]
 __sys_connect+0x245/0x280 net/socket.c:1854
 __do_sys_connect net/socket.c:1864 [inline]
 __se_sys_connect net/socket.c:1861 [inline]
 __x64_sys_connect+0x3d/0x50 net/socket.c:1861
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 31800 Comm: syz-executor.3 Tainted: G        W         5.13.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/28 14:16 upstream 97e5bf604b7a 858ea628 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in inet_dgram_connect / udp_lib_get_port
2021/05/24 23:28 upstream c4681547bcce 3c7fef33 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in inet_dgram_connect / udp_lib_get_port
2021/04/28 03:12 upstream e359bce39d90 805b5003 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in inet_dgram_connect / udp_lib_get_port
2021/04/26 16:13 upstream 9f4ad9e425a1 805b5003 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in inet_dgram_connect / udp_lib_get_port
2021/04/24 07:08 upstream 8db5efb83fa9 17f0b706 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in inet_dgram_connect / udp_lib_get_port
2021/03/21 02:38 upstream 812da4d39463 17810eae .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in inet_dgram_connect / udp_lib_get_port
* Struck through repros no longer work on HEAD.