syzbot


KCSAN: data-race in wg_packet_encrypt_worker / wg_packet_send_staged_packets (2)

Status: auto-obsoleted due to no activity on 2025/07/12 23:00
Subsystems: wireguard
[Documentation on labels]
First crash: 85d, last: 82d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_packet_encrypt_worker / wg_packet_send_staged_packets wireguard 6 1 341d 341d 0/29 auto-obsoleted due to no activity on 2024/10/05 22:11

Sample crash report:
==================================================================
BUG: KCSAN: data-race in wg_packet_encrypt_worker / wg_packet_send_staged_packets

write to 0xffff888119161d80 of 8 bytes by task 9339 on cpu 0:
 __ptr_ring_discard_one include/linux/ptr_ring.h:280 [inline]
 __ptr_ring_consume include/linux/ptr_ring.h:301 [inline]
 ptr_ring_consume_bh include/linux/ptr_ring.h:366 [inline]
 wg_packet_encrypt_worker+0xab5/0xb80 drivers/net/wireguard/send.c:293
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4ce/0x9d0 kernel/workqueue.c:3319
 worker_thread+0x582/0x770 kernel/workqueue.c:3400
 kthread+0x489/0x510 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff888119161d80 of 8 bytes by task 9708 on cpu 1:
 __ptr_ring_produce include/linux/ptr_ring.h:106 [inline]
 ptr_ring_produce_bh include/linux/ptr_ring.h:163 [inline]
 wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:174 [inline]
 wg_packet_create_data drivers/net/wireguard/send.c:320 [inline]
 wg_packet_send_staged_packets+0x75f/0xab0 drivers/net/wireguard/send.c:388
 wg_xmit+0x5c7/0x6b0 drivers/net/wireguard/device.c:218
 __netdev_start_xmit include/linux/netdevice.h:5204 [inline]
 netdev_start_xmit include/linux/netdevice.h:5213 [inline]
 xmit_one net/core/dev.c:3776 [inline]
 dev_hard_start_xmit+0x12f/0x3d0 net/core/dev.c:3792
 __dev_queue_xmit+0x10b9/0x1fb0 net/core/dev.c:4629
 dev_queue_xmit include/linux/netdevice.h:3350 [inline]
 packet_xmit+0x4b/0x1f0 net/packet/af_packet.c:276
 packet_snd net/packet/af_packet.c:3131 [inline]
 packet_sendmsg+0x2b1d/0x32d0 net/packet/af_packet.c:3163
 sock_sendmsg_nosec net/socket.c:712 [inline]
 __sock_sendmsg+0x145/0x180 net/socket.c:727
 __sys_sendto+0x268/0x330 net/socket.c:2180
 __do_sys_sendto net/socket.c:2187 [inline]
 __se_sys_sendto net/socket.c:2183 [inline]
 __x64_sys_sendto+0x76/0x90 net/socket.c:2183
 x64_sys_call+0x2eb6/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:45
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff88814251fc00 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 9708 Comm: syz.4.2201 Tainted: G        W           6.15.0-rc6-syzkaller-00278-g172a9d94339c #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/17 22:57 upstream 172a9d94339c f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_encrypt_worker / wg_packet_send_staged_packets
2025/05/14 18:17 upstream 9f35e33144ae a4fa04ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_encrypt_worker / wg_packet_send_staged_packets
* Struck through repros no longer work on HEAD.