syzbot


KCSAN: data-race in __nf_ct_refresh_acct / __nf_ct_refresh_acct

Status: fixed on 2019/11/04 14:50
Subsystems: netfilter
[Documentation on labels]
Fix commit: e37542ba111f net-backports: netfilter: conntrack: avoid possible false sharing
First crash: 1886d, last: 1855d

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

read to 0xffff888123f78b08 of 4 bytes by interrupt on cpu 1:
 __nf_ct_refresh_acct+0xd4/0x1b0 net/netfilter/nf_conntrack_core.c:1795
 nf_ct_refresh_acct include/net/netfilter/nf_conntrack.h:196 [inline]
 nf_conntrack_tcp_packet+0xd40/0x3390 net/netfilter/nf_conntrack_proto_tcp.c:1161
 nf_conntrack_handle_packet net/netfilter/nf_conntrack_core.c:1632 [inline]
 nf_conntrack_in+0x410/0xa80 net/netfilter/nf_conntrack_core.c:1726
 ipv4_conntrack_in+0x27/0x40 net/netfilter/nf_conntrack_proto.c:178
 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline]
 nf_hook_slow+0x83/0x160 net/netfilter/core.c:512
 nf_hook include/linux/netfilter.h:260 [inline]
 NF_HOOK include/linux/netfilter.h:303 [inline]
 ip_rcv+0x12f/0x1a0 net/ipv4/ip_input.c:523
 __netif_receive_skb_one_core+0xa7/0xe0 net/core/dev.c:5010
 __netif_receive_skb+0x37/0xf0 net/core/dev.c:5124
 netif_receive_skb_internal+0x59/0x190 net/core/dev.c:5214
 napi_skb_finish net/core/dev.c:5677 [inline]
 napi_gro_receive+0x28f/0x330 net/core/dev.c:5710
 receive_buf+0x284/0x30b0 drivers/net/virtio_net.c:1061
 virtnet_receive drivers/net/virtio_net.c:1323 [inline]
 virtnet_poll+0x436/0x7d0 drivers/net/virtio_net.c:1428
 napi_poll net/core/dev.c:6392 [inline]
 net_rx_action+0x3ae/0xa90 net/core/dev.c:6460
 __do_softirq+0x115/0x33f kernel/softirq.c:292

write to 0xffff888123f78b08 of 4 bytes by task 7180 on cpu 0:
 __nf_ct_refresh_acct+0xfb/0x1b0 net/netfilter/nf_conntrack_core.c:1796
 nf_ct_refresh_acct include/net/netfilter/nf_conntrack.h:196 [inline]
 nf_conntrack_tcp_packet+0xd40/0x3390 net/netfilter/nf_conntrack_proto_tcp.c:1161
 nf_conntrack_handle_packet net/netfilter/nf_conntrack_core.c:1632 [inline]
 nf_conntrack_in+0x410/0xa80 net/netfilter/nf_conntrack_core.c:1726
 ipv4_conntrack_local+0xbe/0x130 net/netfilter/nf_conntrack_proto.c:200
 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline]
 nf_hook_slow+0x83/0x160 net/netfilter/core.c:512
 nf_hook include/linux/netfilter.h:260 [inline]
 __ip_local_out+0x1f7/0x2b0 net/ipv4/ip_output.c:114
 ip_local_out+0x31/0x90 net/ipv4/ip_output.c:123
 __ip_queue_xmit+0x3a8/0xa40 net/ipv4/ip_output.c:532
 ip_queue_xmit+0x45/0x60 include/net/ip.h:237
 __tcp_transmit_skb+0xe81/0x1d60 net/ipv4/tcp_output.c:1169
 __tcp_send_ack+0x246/0x300 net/ipv4/tcp_output.c:3696
 tcp_send_ack+0x34/0x40 net/ipv4/tcp_output.c:3702
 tcp_cleanup_rbuf+0x130/0x360 net/ipv4/tcp.c:1576

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7180 Comm: syz-fuzzer Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2460):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/04 12:09 https://github.com/google/ktsan.git kcsan 05f2236801fe 18e12644 .config console log report ci2-upstream-kcsan-gce
2019/11/03 21:37 https://github.com/google/ktsan.git kcsan 05f2236801fe b35fad31 .config console log report ci2-upstream-kcsan-gce
2019/11/03 09:33 https://github.com/google/ktsan.git kcsan 05f2236801fe c9610487 .config console log report ci2-upstream-kcsan-gce
2019/11/02 21:12 https://github.com/google/ktsan.git kcsan 05f2236801fe d603afc9 .config console log report ci2-upstream-kcsan-gce
2019/11/01 18:34 https://github.com/google/ktsan.git kcsan 05f2236801fe 997ccc67 .config console log report ci2-upstream-kcsan-gce
2019/10/30 20:48 https://github.com/google/ktsan.git kcsan 05f2236801fe a41ca8fa .config console log report ci2-upstream-kcsan-gce
2019/10/29 04:15 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
2019/10/28 16:12 https://github.com/google/ktsan.git kcsan 05f2236801fe 439d7b14 .config console log report ci2-upstream-kcsan-gce
2019/10/26 11:48 https://github.com/google/ktsan.git kcsan 05f2236801fe 25bb509e .config console log report ci2-upstream-kcsan-gce
2019/10/25 23:45 https://github.com/google/ktsan.git kcsan 05f2236801fe 413926c5 .config console log report ci2-upstream-kcsan-gce
2019/10/25 11:39 https://github.com/google/ktsan.git kcsan 05f2236801fe 04ca72cd .config console log report ci2-upstream-kcsan-gce
2019/10/24 07:45 https://github.com/google/ktsan.git kcsan 05f2236801fe d01bb02a .config console log report ci2-upstream-kcsan-gce
2019/10/23 14:28 https://github.com/google/ktsan.git kcsan 05f2236801fe b602d64b .config console log report ci2-upstream-kcsan-gce
2019/10/23 01:38 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/23 00:49 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 23:43 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 22:34 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 21:39 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 20:26 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 19:10 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 18:03 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 16:56 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 15:54 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 15:23 https://github.com/google/ktsan.git kcsan 05f2236801fe 4ee855e7 .config console log report ci2-upstream-kcsan-gce
2019/10/22 13:53 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 12:53 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 11:51 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 10:59 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 09:54 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 08:39 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 08:29 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 07:24 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 06:18 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 04:30 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 04:27 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 03:14 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 02:11 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 01:00 https://github.com/google/ktsan.git kcsan 05f2236801fe c59a7cd8 .config console log report ci2-upstream-kcsan-gce
2019/10/22 00:20 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 22:52 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 21:49 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 20:40 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 19:55 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 18:37 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 17:27 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 17:18 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 16:11 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 15:00 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/21 13:59 https://github.com/google/ktsan.git kcsan 05f2236801fe b24d2b8a .config console log report ci2-upstream-kcsan-gce
2019/10/04 15:36 https://github.com/google/ktsan.git kcsan b4bd934316dc c86336cf .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.