syzbot


KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets (4)

Status: auto-obsoleted due to no activity on 2023/10/14 08:22
Subsystems: wireguard
[Documentation on labels]
First crash: 236d, last: 236d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets (2) wireguard 1 1240d 1240d 0/26 auto-closed as invalid on 2021/01/13 19:06
upstream KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets (7) wireguard 1 41d 41d 0/26 auto-obsoleted due to no activity on 2024/04/26 17:49
upstream KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets (5) wireguard 1 193d 193d 0/26 auto-obsoleted due to no activity on 2023/11/26 10:20
upstream KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets wireguard 1 1301d 1301d 0/26 auto-closed as invalid on 2020/11/13 10:47
upstream KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets (3) wireguard 1 520d 511d 0/26 auto-obsoleted due to no activity on 2023/01/03 22:04
upstream KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets (6) wireguard 1 113d 111d 0/26 auto-obsoleted due to no activity on 2024/02/14 17:18

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

write to 0xffff888136af7300 of 8 bytes by interrupt on cpu 1:
 __skb_queue_head_init include/linux/skbuff.h:2162 [inline]
 skb_queue_splice_init include/linux/skbuff.h:2248 [inline]
 wg_packet_send_staged_packets+0xec/0xad0 drivers/net/wireguard/send.c:350
 wg_xmit+0x5cb/0x680 drivers/net/wireguard/device.c:218
 __netdev_start_xmit include/linux/netdevice.h:4889 [inline]
 netdev_start_xmit include/linux/netdevice.h:4903 [inline]
 xmit_one net/core/dev.c:3544 [inline]
 dev_hard_start_xmit+0x11b/0x3f0 net/core/dev.c:3560
 __dev_queue_xmit+0xeee/0x1de0 net/core/dev.c:4340
 dev_queue_xmit include/linux/netdevice.h:3082 [inline]
 neigh_connected_output+0x231/0x2a0 net/core/neighbour.c:1581
 neigh_output include/net/neighbour.h:542 [inline]
 ip6_finish_output2+0x9be/0xc50 net/ipv6/ip6_output.c:135
 __ip6_finish_output net/ipv6/ip6_output.c:196 [inline]
 ip6_finish_output+0x3a0/0x4f0 net/ipv6/ip6_output.c:207
 NF_HOOK_COND include/linux/netfilter.h:293 [inline]
 ip6_output+0xeb/0x220 net/ipv6/ip6_output.c:228
 dst_output include/net/dst.h:458 [inline]
 NF_HOOK include/linux/netfilter.h:304 [inline]
 ndisc_send_skb+0x4d2/0x6b0 net/ipv6/ndisc.c:509
 ndisc_send_rs+0x3ab/0x3e0 net/ipv6/ndisc.c:719
 addrconf_rs_timer+0x1ce/0x2f0 net/ipv6/addrconf.c:3973
 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:553
 invoke_softirq kernel/softirq.c:427 [inline]
 __irq_exit_rcu kernel/softirq.c:632 [inline]
 irq_exit_rcu+0x3b/0x90 kernel/softirq.c:644
 sysvec_apic_timer_interrupt+0x6d/0x80 arch/x86/kernel/apic/apic.c:1074
 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:707
 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+0x82/0x90 arch/x86/kernel/smpboot.c:326
 secondary_startup_64_no_verify+0x167/0x16b

read to 0xffff888136af7300 of 8 bytes by interrupt on cpu 0:
 skb_queue_empty include/linux/skbuff.h:1798 [inline]
 wg_packet_send_keepalive+0x20/0x100 drivers/net/wireguard/send.c:225
 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:553
 invoke_softirq kernel/softirq.c:427 [inline]
 __irq_exit_rcu kernel/softirq.c:632 [inline]
 irq_exit_rcu+0x3b/0x90 kernel/softirq.c:644
 sysvec_apic_timer_interrupt+0x6d/0x80 arch/x86/kernel/apic/apic.c:1074
 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:707
 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:726
 arch_call_rest_init+0x9/0x10 init/main.c:823
 start_kernel+0x57d/0x5d0 init/main.c:1068
 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+0x167/0x16b

value changed: 0xffff888136af7300 -> 0xffff88813c01f200

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.5.0-syzkaller-12796-g32bf43e4efdb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/09 08:14 upstream 32bf43e4efdb 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_send_keepalive / wg_packet_send_staged_packets
* Struck through repros no longer work on HEAD.