KCSAN: data-race in __nf_conntrack_alloc / __nf_conntrack_find_get (2)

6 views
Skip to first unread message

syzbot

unread,
Dec 9, 2020, 4:03:12 AM12/9/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 32f741b0 Merge tag 'powerpc-5.10-5' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=107fd175500000
kernel config: https://syzkaller.appspot.com/x/.config?x=c949fed53798f819
dashboard link: https://syzkaller.appspot.com/bug?extid=16072e73a56af3190e02
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project.git 913f6005669cfb590c99865a90bc51ed0983d09d)
CC: [core...@netfilter.org da...@davemloft.net f...@strlen.de kad...@netfilter.org ku...@kernel.org linux-...@vger.kernel.org net...@vger.kernel.org netfilt...@vger.kernel.org pa...@netfilter.org]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+16072e...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __nf_conntrack_alloc / __nf_conntrack_find_get

write to 0xffff888023621b08 of 4 bytes by interrupt on cpu 1:
__nf_conntrack_alloc+0x147/0x270 net/netfilter/nf_conntrack_core.c:1508
init_conntrack+0x178/0xa90 net/netfilter/nf_conntrack_core.c:1576
resolve_normal_ct net/netfilter/nf_conntrack_core.c:1674 [inline]
nf_conntrack_in+0x37f/0xad4 net/netfilter/nf_conntrack_core.c:1829
ipv4_conntrack_in+0x19/0x20 net/netfilter/nf_conntrack_proto.c:178
nf_hook_entry_hookfn include/linux/netfilter.h:136 [inline]
nf_hook_slow net/netfilter/core.c:589 [inline]
nf_hook_slow_list+0x133/0x340 net/netfilter/core.c:627
NF_HOOK_LIST include/linux/netfilter.h:337 [inline]
ip_sublist_rcv+0x56f/0x590 net/ipv4/ip_input.c:606
ip_list_rcv+0x262/0x290 net/ipv4/ip_input.c:643
__netif_receive_skb_list_ptype net/core/dev.c:5354 [inline]
__netif_receive_skb_list_core+0x34b/0x450 net/core/dev.c:5402
__netif_receive_skb_list+0x262/0x2e0 net/core/dev.c:5454
netif_receive_skb_list_internal+0xda/0x330 net/core/dev.c:5564
gro_normal_list net/core/dev.c:5718 [inline]
napi_complete_done+0x1b2/0x420 net/core/dev.c:6443
wg_packet_rx_poll+0x1208/0x1290 drivers/net/wireguard/receive.c:496
napi_poll+0x178/0x4c0 net/core/dev.c:6759
net_rx_action+0x17a/0x480 net/core/dev.c:6829
__do_softirq+0x12c/0x2b1 kernel/softirq.c:298
asm_call_irq_on_stack+0xf/0x20
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x32/0x40 arch/x86/kernel/irq_64.c:77
do_softirq kernel/softirq.c:343 [inline]
__local_bh_enable_ip+0xba/0xd0 kernel/softirq.c:195
__raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline]
_raw_spin_unlock_bh+0x33/0x40 kernel/locking/spinlock.c:207
spin_unlock_bh include/linux/spinlock.h:399 [inline]
ptr_ring_consume_bh include/linux/ptr_ring.h:367 [inline]
wg_packet_decrypt_worker+0x18c/0x730 drivers/net/wireguard/receive.c:507
process_one_work+0x3e1/0x950 kernel/workqueue.c:2272
worker_thread+0x635/0xb90 kernel/workqueue.c:2418
kthread+0x1fd/0x220 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

read to 0xffff888023621b08 of 4 bytes by task 16779 on cpu 0:
nf_ct_is_expired include/net/netfilter/nf_conntrack.h:272 [inline]
____nf_conntrack_find net/netfilter/nf_conntrack_core.c:747 [inline]
__nf_conntrack_find_get+0x1c7/0xac0 net/netfilter/nf_conntrack_core.c:778
resolve_normal_ct net/netfilter/nf_conntrack_core.c:1672 [inline]
nf_conntrack_in+0x31e/0xad4 net/netfilter/nf_conntrack_core.c:1829
ipv4_conntrack_local+0xc2/0x120 net/netfilter/nf_conntrack_proto.c:200
nf_hook_entry_hookfn include/linux/netfilter.h:136 [inline]
nf_hook_slow+0x72/0x170 net/netfilter/core.c:589
nf_hook include/linux/netfilter.h:256 [inline]
__ip_local_out+0x282/0x2a0 net/ipv4/ip_output.c:115
ip_local_out+0x22/0x80 net/ipv4/ip_output.c:124
iptunnel_xmit+0x31a/0x460 net/ipv4/ip_tunnel_core.c:82
ip_tunnel_xmit+0x1084/0x11b0 net/ipv4/ip_tunnel.c:807
__gre_xmit net/ipv4/ip_gre.c:466 [inline]
ipgre_xmit+0x4d9/0x530 net/ipv4/ip_gre.c:648
__netdev_start_xmit include/linux/netdevice.h:4735 [inline]
netdev_start_xmit include/linux/netdevice.h:4749 [inline]
xmit_one+0xf9/0x2e0 net/core/dev.c:3564
dev_hard_start_xmit net/core/dev.c:3580 [inline]
__dev_queue_xmit+0xeef/0x1510 net/core/dev.c:4140
dev_queue_xmit+0x13/0x20 net/core/dev.c:4173
__bpf_tx_skb net/core/filter.c:2116 [inline]
__bpf_redirect_no_mac net/core/filter.c:2141 [inline]
__bpf_redirect+0x544/0x750 net/core/filter.c:2164
____bpf_clone_redirect net/core/filter.c:2448 [inline]
bpf_clone_redirect+0x168/0x1c0 net/core/filter.c:2420
bpf_prog_801cabf80fc815cd+0x59/0x68
bpf_dispatcher_nop_func include/linux/bpf.h:644 [inline]
bpf_test_run+0x266/0x450 net/bpf/test_run.c:50
bpf_prog_test_run_skb+0x6f0/0xe70 net/bpf/test_run.c:581
bpf_prog_test_run kernel/bpf/syscall.c:3125 [inline]
__do_sys_bpf+0x39d6/0x9aa0 kernel/bpf/syscall.c:4417
__se_sys_bpf kernel/bpf/syscall.c:4357 [inline]
__x64_sys_bpf+0x3d/0x50 kernel/bpf/syscall.c:4357
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

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


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jan 16, 2021, 6:05:12 PM1/16/21
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages