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
Reported-by: syzbot+6ba34f16b98fe40daef1@syzkaller.appspotmail.com
First crash: 445d, last: 1d19h
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 958d 996d 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 661d 828d 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 0xffff888127be5ac8 of 4 bytes by interrupt on cpu 1:
 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+0x6ea/0xa80 drivers/net/wireguard/send.c:387
 wg_packet_send_keepalive+0xe4/0x100 drivers/net/wireguard/send.c:239
 wg_expired_send_persistent_keepalive+0x38/0x50 drivers/net/wireguard/timers.c:141
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1700
 expire_timers+0x11f/0x260 kernel/time/timer.c:1751
 __run_timers+0x350/0x400 kernel/time/timer.c:2022
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:2035
 __do_softirq+0xf2/0x2c7 kernel/softirq.c:571
 __irq_exit_rcu kernel/softirq.c:650 [inline]
 irq_exit_rcu+0x41/0x70 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x8d/0xb0 arch/x86/kernel/apic/apic.c:1107
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
 acpi_safe_halt drivers/acpi/processor_idle.c:112 [inline]
 acpi_idle_do_entry drivers/acpi/processor_idle.c:570 [inline]
 acpi_idle_enter+0x283/0x340 drivers/acpi/processor_idle.c:707
 cpuidle_enter_state+0x2de/0x960 drivers/cpuidle/cpuidle.c:239
 cpuidle_enter+0x3c/0x60 drivers/cpuidle/cpuidle.c:356
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x1a7/0x250 kernel/sched/idle.c:303
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:400
 start_secondary+0x78/0x80 arch/x86/kernel/smpboot.c:264
 secondary_startup_64_no_verify+0xcf/0xdb

read to 0xffff888127be5ac8 of 4 bytes by interrupt on cpu 0:
 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+0x67c/0xa80 drivers/net/wireguard/send.c:387
 wg_packet_send_keepalive+0xe4/0x100 drivers/net/wireguard/send.c:239
 wg_expired_send_persistent_keepalive+0x38/0x50 drivers/net/wireguard/timers.c:141
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1700
 expire_timers+0x11f/0x260 kernel/time/timer.c:1751
 __run_timers+0x350/0x400 kernel/time/timer.c:2022
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:2035
 __do_softirq+0xf2/0x2c7 kernel/softirq.c:571
 __irq_exit_rcu kernel/softirq.c:650 [inline]
 irq_exit_rcu+0x41/0x70 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x8d/0xb0 arch/x86/kernel/apic/apic.c:1107
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
 acpi_safe_halt drivers/acpi/processor_idle.c:112 [inline]
 acpi_idle_do_entry drivers/acpi/processor_idle.c:570 [inline]
 acpi_idle_enter+0x283/0x340 drivers/acpi/processor_idle.c:707
 cpuidle_enter_state+0x2de/0x960 drivers/cpuidle/cpuidle.c:239
 cpuidle_enter+0x3c/0x60 drivers/cpuidle/cpuidle.c:356
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x1a7/0x250 kernel/sched/idle.c:303
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:400
 rest_init+0xe8/0xf0 init/main.c:732
 arch_call_rest_init+0x5/0x10 init/main.c:894
 start_kernel+0x59e/0x630 init/main.c:1148
 secondary_startup_64_no_verify+0xcf/0xdb

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.2.0-rc5-syzkaller-00108-g83abd4d4c4be-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
==================================================================

Crashes (508):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2023/01/27 21:48 upstream 83abd4d4c4be 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/26 18:05 upstream 7c46948a6e9c 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/23 10:12 upstream 2475bf0250de 44388686 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/23 04:41 upstream 2475bf0250de cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/21 22:07 upstream f883675bf652 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/21 10:29 upstream edc00350d205 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/20 17:03 upstream d368967cb103 dd15ff29 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/20 05:00 upstream 081edded9b38 71197f3a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/18 20:56 upstream c1649ec55708 4620c2d9 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/18 08:09 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/16 22:02 upstream d532dd102151 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/16 10:41 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/15 09:07 upstream 7c6984405241 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/14 15:38 upstream 97ec4d559d93 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/14 10:19 upstream 97ec4d559d93 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/11 20:12 upstream 7dd4b804e080 96166539 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/10 21:34 upstream 5a41237ad1d4 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/09 22:32 upstream 1fe4fd6f5cad 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/08 18:35 upstream 9b43a525db12 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/07 07:14 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/05 08:50 upstream 512dee0c00ad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/05 00:49 upstream 69b41ac87e4a 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/03 17:37 upstream 69b41ac87e4a f0036e18 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/03 08:27 upstream 69b41ac87e4a ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/02 06:55 upstream 88603b6dc419 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2023/01/02 02:01 upstream e4cf7c25bae5 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/31 23:29 upstream c8451c141e07 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/30 21:02 upstream bff687b3dad6 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/30 06:06 upstream 2258c2dc850b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/27 14:29 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/26 04:14 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/25 01:16 upstream 72a85e2b0a1e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/24 05:09 upstream 51094a24b85e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/23 12:08 upstream 8395ae05cb5a 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/22 21:10 upstream 0a924817d2ed 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/21 22:14 upstream b6bb9676f216 4067838e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/21 10:05 upstream 6feb57c2fd7c d3e76707 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/20 16:14 upstream aeba12b26c79 c52b2efb .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/19 11:06 upstream f9ff5644bcc0 05494336 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/17 12:49 upstream 77856d911a8c 05494336 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/17 04:10 upstream 84e57d292203 05494336 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/16 13:40 upstream 851f657a8642 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/16 01:48 upstream 041fae9c105a 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/14 19:33 upstream e2ca6ba6ba01 b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/14 07:40 upstream 764822972d64 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/13 08:47 upstream 9b93f5069fd9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/13 01:10 upstream 830b3c68c1fb 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/12 08:30 upstream 4cee37b3a4e6 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/12/10 13:43 upstream 3ecc37918c80 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/02/08 02:40 upstream 2ade8eef993c a7dab638 .config console log report info KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2022/01/11 04:05 upstream 133d9c53c9dc ddb0ab8c .config console log report info KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
ci2-upstream-kcsan-gce 2021/11/10 04:03 upstream cb690f5238d7 55fa030c .config console log report info KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets
* Struck through repros no longer work on HEAD.