syzbot


KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint (6)

Status: moderation: reported on 2026/04/17 15:48
Subsystems: wireguard
[Documentation on labels]
Reported-by: syzbot+b943b311fce5e5f92a7a@syzkaller.appspotmail.com
First crash: 5d02h, last: 5d02h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
9a42b976-7ffe-444f-9fd4-e1c437fc8274 assessment-kcsan Benign: ✅  Confident: ✅  KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint (6) 2026/04/13 15:38 2026/04/13 15:38 2026/04/13 15:58 1a086e7c785fa4decf3678c4237591fa6fad1621
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint (2) wireguard 6 1 608d 608d 0/29 auto-obsoleted due to no activity on 2024/09/22 04:23
upstream KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint (3) wireguard 6 1 444d 444d 0/29 auto-obsoleted due to no activity on 2025/03/26 00:12
upstream KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint wireguard 6 2 712d 720d 0/29 auto-obsoleted due to no activity on 2024/06/10 05:06
upstream KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint (4) wireguard 6 2 332d 341d 0/29 auto-obsoleted due to no activity on 2025/07/16 14:38
upstream KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint (5) wireguard 6 3 122d 102d 0/29 auto-obsoleted due to no activity on 2026/02/10 21:40

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

write to 0xffff88811afc9414 of 4 bytes by task 3424 on cpu 1:
 wg_socket_set_peer_endpoint+0x3d2/0x440 drivers/net/wireguard/socket.c:286
 wg_socket_set_peer_endpoint_from_skb+0x6d/0xa0 drivers/net/wireguard/socket.c:305
 wg_receive_handshake_packet drivers/net/wireguard/receive.c:150 [inline]
 wg_packet_handshake_receive_worker+0x3c4/0x5d0 drivers/net/wireguard/receive.c:213
 process_one_work kernel/workqueue.c:3288 [inline]
 process_scheduled_works+0x513/0xa10 kernel/workqueue.c:3371
 worker_thread+0x58a/0x780 kernel/workqueue.c:3452
 kthread+0x22a/0x280 kernel/kthread.c:436
 ret_from_fork+0x150/0x360 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff88811afc9414 of 4 bytes by task 3578 on cpu 0:
 endpoint_eq drivers/net/wireguard/socket.c:263 [inline]
 wg_socket_set_peer_endpoint+0x270/0x440 drivers/net/wireguard/socket.c:281
 wg_socket_set_peer_endpoint_from_skb+0x6d/0xa0 drivers/net/wireguard/socket.c:305
 wg_receive_handshake_packet drivers/net/wireguard/receive.c:172 [inline]
 wg_packet_handshake_receive_worker+0x3f1/0x5d0 drivers/net/wireguard/receive.c:213
 process_one_work kernel/workqueue.c:3288 [inline]
 process_scheduled_works+0x513/0xa10 kernel/workqueue.c:3371
 worker_thread+0x58a/0x780 kernel/workqueue.c:3452
 kthread+0x22a/0x280 kernel/kthread.c:436
 ret_from_fork+0x150/0x360 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

value changed: 0x00000000 -> 0x0100007f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3578 Comm: kworker/0:6 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Workqueue: wg-kex-wg2 wg_packet_handshake_receive_worker
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/13 15:38 upstream 028ef9c96e96 9530ccf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint
* Struck through repros no longer work on HEAD.