syzbot


KCSAN: data-race in wg_packet_receive / wg_packet_receive (5)

Status: auto-obsoleted due to no activity on 2023/01/02 14:24
Subsystems: wireguard
[Documentation on labels]
First crash: 523d, last: 523d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_packet_receive / wg_packet_receive wireguard 2 875d 892d 0/26 auto-closed as invalid on 2022/01/05 08:53
upstream KCSAN: data-race in wg_packet_receive / wg_packet_receive (4) wireguard 2 595d 597d 0/26 auto-obsoleted due to no activity on 2022/10/12 22:27
upstream KCSAN: data-race in wg_packet_receive / wg_packet_receive (7) wireguard 1 74d 72d 0/26 auto-obsoleted due to no activity on 2024/03/16 22:23
upstream KCSAN: data-race in wg_packet_receive / wg_packet_receive (3) wireguard 2 688d 693d 0/26 auto-closed as invalid on 2022/07/11 09:31
upstream KCSAN: data-race in wg_packet_receive / wg_packet_receive (6) wireguard 2 430d 468d 0/26 auto-obsoleted due to no activity on 2023/04/07 02:56
upstream KCSAN: data-race in wg_packet_receive / wg_packet_receive (2) wireguard 1 745d 745d 0/26 auto-closed as invalid on 2022/05/15 18:55

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

write to 0xffff88813b49fcc8 of 4 bytes by interrupt on cpu 1:
 wg_cpumask_next_online drivers/net/wireguard/queueing.h:133 [inline]
 wg_packet_receive+0x88b/0x1150 drivers/net/wireguard/receive.c:568
 wg_receive+0x4a/0x70 drivers/net/wireguard/socket.c:326
 udpv6_queue_rcv_one_skb+0xa86/0xb90 net/ipv6/udp.c:728
 udpv6_queue_rcv_skb+0x2d6/0x310 net/ipv6/udp.c:789
 udp6_unicast_rcv_skb+0x16b/0x190 net/ipv6/udp.c:932
 __udp6_lib_rcv+0x84b/0x9b0 net/ipv6/udp.c:1017
 udpv6_rcv+0x1d/0x20 net/ipv6/udp.c:1125
 ip6_protocol_deliver_rcu+0x83f/0xd50 net/ipv6/ip6_input.c:439
 ip6_input_finish net/ipv6/ip6_input.c:484 [inline]
 NF_HOOK include/linux/netfilter.h:302 [inline]
 ip6_input+0xca/0x180 net/ipv6/ip6_input.c:493
 dst_input include/net/dst.h:455 [inline]
 ip6_rcv_finish+0x1e9/0x2d0 net/ipv6/ip6_input.c:79
 NF_HOOK include/linux/netfilter.h:302 [inline]
 ipv6_rcv+0x85/0x140 net/ipv6/ip6_input.c:309
 __netif_receive_skb_one_core net/core/dev.c:5489 [inline]
 __netif_receive_skb+0x8b/0x1b0 net/core/dev.c:5603
 process_backlog+0x23f/0x3b0 net/core/dev.c:5931
 __napi_poll+0x65/0x390 net/core/dev.c:6498
 napi_poll net/core/dev.c:6565 [inline]
 net_rx_action+0x37e/0x730 net/core/dev.c:6676
 __do_softirq+0xf2/0x2c7 kernel/softirq.c:571
 do_softirq+0xb1/0xf0 kernel/softirq.c:472
 __local_bh_enable_ip+0x6f/0x80 kernel/softirq.c:396
 __raw_read_unlock_bh include/linux/rwlock_api_smp.h:257 [inline]
 _raw_read_unlock_bh+0x17/0x20 kernel/locking/spinlock.c:284
 wg_socket_send_skb_to_peer+0x107/0x120 drivers/net/wireguard/socket.c:184
 wg_socket_send_buffer_to_peer+0xd2/0xf0 drivers/net/wireguard/socket.c:200
 wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:40 [inline]
 wg_packet_handshake_send_worker+0x109/0x150 drivers/net/wireguard/send.c:51
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

write to 0xffff88813b49fcc8 of 4 bytes by interrupt on cpu 0:
 wg_cpumask_next_online drivers/net/wireguard/queueing.h:133 [inline]
 wg_packet_receive+0x88b/0x1150 drivers/net/wireguard/receive.c:568
 wg_receive+0x4a/0x70 drivers/net/wireguard/socket.c:326
 udpv6_queue_rcv_one_skb+0xa86/0xb90 net/ipv6/udp.c:728
 udpv6_queue_rcv_skb+0x2d6/0x310 net/ipv6/udp.c:789
 udp6_unicast_rcv_skb+0x16b/0x190 net/ipv6/udp.c:932
 __udp6_lib_rcv+0x84b/0x9b0 net/ipv6/udp.c:1017
 udpv6_rcv+0x1d/0x20 net/ipv6/udp.c:1125
 ip6_protocol_deliver_rcu+0x83f/0xd50 net/ipv6/ip6_input.c:439
 ip6_input_finish net/ipv6/ip6_input.c:484 [inline]
 NF_HOOK include/linux/netfilter.h:302 [inline]
 ip6_input+0xca/0x180 net/ipv6/ip6_input.c:493
 dst_input include/net/dst.h:455 [inline]
 ip6_rcv_finish+0x1e9/0x2d0 net/ipv6/ip6_input.c:79
 NF_HOOK include/linux/netfilter.h:302 [inline]
 ipv6_rcv+0x85/0x140 net/ipv6/ip6_input.c:309
 __netif_receive_skb_one_core net/core/dev.c:5489 [inline]
 __netif_receive_skb+0x8b/0x1b0 net/core/dev.c:5603
 process_backlog+0x23f/0x3b0 net/core/dev.c:5931
 __napi_poll+0x65/0x390 net/core/dev.c:6498
 napi_poll net/core/dev.c:6565 [inline]
 net_rx_action+0x37e/0x730 net/core/dev.c:6676
 __do_softirq+0xf2/0x2c7 kernel/softirq.c:571
 do_softirq+0xb1/0xf0 kernel/softirq.c:472
 __local_bh_enable_ip+0x6f/0x80 kernel/softirq.c:396
 __raw_read_unlock_bh include/linux/rwlock_api_smp.h:257 [inline]
 _raw_read_unlock_bh+0x17/0x20 kernel/locking/spinlock.c:284
 wg_socket_send_skb_to_peer+0x107/0x120 drivers/net/wireguard/socket.c:184
 wg_socket_send_buffer_to_peer+0xd2/0xf0 drivers/net/wireguard/socket.c:200
 wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:40 [inline]
 wg_packet_handshake_send_worker+0x109/0x150 drivers/net/wireguard/send.c:51
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

value changed: 0x00000000 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 16251 Comm: kworker/u4:3 Not tainted 6.1.0-rc5-syzkaller-00144-g84368d882b96-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: wg-kex-wg2 wg_packet_handshake_send_worker
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/18 20:48 upstream 84368d882b96 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_receive / wg_packet_receive
* Struck through repros no longer work on HEAD.