syzbot


KCSAN: data-race in __release_sock / __sk_receive_skb

Status: closed as invalid on 2020/01/09 14:13
Subsystems: dccp
[Documentation on labels]
First crash: 1585d, last: 1545d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __release_sock / __sk_receive_skb (2) dccp 1 1527d 1527d 0/26 auto-closed as invalid on 2020/04/01 17:40

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __release_sock / __sk_receive_skb

read to 0xffff88812277d56c of 4 bytes by interrupt on cpu 0:
 sk_rcvqueues_full include/net/sock.h:917 [inline]
 __sk_receive_skb+0xf3/0x580 net/core/sock.c:505
 dccp_v4_rcv+0x99f/0xf9b net/dccp/ipv4.c:876
 ip_protocol_deliver_rcu+0x4d/0x420 net/ipv4/ip_input.c:204
 ip_local_deliver_finish+0x110/0x140 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+0x133/0x210 net/ipv4/ip_input.c:252
 dst_input include/net/dst.h:442 [inline]
 ip_rcv_finish+0x123/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+0x18f/0x1a0 net/ipv4/ip_input.c:538
 __netif_receive_skb_one_core+0xa7/0xe0 net/core/dev.c:5150
 __netif_receive_skb+0x37/0xf0 net/core/dev.c:5264
 process_backlog+0x207/0x4b0 net/core/dev.c:6095
 napi_poll net/core/dev.c:6532 [inline]
 net_rx_action+0x3ae/0xa90 net/core/dev.c:6600
 __do_softirq+0x115/0x33f kernel/softirq.c:292
 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082
 do_softirq.part.0+0x6b/0x80 kernel/softirq.c:337
 do_softirq kernel/softirq.c:329 [inline]
 __local_bh_enable_ip+0x76/0x80 kernel/softirq.c:189
 local_bh_enable include/linux/bottom_half.h:32 [inline]
 rcu_read_unlock_bh include/linux/rcupdate.h:706 [inline]
 ip_finish_output2+0x421/0xea0 net/ipv4/ip_output.c:229
 __ip_finish_output net/ipv4/ip_output.c:308 [inline]
 __ip_finish_output+0x23a/0x490 net/ipv4/ip_output.c:290
 ip_finish_output+0x41/0x160 net/ipv4/ip_output.c:318
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0xfe/0x230 net/ipv4/ip_output.c:432
 dst_output include/net/dst.h:436 [inline]
 ip_local_out+0x74/0x90 net/ipv4/ip_output.c:125
 __ip_queue_xmit+0x3a8/0xa40 net/ipv4/ip_output.c:532
 ip_queue_xmit+0x45/0x60 include/net/ip.h:237
 dccp_transmit_skb+0x5a2/0x940 net/dccp/output.c:138
 dccp_xmit_packet+0xfc/0x3b0 net/dccp/output.c:277
 dccp_write_xmit+0x14b/0x170 net/dccp/output.c:359
 dccp_sendmsg+0x70b/0x7b0 net/dccp/proto.c:812
 inet_sendmsg+0x6d/0x90 net/ipv4/af_inet.c:807
 sock_sendmsg_nosec net/socket.c:639 [inline]
 sock_sendmsg+0x9f/0xc0 net/socket.c:659
 ____sys_sendmsg+0x212/0x4d0 net/socket.c:2330
 ___sys_sendmsg+0xb5/0x100 net/socket.c:2384
 __sys_sendmmsg+0x123/0x350 net/socket.c:2474
 __do_sys_sendmmsg net/socket.c:2503 [inline]
 __se_sys_sendmmsg net/socket.c:2500 [inline]
 __x64_sys_sendmmsg+0x64/0x80 net/socket.c:2500
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88812277d56c of 4 bytes by task 18476 on cpu 1:
 __release_sock+0x17b/0x1e0 net/core/sock.c:2451
 release_sock+0x61/0x160 net/core/sock.c:2953
 dccp_recvmsg+0x398/0x7d0 net/dccp/proto.c:925
 sock_common_recvmsg+0x91/0x100 net/core/sock.c:3133
 sock_recvmsg_nosec net/socket.c:873 [inline]
 ____sys_recvmsg+0x387/0x3a0 net/socket.c:2551
 ___sys_recvmsg+0xb2/0x100 net/socket.c:2595
 do_recvmmsg+0x19a/0x5c0 net/socket.c:2693
 __sys_recvmmsg+0x1ef/0x200 net/socket.c:2772
 __do_sys_recvmmsg net/socket.c:2795 [inline]
 __se_sys_recvmmsg net/socket.c:2788 [inline]
 __x64_sys_recvmmsg+0x89/0xb0 net/socket.c:2788
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/04 08:21 https://github.com/google/ktsan.git kcsan 245a43005292 68256974 .config console log report ci2-upstream-kcsan-gce
2019/11/26 01:20 https://github.com/google/ktsan.git kcsan 5863cc791e4c 598ca6c8 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.