syzbot


KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets (3)

Status: upstream: reported on 2022/02/08 08:32
Labels: wireguard (incorrect?)
Reported-by: syzbot+6ba34f16b98fe40daef1@syzkaller.appspotmail.com
First crash: 575d, last: 8h31m
Discussions (3)
Title Replies (including bot) Last reply
Re: [syzbot] Monthly wireguard report (Apr 2023) 1 (1) 2023/05/02 09:03
[syzbot] Monthly wireguard report (Apr 2023) 0 (1) 2023/05/01 09:03
[syzbot] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets (3) 0 (1) 2022/02/08 08:32
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets 15 1088d 1126d 0/24 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets (2) 108 791d 958d 0/24 auto-closed as invalid on 2021/05/13 03:09

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

write to 0xffff888126ae0b08 of 4 bytes by interrupt on cpu 0:
 wg_cpumask_next_online drivers/net/wireguard/queueing.h:133 [inline]
 wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:176 [inline]
 wg_packet_create_data drivers/net/wireguard/send.c:320 [inline]
 wg_packet_send_staged_packets+0x777/0xb50 drivers/net/wireguard/send.c:387
 wg_packet_send_keepalive+0xe8/0x100 drivers/net/wireguard/send.c:239
 wg_expired_send_persistent_keepalive+0x3c/0x50 drivers/net/wireguard/timers.c:141
 call_timer_fn+0x35/0x290 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x46c/0x650 kernel/time/timer.c:2022
 run_timer_softirq+0x1d/0x40 kernel/time/timer.c:2035
 __do_softirq+0xc1/0x265 kernel/softirq.c:571
 invoke_softirq kernel/softirq.c:445 [inline]
 __irq_exit_rcu+0x57/0xa0 kernel/softirq.c:650
 sysvec_apic_timer_interrupt+0x6d/0x80 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:86 [inline]
 acpi_safe_halt+0x20/0x30 drivers/acpi/processor_idle.c:112
 acpi_idle_do_entry+0x19/0x30 drivers/acpi/processor_idle.c:573
 acpi_idle_enter+0x96/0xb0 drivers/acpi/processor_idle.c:711
 cpuidle_enter_state+0xc6/0x260 drivers/cpuidle/cpuidle.c:267
 cpuidle_enter+0x40/0x60 drivers/cpuidle/cpuidle.c:388
 call_cpuidle kernel/sched/idle.c:134 [inline]
 cpuidle_idle_call kernel/sched/idle.c:215 [inline]
 do_idle+0x194/0x230 kernel/sched/idle.c:282
 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:379
 rest_init+0xf3/0x100 init/main.c:735
 arch_call_rest_init+0x9/0x10 init/main.c:834
 start_kernel+0x582/0x5e0 init/main.c:1088
 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:556
 x86_64_start_kernel+0x94/0xa0 arch/x86/kernel/head64.c:537
 secondary_startup_64_no_verify+0xf5/0xfb

read to 0xffff888126ae0b08 of 4 bytes by interrupt on cpu 1:
 wg_cpumask_next_online drivers/net/wireguard/queueing.h:129 [inline]
 wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:176 [inline]
 wg_packet_create_data drivers/net/wireguard/send.c:320 [inline]
 wg_packet_send_staged_packets+0x635/0xb50 drivers/net/wireguard/send.c:387
 wg_packet_send_keepalive+0xe8/0x100 drivers/net/wireguard/send.c:239
 wg_expired_send_persistent_keepalive+0x3c/0x50 drivers/net/wireguard/timers.c:141
 call_timer_fn+0x35/0x290 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x46c/0x650 kernel/time/timer.c:2022
 run_timer_softirq+0x1d/0x40 kernel/time/timer.c:2035
 __do_softirq+0xc1/0x265 kernel/softirq.c:571
 invoke_softirq kernel/softirq.c:445 [inline]
 __irq_exit_rcu+0x57/0xa0 kernel/softirq.c:650
 sysvec_apic_timer_interrupt+0x6d/0x80 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:86 [inline]
 acpi_safe_halt+0x20/0x30 drivers/acpi/processor_idle.c:112
 acpi_idle_do_entry+0x19/0x30 drivers/acpi/processor_idle.c:573
 acpi_idle_enter+0x96/0xb0 drivers/acpi/processor_idle.c:711
 cpuidle_enter_state+0xc6/0x260 drivers/cpuidle/cpuidle.c:267
 cpuidle_enter+0x40/0x60 drivers/cpuidle/cpuidle.c:388
 call_cpuidle kernel/sched/idle.c:134 [inline]
 cpuidle_idle_call kernel/sched/idle.c:215 [inline]
 do_idle+0x194/0x230 kernel/sched/idle.c:282
 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:379
 start_secondary+0x7c/0x80 arch/x86/kernel/smpboot.c:269
 secondary_startup_64_no_verify+0xf5/0xfb

value changed: 0x00000000 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.4.0-rc5-syzkaller-00024-g5f63595ebd82 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
==================================================================

Crashes (666):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2023/06/08 07:54 upstream 5f63595ebd82 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/08 04:29 upstream a27648c74210 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/07 01:22 upstream a4d7d7011219 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/05 21:20 upstream f8dba31b0a82 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/05 03:16 upstream 9561de3a55be a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/04 12:14 upstream e5282a7d8f6b a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/03 04:03 upstream 4ecd704a4c51 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/03 02:27 upstream c43a6ff9f93f a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/02 06:35 upstream 1874a42a7d74 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/01 17:35 upstream 929ed21dfdb6 babc4389 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/06/01 08:55 upstream 48b1320a674e babc4389 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/31 07:01 upstream afead42fdfca 09898419 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/30 17:29 upstream 8b817fded42d df37c7f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/29 21:33 upstream 8b817fded42d cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/29 02:37 upstream 7877cb91f108 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/28 19:42 upstream 416839029e38 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/28 00:28 upstream 4e893b5aa4ac cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/27 10:50 upstream 49572d536129 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/26 18:44 upstream 0d85b27b0cc6 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/26 06:05 upstream 9db898594c54 b40ef614 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/25 14:17 upstream 933174ae28ba 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/25 06:27 upstream 933174ae28ba 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/24 16:30 upstream 9d646009f65d 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/24 09:20 upstream 27e462c8fad4 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/23 12:03 upstream ae8373a5add4 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/23 09:11 upstream 421ca22e3138 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/22 06:26 upstream e2065b8c1b01 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/20 03:44 upstream cbd6ac3837cd 96689200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/19 05:34 upstream 2d1bcbc6cd70 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/18 02:21 upstream 1b66c114d161 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/16 18:17 upstream f1fcbaa18b28 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/15 04:53 upstream f1fcbaa18b28 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/14 02:22 upstream d4d58949a6ea 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/12 19:51 upstream cc3c44c9fda2 ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/11 15:48 upstream d295b66a7b66 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/09 17:03 upstream ba0ad6ed89fd 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/09 00:33 upstream ba0ad6ed89fd c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/08 13:36 upstream ac9a78681b92 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/07 23:49 upstream 17784de648be 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/07 14:53 upstream fc4354c6e5c2 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/06 17:31 upstream 2e1e1337881b 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/06 06:21 upstream 7163a2111f6c de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/04 15:43 upstream 1a5304fecee5 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/03 02:42 upstream 7df047b3f0aa 48e0a81d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/02 13:25 upstream 865fdb08197e 52d40fd2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/05/01 00:04 upstream 58390c8ce1bd 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2023/04/30 12:17 upstream 825a0714d2b3 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2022/02/08 02:40 upstream 2ade8eef993c a7dab638 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2022/01/11 04:05 upstream 133d9c53c9dc ddb0ab8c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
2021/11/10 04:03 upstream cb690f5238d7 55fa030c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
* Struck through repros no longer work on HEAD.