================================================================== BUG: KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets read to 0xffff88816aa36b28 of 4 bytes by task 2008 on cpu 0: wg_cpumask_next_online drivers/net/wireguard/queueing.h:127 [inline] wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:173 [inline] wg_packet_create_data drivers/net/wireguard/send.c:320 [inline] wg_packet_send_staged_packets+0x60e/0xac0 drivers/net/wireguard/send.c:388 wg_xmit+0x5c8/0x6a0 drivers/net/wireguard/device.c:218 __netdev_start_xmit include/linux/netdevice.h:4882 [inline] netdev_start_xmit include/linux/netdevice.h:4896 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3594 __dev_queue_xmit+0xf83/0x1e50 net/core/dev.c:4393 dev_queue_xmit include/linux/netdevice.h:3095 [inline] neigh_connected_output+0x258/0x2c0 net/core/neighbour.c:1594 neigh_output include/net/neighbour.h:542 [inline] ip_finish_output2+0x782/0x8b0 net/ipv4/ip_output.c:235 ip_finish_output+0x11a/0x2a0 net/ipv4/ip_output.c:323 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0xab/0x170 net/ipv4/ip_output.c:433 dst_output include/net/dst.h:450 [inline] ip_local_out+0xab/0xd0 net/ipv4/ip_output.c:129 iptunnel_xmit+0x33f/0x460 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1685/0x1740 net/ipv4/ip_tunnel.c:857 __gre_xmit net/ipv4/ip_gre.c:483 [inline] ipgre_xmit+0x5f4/0x6d0 net/ipv4/ip_gre.c:687 __netdev_start_xmit include/linux/netdevice.h:4882 [inline] netdev_start_xmit include/linux/netdevice.h:4896 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3594 __dev_queue_xmit+0xf83/0x1e50 net/core/dev.c:4393 dev_queue_xmit include/linux/netdevice.h:3095 [inline] __bpf_tx_skb net/core/filter.c:2144 [inline] __bpf_redirect_no_mac net/core/filter.c:2174 [inline] __bpf_redirect+0x705/0x950 net/core/filter.c:2197 ____bpf_clone_redirect net/core/filter.c:2467 [inline] bpf_clone_redirect+0x18a/0x200 net/core/filter.c:2439 ___bpf_prog_run+0x9ab/0x46c0 kernel/bpf/core.c:2011 __bpf_prog_run512+0x74/0xa0 kernel/bpf/core.c:2254 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] bpf_test_run+0x17d/0x430 net/bpf/test_run.c:425 bpf_prog_test_run_skb+0x73c/0x9b0 net/bpf/test_run.c:1072 bpf_prog_test_run+0x26d/0x3e0 kernel/bpf/syscall.c:4292 __sys_bpf+0x400/0x7a0 kernel/bpf/syscall.c:5706 __do_sys_bpf kernel/bpf/syscall.c:5795 [inline] __se_sys_bpf kernel/bpf/syscall.c:5793 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5793 x64_sys_call+0x2655/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:322 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f write to 0xffff88816aa36b28 of 4 bytes by task 2009 on cpu 1: wg_cpumask_next_online drivers/net/wireguard/queueing.h:130 [inline] wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:173 [inline] wg_packet_create_data drivers/net/wireguard/send.c:320 [inline] wg_packet_send_staged_packets+0x6e5/0xac0 drivers/net/wireguard/send.c:388 wg_xmit+0x5c8/0x6a0 drivers/net/wireguard/device.c:218 __netdev_start_xmit include/linux/netdevice.h:4882 [inline] netdev_start_xmit include/linux/netdevice.h:4896 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3594 __dev_queue_xmit+0xf83/0x1e50 net/core/dev.c:4393 dev_queue_xmit include/linux/netdevice.h:3095 [inline] neigh_connected_output+0x258/0x2c0 net/core/neighbour.c:1594 neigh_output include/net/neighbour.h:542 [inline] ip_finish_output2+0x782/0x8b0 net/ipv4/ip_output.c:235 ip_finish_output+0x11a/0x2a0 net/ipv4/ip_output.c:323 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0xab/0x170 net/ipv4/ip_output.c:433 dst_output include/net/dst.h:450 [inline] ip_local_out+0xab/0xd0 net/ipv4/ip_output.c:129 iptunnel_xmit+0x33f/0x460 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1685/0x1740 net/ipv4/ip_tunnel.c:857 __gre_xmit net/ipv4/ip_gre.c:483 [inline] ipgre_xmit+0x5f4/0x6d0 net/ipv4/ip_gre.c:687 __netdev_start_xmit include/linux/netdevice.h:4882 [inline] netdev_start_xmit include/linux/netdevice.h:4896 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3594 __dev_queue_xmit+0xf83/0x1e50 net/core/dev.c:4393 dev_queue_xmit include/linux/netdevice.h:3095 [inline] __bpf_tx_skb net/core/filter.c:2144 [inline] __bpf_redirect_no_mac net/core/filter.c:2174 [inline] __bpf_redirect+0x705/0x950 net/core/filter.c:2197 ____bpf_clone_redirect net/core/filter.c:2467 [inline] bpf_clone_redirect+0x18a/0x200 net/core/filter.c:2439 ___bpf_prog_run+0x9ab/0x46c0 kernel/bpf/core.c:2011 __bpf_prog_run512+0x74/0xa0 kernel/bpf/core.c:2254 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] bpf_test_run+0x17d/0x430 net/bpf/test_run.c:425 bpf_prog_test_run_skb+0x73c/0x9b0 net/bpf/test_run.c:1072 bpf_prog_test_run+0x26d/0x3e0 kernel/bpf/syscall.c:4292 __sys_bpf+0x400/0x7a0 kernel/bpf/syscall.c:5706 __do_sys_bpf kernel/bpf/syscall.c:5795 [inline] __se_sys_bpf kernel/bpf/syscall.c:5793 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5793 x64_sys_call+0x2655/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:322 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x00000001 -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2009 Comm: syz.0.9964 Not tainted 6.10.0-rc7-syzkaller-00012-g34afb82a3c67 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 ==================================================================