================================================================== BUG: KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block write to 0xffff88813d5a3008 of 4 bytes by task 11588 on cpu 0: prb_flush_block net/packet/af_packet.c:831 [inline] prb_close_block net/packet/af_packet.c:887 [inline] prb_retire_current_block+0x1ad/0x250 net/packet/af_packet.c:1027 __packet_lookup_frame_in_block net/packet/af_packet.c:1157 [inline] packet_current_rx_frame net/packet/af_packet.c:1186 [inline] tpacket_rcv+0xcc4/0x1810 net/packet/af_packet.c:2416 dev_queue_xmit_nit+0x5c2/0x620 net/core/dev.c:2345 xmit_one net/core/dev.c:3576 [inline] dev_hard_start_xmit+0xcc/0x3f0 net/core/dev.c:3596 __dev_queue_xmit+0xfd4/0x1fe0 net/core/dev.c:4423 dev_queue_xmit include/linux/netdevice.h:3105 [inline] neigh_connected_output+0x258/0x2d0 net/core/neighbour.c:1594 neigh_output include/net/neighbour.h:542 [inline] ip_finish_output2+0x784/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+0x168e/0x1750 net/ipv4/ip_tunnel.c:857 __gre_xmit net/ipv4/ip_gre.c:483 [inline] ipgre_xmit+0x5f6/0x6d0 net/ipv4/ip_gre.c:687 __netdev_start_xmit include/linux/netdevice.h:4913 [inline] netdev_start_xmit include/linux/netdevice.h:4922 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3596 __dev_queue_xmit+0xfd4/0x1fe0 net/core/dev.c:4423 dev_queue_xmit include/linux/netdevice.h:3105 [inline] __bpf_tx_skb net/core/filter.c:2151 [inline] __bpf_redirect_no_mac net/core/filter.c:2181 [inline] __bpf_redirect+0x707/0x950 net/core/filter.c:2204 ____bpf_clone_redirect net/core/filter.c:2474 [inline] bpf_clone_redirect+0x18a/0x200 net/core/filter.c:2446 ___bpf_prog_run+0x9ab/0x46c0 kernel/bpf/core.c:2010 __bpf_prog_run512+0x74/0xa0 kernel/bpf/core.c:2253 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+0x1e5/0x4a0 net/bpf/test_run.c:433 bpf_prog_test_run_skb+0x830/0xba0 net/bpf/test_run.c:1094 bpf_prog_test_run+0x26d/0x3e0 kernel/bpf/syscall.c:4313 __sys_bpf+0x400/0x7a0 kernel/bpf/syscall.c:5728 __do_sys_bpf kernel/bpf/syscall.c:5817 [inline] __se_sys_bpf kernel/bpf/syscall.c:5815 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5815 x64_sys_call+0x2625/0x2d60 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 read to 0xffff88813d5a3008 of 4 bytes by task 5654 on cpu 1: prb_lookup_block net/packet/af_packet.c:1202 [inline] __tpacket_v3_has_room net/packet/af_packet.c:1333 [inline] __packet_rcv_has_room+0x1e4/0x220 net/packet/af_packet.c:1358 tpacket_rcv+0x2ae/0x1810 net/packet/af_packet.c:2346 dev_queue_xmit_nit+0x5c2/0x620 net/core/dev.c:2345 xmit_one net/core/dev.c:3576 [inline] dev_hard_start_xmit+0xcc/0x3f0 net/core/dev.c:3596 __dev_queue_xmit+0xfd4/0x1fe0 net/core/dev.c:4423 dev_queue_xmit include/linux/netdevice.h:3105 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip6_finish_output2+0xa41/0xd20 net/ipv6/ip6_output.c:141 ip6_finish_output+0x438/0x540 net/ipv6/ip6_output.c:226 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0xf5/0x230 net/ipv6/ip6_output.c:247 dst_output include/net/dst.h:450 [inline] ip6_local_out+0x76/0xd0 net/ipv6/output_core.c:155 ip6tunnel_xmit include/net/ip6_tunnel.h:161 [inline] udp_tunnel6_xmit_skb+0x333/0x470 net/ipv6/ip6_udp_tunnel.c:111 send6+0x2ff/0x3c0 drivers/net/wireguard/socket.c:152 wg_socket_send_skb_to_peer+0xbd/0x130 drivers/net/wireguard/socket.c:178 wg_packet_create_data_done drivers/net/wireguard/send.c:251 [inline] wg_packet_tx_worker+0x127/0x360 drivers/net/wireguard/send.c:276 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312 worker_thread+0x526/0x6e0 kernel/workqueue.c:3389 kthread+0x1d1/0x210 kernel/kthread.c:389 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 value changed: 0x00000000 -> 0x00000001 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 5654 Comm: kworker/1:4 Not tainted 6.11.0-rc5-syzkaller-00050-g3ec3f5fc4a91 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Workqueue: wg-crypt-wg0 wg_packet_tx_worker ==================================================================