[moderation] [wireguard?] KCSAN: data-race in wg_socket_set_peer_endpoint / wg_socket_set_peer_endpoint (6)

3 views
Skip to first unread message

syzbot

unread,
11:48 AM (3 hours ago) 11:48 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 028ef9c96e96 Linux 7.0
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1626db02580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3a78dd265deac3a9
dashboard link: https://syzkaller.appspot.com/bug?extid=b943b311fce5e5f92a7a
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
CC: [Ja...@zx2c4.com andrew...@lunn.ch da...@davemloft.net edum...@google.com ku...@kernel.org linux-...@vger.kernel.org net...@vger.kernel.org pab...@redhat.com wire...@lists.zx2c4.com]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6800b4bac3ba/disk-028ef9c9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/843f60cf11ac/vmlinux-028ef9c9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d99bfdfd0e66/bzImage-028ef9c9.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b943b3...@syzkaller.appspotmail.com

==================================================================
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
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages