syzbot


KCSAN: data-race in dccp_rcv_reset / sock_alloc_send_pskb (2)

Status: closed as invalid on 2020/06/18 14:13
Subsystems: dccp
[Documentation on labels]
First crash: 1442d, last: 1442d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in dccp_rcv_reset / sock_alloc_send_pskb dccp 5 1526d 1640d 0/26 auto-closed as invalid on 2020/04/30 04:18
upstream KCSAN: data-race in dccp_rcv_reset / sock_alloc_send_pskb (4) dccp 1 1194d 1194d 0/26 auto-closed as invalid on 2021/02/21 07:14
upstream KCSAN: data-race in dccp_rcv_reset / sock_alloc_send_pskb (3) dccp 1 1231d 1231d 0/26 auto-closed as invalid on 2021/01/14 23:06

Sample crash report:
==================================================================
BUG: KCSAN: data-race in dccp_rcv_reset / sock_alloc_send_pskb

write to 0xffff8880abbdecb0 of 4 bytes by interrupt on cpu 0:
 dccp_rcv_reset+0x114/0x1d0 net/dccp/input.c:149
 __dccp_rcv_established.isra.0+0x15a/0x210 net/dccp/input.c:309
 dccp_rcv_established net/dccp/input.c:376 [inline]
 dccp_rcv_established+0x96/0xb0 net/dccp/input.c:364
 dccp_v4_do_rcv+0xc4/0xf0 net/dccp/ipv4.c:655
 sk_backlog_rcv include/net/sock.h:996 [inline]
 __sk_receive_skb+0x1a8/0x590 net/core/sock.c:519
 dccp_v4_rcv+0x985/0xf92 net/dccp/ipv4.c:876
 ip_protocol_deliver_rcu+0x4b/0x410 net/ipv4/ip_input.c:204
 ip_local_deliver_finish+0xf3/0x120 net/ipv4/ip_input.c:231
 NF_HOOK include/linux/netfilter.h:307 [inline]
 NF_HOOK include/linux/netfilter.h:301 [inline]
 ip_local_deliver+0x135/0x220 net/ipv4/ip_input.c:252
 dst_input include/net/dst.h:441 [inline]
 ip_rcv_finish+0x124/0x160 net/ipv4/ip_input.c:428
 NF_HOOK include/linux/netfilter.h:307 [inline]
 NF_HOOK include/linux/netfilter.h:301 [inline]
 ip_rcv+0x198/0x1b0 net/ipv4/ip_input.c:539
 __netif_receive_skb_one_core+0x9f/0xe0 net/core/dev.c:5187
 __netif_receive_skb+0x33/0xf0 net/core/dev.c:5301
 process_backlog+0x213/0x4c0 net/core/dev.c:6133
 napi_poll net/core/dev.c:6571 [inline]
 net_rx_action+0x3ad/0xac0 net/core/dev.c:6639
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082
 do_softirq.part.0+0x66/0x70 kernel/softirq.c:337
 do_softirq kernel/softirq.c:329 [inline]
 __local_bh_enable_ip+0x70/0x80 kernel/softirq.c:189
 local_bh_enable include/linux/bottom_half.h:32 [inline]
 rcu_read_unlock_bh include/linux/rcupdate.h:690 [inline]
 ip_finish_output2+0x40b/0xed0 net/ipv4/ip_output.c:229
 __ip_finish_output net/ipv4/ip_output.c:306 [inline]
 __ip_finish_output+0x22f/0x460 net/ipv4/ip_output.c:288
 ip_finish_output+0x3e/0x160 net/ipv4/ip_output.c:316
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0xf2/0x240 net/ipv4/ip_output.c:430
 dst_output include/net/dst.h:435 [inline]
 ip_local_out+0x70/0x90 net/ipv4/ip_output.c:125
 __ip_queue_xmit+0x3a6/0xa40 net/ipv4/ip_output.c:530
 ip_queue_xmit+0x3e/0x50 include/net/ip.h:237
 dccp_transmit_skb+0x5dc/0x970 net/dccp/output.c:138
 dccp_send_reset+0x160/0x180 net/dccp/output.c:526
 dccp_close+0x23f/0x8d0 net/dccp/proto.c:1035
 inet_release+0x83/0x100 net/ipv4/af_inet.c:427
 inet6_release+0x44/0x60 net/ipv6/af_inet6.c:471
 __sock_release+0x85/0x160 net/socket.c:605
 sock_close+0x1f/0x30 net/socket.c:1283
 __fput+0x1e9/0x500 fs/file_table.c:280
 ____fput+0x1b/0x30 fs/file_table.c:313
 task_work_run+0xba/0x120 kernel/task_work.c:123
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x2ae/0x2c0 arch/x86/entry/common.c:165
 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
 do_syscall_64+0x38b/0x3b0 arch/x86/entry/common.c:305
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880abbdecb0 of 4 bytes by task 15886 on cpu 1:
 sock_error include/net/sock.h:2215 [inline]
 sock_alloc_send_pskb+0xb5/0x510 net/core/sock.c:2245
 sock_alloc_send_skb+0x37/0x50 net/core/sock.c:2282
 dccp_sendmsg+0x160/0x7f0 net/dccp/proto.c:786
 inet_sendmsg+0x69/0x90 net/ipv4/af_inet.c:807
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0x98/0xc0 net/socket.c:672
 ____sys_sendmsg+0x207/0x4c0 net/socket.c:2362
 ___sys_sendmsg+0xb5/0x100 net/socket.c:2416
 __sys_sendmmsg+0x10e/0x310 net/socket.c:2506
 __do_sys_sendmmsg net/socket.c:2535 [inline]
 __se_sys_sendmmsg net/socket.c:2532 [inline]
 __x64_sys_sendmmsg+0x60/0x80 net/socket.c:2532
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 15886 Comm: syz-executor.1 Not tainted 5.7.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/14 12:01 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2d572622 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.