syzbot


KCSAN: data-race in wg_index_hashtable_insert / wg_index_hashtable_lookup (3)

Status: auto-obsoleted due to no activity on 2024/04/24 09:43
Subsystems: wireguard
[Documentation on labels]
Reported-by: syzbot+d60084d607260679e92b@syzkaller.appspotmail.com
First crash: 279d, last: 258d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_index_hashtable_insert / wg_index_hashtable_lookup wireguard 1 1451d 1451d 0/28 auto-closed as invalid on 2021/01/17 16:47
upstream KCSAN: data-race in wg_index_hashtable_insert / wg_index_hashtable_lookup (4) wireguard 8 45d 159d 0/28 auto-obsoleted due to no activity on 2024/11/23 16:43
upstream KCSAN: data-race in wg_index_hashtable_insert / wg_index_hashtable_lookup (2) wireguard 1 1068d 1068d 0/28 auto-closed as invalid on 2022/02/04 17:58

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

write to 0xffff88810780256c of 4 bytes by task 3262 on cpu 1:
 wg_index_hashtable_insert+0xe2/0x2a0 drivers/net/wireguard/peerlookup.c:132
 wg_noise_handshake_create_response+0x529/0x5d0 drivers/net/wireguard/noise.c:713
 wg_packet_send_handshake_response+0x6e/0x120 drivers/net/wireguard/send.c:94
 wg_receive_handshake_packet drivers/net/wireguard/receive.c:154 [inline]
 wg_packet_handshake_receive_worker+0x3ed/0x5f0 drivers/net/wireguard/receive.c:213
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243

read to 0xffff88810780256c of 4 bytes by task 19426 on cpu 0:
 wg_index_hashtable_lookup+0x5b/0x120 drivers/net/wireguard/peerlookup.c:211
 wg_noise_handshake_consume_response+0x12c/0x720 drivers/net/wireguard/noise.c:747
 wg_receive_handshake_packet drivers/net/wireguard/receive.c:166 [inline]
 wg_packet_handshake_receive_worker+0x3fb/0x5f0 drivers/net/wireguard/receive.c:213
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243

value changed: 0x0fde59f9 -> 0x4881c5a0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 19426 Comm: kworker/0:15 Tainted: G        W          6.8.0-syzkaller-11743-ga4145ce1e7bc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Workqueue: wg-kex-wg1 wg_packet_handshake_receive_worker
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/20 09:42 upstream a4145ce1e7bc a485f239 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_index_hashtable_insert / wg_index_hashtable_lookup
2024/02/28 12:54 upstream cf1182944c7c 55d6f11d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in wg_index_hashtable_insert / wg_index_hashtable_lookup
* Struck through repros no longer work on HEAD.