syzbot


KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block (2)

Status: auto-obsoleted due to no activity on 2024/11/04 08:35
Subsystems: net
[Documentation on labels]
First crash: 182d, last: 141d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block net 1 552d 539d 0/28 auto-obsoleted due to no activity on 2023/09/25 19:09

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block

write to 0xffff888127854008 of 4 bytes by task 9 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+0xcfe/0x1890 net/packet/af_packet.c:2416
 dev_queue_xmit_nit+0x5c2/0x620 net/core/dev.c:2347
 xmit_one net/core/dev.c:3584 [inline]
 dev_hard_start_xmit+0xcc/0x3f0 net/core/dev.c:3604
 __dev_queue_xmit+0xfe6/0x1fe0 net/core/dev.c:4424
 dev_queue_xmit include/linux/netdevice.h:3094 [inline]
 neigh_connected_output+0x258/0x2d0 net/core/neighbour.c:1594
 neigh_output include/net/neighbour.h:542 [inline]
 ip6_finish_output2+0xa6d/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:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 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 0xffff888127854008 of 4 bytes by task 4942 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+0x2c5/0x1890 net/packet/af_packet.c:2346
 dev_queue_xmit_nit+0x5c2/0x620 net/core/dev.c:2347
 xmit_one net/core/dev.c:3584 [inline]
 dev_hard_start_xmit+0xcc/0x3f0 net/core/dev.c:3604
 __dev_queue_xmit+0xfe6/0x1fe0 net/core/dev.c:4424
 dev_queue_xmit include/linux/netdevice.h:3094 [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:236
 ip_finish_output+0x11a/0x2a0 net/ipv4/ip_output.c:324
 NF_HOOK_COND include/linux/netfilter.h:303 [inline]
 ip_output+0xab/0x170 net/ipv4/ip_output.c:434
 dst_output include/net/dst.h:450 [inline]
 ip_local_out+0xab/0xd0 net/ipv4/ip_output.c:130
 iptunnel_xmit+0x33f/0x460 net/ipv4/ip_tunnel_core.c:82
 ip_tunnel_xmit+0x1658/0x1720 net/ipv4/ip_tunnel.c:858
 __gre_xmit net/ipv4/ip_gre.c:484 [inline]
 ipgre_xmit+0x5f6/0x6d0 net/ipv4/ip_gre.c:688
 __netdev_start_xmit include/linux/netdevice.h:4916 [inline]
 netdev_start_xmit include/linux/netdevice.h:4925 [inline]
 xmit_one net/core/dev.c:3588 [inline]
 dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3604
 __dev_queue_xmit+0xfe6/0x1fe0 net/core/dev.c:4424
 dev_queue_xmit include/linux/netdevice.h:3094 [inline]
 __bpf_tx_skb net/core/filter.c:2152 [inline]
 __bpf_redirect_no_mac net/core/filter.c:2182 [inline]
 __bpf_redirect+0x707/0x950 net/core/filter.c:2205
 ____bpf_clone_redirect net/core/filter.c:2475 [inline]
 bpf_clone_redirect+0x18a/0x200 net/core/filter.c:2447
 bpf_prog_1eda3e3d4f38ab1d+0x5f/0x64
 bpf_dispatcher_nop_func include/linux/bpf.h:1257 [inline]
 __bpf_prog_run include/linux/filter.h:701 [inline]
 bpf_prog_run include/linux/filter.h:708 [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+0x20f/0x3a0 kernel/bpf/syscall.c:4247
 __sys_bpf+0x400/0x7a0 kernel/bpf/syscall.c:5652
 __do_sys_bpf kernel/bpf/syscall.c:5741 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5739 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5739
 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: 1 UID: 0 PID: 4942 Comm: syz.1.332 Tainted: G        W          6.12.0-rc1-syzkaller #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
syz.1.332 (4942) used greatest stack depth: 8872 bytes left

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/30 08:28 upstream 9852d85ec9d4 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block
2024/08/27 19:26 upstream 3ec3f5fc4a91 6c853ff9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block
2024/08/22 00:15 upstream 872cf28b8df9 db5852f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block
2024/08/19 19:23 upstream 47ac09b91bef 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __packet_rcv_has_room / prb_retire_current_block
* Struck through repros no longer work on HEAD.