================================================================== BUG: KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block write to 0xffff888107858008 of 4 bytes by task 14735 on cpu 1: prb_flush_block net/packet/af_packet.c:776 [inline] prb_close_block net/packet/af_packet.c:832 [inline] prb_retire_current_block+0x1ad/0x240 net/packet/af_packet.c:972 __packet_lookup_frame_in_block net/packet/af_packet.c:1096 [inline] packet_current_rx_frame net/packet/af_packet.c:1125 [inline] tpacket_rcv+0xd52/0x1a60 net/packet/af_packet.c:2359 deliver_skb net/core/dev.c:2200 [inline] __netif_receive_skb_core+0x408/0x1e80 net/core/dev.c:5296 __netif_receive_skb_one_core net/core/dev.c:5450 [inline] __netif_receive_skb+0x57/0x1b0 net/core/dev.c:5566 netif_receive_skb_internal net/core/dev.c:5652 [inline] netif_receive_skb+0x4a/0x310 net/core/dev.c:5711 tun_rx_batched+0x3bf/0x400 tun_get_user+0x1d24/0x22b0 drivers/net/tun.c:1997 tun_chr_write_iter+0x18e/0x240 drivers/net/tun.c:2043 call_write_iter include/linux/fs.h:1877 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x4ab/0x7d0 fs/read_write.c:584 ksys_write+0xeb/0x1a0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888107858008 of 4 bytes by task 14740 on cpu 0: prb_lookup_block net/packet/af_packet.c:1141 [inline] __tpacket_v3_has_room net/packet/af_packet.c:1272 [inline] __packet_rcv_has_room+0x120/0x460 net/packet/af_packet.c:1295 tpacket_rcv+0x275/0x1a60 net/packet/af_packet.c:2289 deliver_skb net/core/dev.c:2200 [inline] __netif_receive_skb_core+0x408/0x1e80 net/core/dev.c:5296 __netif_receive_skb_one_core net/core/dev.c:5450 [inline] __netif_receive_skb+0x57/0x1b0 net/core/dev.c:5566 netif_receive_skb_internal net/core/dev.c:5652 [inline] netif_receive_skb+0x4a/0x310 net/core/dev.c:5711 tun_rx_batched+0x3bf/0x400 tun_get_user+0x1d24/0x22b0 drivers/net/tun.c:1997 tun_chr_write_iter+0x18e/0x240 drivers/net/tun.c:2043 call_write_iter include/linux/fs.h:1877 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x4ab/0x7d0 fs/read_write.c:584 ksys_write+0xeb/0x1a0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000 -> 0x00000001 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 14740 Comm: syz-executor.2 Not tainted 6.5.0-rc6-syzkaller-00027-g91aa6c412d7f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ==================================================================