================================================================== BUG: KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block write to 0xffff8881211b8008 of 4 bytes by task 3799 on cpu 1: 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 sch_direct_xmit+0x1b0/0x580 net/sched/sch_generic.c:343 qdisc_restart net/sched/sch_generic.c:408 [inline] __qdisc_run+0x6e5/0x1130 net/sched/sch_generic.c:416 __dev_xmit_skb net/core/dev.c:3878 [inline] __dev_queue_xmit+0x9e9/0x1fe0 net/core/dev.c:4389 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/0xd10 net/ipv6/ip6_output.c:137 ip6_finish_output+0x438/0x540 net/ipv6/ip6_output.c:222 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0xf5/0x230 net/ipv6/ip6_output.c:243 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/0x700 kernel/workqueue.c:3390 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 read to 0xffff8881211b8008 of 4 bytes by task 10022 on cpu 0: 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] __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 value changed: 0x00000000 -> 0x00000001 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 10022 Comm: syz.3.1822 Not tainted 6.11.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 ==================================================================