syzbot


KCSAN: data-race in wg_packet_handshake_receive_worker / wg_packet_rx_poll (2)

Status: auto-closed as invalid on 2020/12/25 11:24
Reported-by: syzbot+9635fead3a2a5725b21f@syzkaller.appspotmail.com
First crash: 767d, last: 767d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_packet_handshake_receive_worker / wg_packet_rx_poll (3) 2 330d 305d 0/24 auto-closed as invalid on 2022/02/22 09:23
upstream KCSAN: data-race in wg_packet_handshake_receive_worker / wg_packet_rx_poll 3 834d 854d 0/24 auto-closed as invalid on 2020/10/01 18:48

Sample crash report:
==================================================================
BUG: KCSAN: data-race in wg_packet_handshake_receive_worker / wg_packet_rx_poll

read-write to 0xffff88801c05d508 of 8 bytes by interrupt on cpu 1:
 update_rx_stats drivers/net/wireguard/receive.c:28 [inline]
 wg_packet_consume_data_done drivers/net/wireguard/receive.c:364 [inline]
 wg_packet_rx_poll+0xfd9/0x1290 drivers/net/wireguard/receive.c:482
 napi_poll+0x178/0x4c0 net/core/dev.c:6763
 net_rx_action+0x17a/0x480 net/core/dev.c:6833
 __do_softirq+0x12c/0x2b1 kernel/softirq.c:298
 asm_call_irq_on_stack+0xf/0x20
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
 do_softirq_own_stack+0x32/0x40 arch/x86/kernel/irq_64.c:77
 do_softirq kernel/softirq.c:343 [inline]
 __local_bh_enable_ip+0xba/0xd0 kernel/softirq.c:195
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline]
 _raw_spin_unlock_bh+0x33/0x40 kernel/locking/spinlock.c:207
 spin_unlock_bh include/linux/spinlock.h:399 [inline]
 ptr_ring_consume_bh include/linux/ptr_ring.h:367 [inline]
 wg_packet_decrypt_worker+0x6f2/0x730 drivers/net/wireguard/receive.c:507
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2272
 worker_thread+0x635/0xb90 kernel/workqueue.c:2418
 kthread+0x1fa/0x220 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

read-write to 0xffff88801c05d508 of 8 bytes by task 10640 on cpu 0:
 update_rx_stats drivers/net/wireguard/receive.c:28 [inline]
 wg_receive_handshake_packet drivers/net/wireguard/receive.c:205 [inline]
 wg_packet_handshake_receive_worker+0x395/0x440 drivers/net/wireguard/receive.c:220
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2272
 worker_thread+0x635/0xb90 kernel/workqueue.c:2418
 kthread+0x1fa/0x220 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10640 Comm: kworker/0:6 Not tainted 5.10.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: wg-kex-wg1 wg_packet_handshake_receive_worker
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/11/02 23:47 upstream 495023e4e49e 7f344fa6 .config log report info
* Struck through repros no longer work on HEAD.