syzbot


KCSAN: data-race in wg_packet_encrypt_worker / wg_packet_send_staged_packets

Status: auto-obsoleted due to no activity on 2024/10/05 22:11
Subsystems: wireguard
[Documentation on labels]
First crash: 150d, last: 150d

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

write to 0xffff88811ebe6580 of 8 bytes by task 3113 on cpu 1:
 __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+0x977/0xa30 drivers/net/wireguard/send.c:293
 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

read to 0xffff88811ebe6580 of 8 bytes by task 24732 on cpu 0:
 __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+0x75d/0xac0 drivers/net/wireguard/send.c:388
 wg_xmit+0x5ca/0x6b0 drivers/net/wireguard/device.c:218
 __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]
 packet_xmit+0x4b/0x1e0 net/packet/af_packet.c:276
 packet_snd net/packet/af_packet.c:3145 [inline]
 packet_sendmsg+0x2c78/0x34b0 net/packet/af_packet.c:3177
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:745
 __sys_sendto+0x1e5/0x260 net/socket.c:2204
 __do_sys_sendto net/socket.c:2216 [inline]
 __se_sys_sendto net/socket.c:2212 [inline]
 __x64_sys_sendto+0x78/0x90 net/socket.c:2212
 x64_sys_call+0x2959/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:45
 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: 0xffff88814cccd800 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 24732 Comm: syz.2.8079 Not tainted 6.11.0-rc5-syzkaller-00310-ge8784b0aef62 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/31 22:09 upstream e8784b0aef62 1eda0d14 .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.