syzbot


KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll

Status: auto-closed as invalid on 2021/05/20 04:01
Subsystems: wireguard
[Documentation on labels]
Reported-by: syzbot+a35e14c38686fcb3df17@syzkaller.appspotmail.com
First crash: 1496d, last: 1196d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll (2) wireguard 721 125d 897d 26/27 fixed on 2024/04/10 03:59

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

write to 0xffff88802921f088 of 8 bytes by interrupt on cpu 1:
 counter_validate drivers/net/wireguard/receive.c:327 [inline]
 wg_packet_rx_poll+0x406/0x11b0 drivers/net/wireguard/receive.c:467
 __napi_poll+0x65/0x3e0 net/core/dev.c:6912
 napi_poll net/core/dev.c:6979 [inline]
 net_rx_action+0x29f/0x680 net/core/dev.c:7066
 __do_softirq+0x13c/0x2c3 kernel/softirq.c:345
 do_softirq+0x73/0xa0 kernel/softirq.c:248
 __local_bh_enable_ip+0x5a/0x60 kernel/softirq.c:198
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline]
 _raw_spin_unlock_bh+0x33/0x40 kernel/locking/spinlock.c:207
 spin_unlock_bh include/linux/spinlock.h:399 [inline]
 ptr_ring_consume_bh include/linux/ptr_ring.h:367 [inline]
 wg_packet_decrypt_worker+0x732/0x770 drivers/net/wireguard/receive.c:505
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2275
 worker_thread+0x616/0xa70 kernel/workqueue.c:2421
 kthread+0x20b/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

read to 0xffff88802921f088 of 8 bytes by task 9687 on cpu 0:
 decrypt_packet drivers/net/wireguard/receive.c:258 [inline]
 wg_packet_decrypt_worker+0x219/0x770 drivers/net/wireguard/receive.c:507
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2275
 worker_thread+0x616/0xa70 kernel/workqueue.c:2421
 kthread+0x20b/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 9687 Comm: kworker/0:5 Not tainted 5.12.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: wg-crypt-wg0 wg_packet_decrypt_worker
==================================================================

Crashes (253):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/15 04:00 upstream 7f75285ca572 fcdb12ba .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/04/14 13:27 upstream 50987beca096 3134b37f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/04/12 16:10 upstream d434405aaab7 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/04/10 12:48 upstream 4e04e7513b0f 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/04/06 23:54 upstream 2d743660786e 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/04/04 04:51 upstream 2023a53bdf41 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/04/03 04:28 upstream 0a84c2e440f7 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/04/02 19:40 upstream 1678e493d530 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/30 16:53 upstream 2bb25b3a748a 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/28 15:51 upstream 0f4498cef9f5 a8529b82 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/26 14:53 upstream db24726bfefa a8529b82 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/25 14:00 upstream e138138003eb 6a383ecf .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/23 06:34 upstream 0d02ec6b3136 8092f30d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/22 14:01 upstream 5ee96fa9dd78 bea32f74 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/22 01:16 upstream 5ee96fa9dd78 4c9a64da .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/21 03:47 upstream 812da4d39463 17810eae .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/20 01:57 upstream 8b12a62a4e3e 3d01c4de .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/19 12:12 upstream 8b12a62a4e3e 2af9d324 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/18 05:33 upstream 6417f03132a6 fdb2bb2c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/17 03:16 upstream 1df27313f50a fdb2bb2c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/16 08:03 upstream 1a4431a5db2b fdb2bb2c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/15 13:53 upstream 1e28eed17697 cc1cff8f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/13 23:49 upstream 88fe49249c99 4a003785 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/13 11:04 upstream f296bfd5cd04 4a003785 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/11 23:27 upstream 28806e4d9b97 429d8a6b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/11 16:06 upstream a74e6a014c9d c2ca1f2a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/10 20:52 upstream 05a59d79793d 764067f3 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/08 02:14 upstream 144c79ef3353 09fbf400 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/03/04 20:23 upstream cee407c5cc42 f89ed068 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/24 07:33 upstream c03c21ba6f4e fcc6d71b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/23 06:11 upstream b12b47249688 fcc6d71b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/21 06:39 upstream e767b3530acb 3e5ed8b4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/17 22:37 upstream f40ddce88593 14052202 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/17 09:01 upstream f40ddce88593 052f8d9f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/14 20:40 upstream 358feceebbf6 98682e5e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/14 05:51 upstream ac30d8ce28d6 98682e5e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/13 13:34 upstream c6d8570e4d64 98682e5e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/11 18:04 upstream 291009f656e8 a5f86b15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/10 11:08 upstream e0756cfc7d7c 9c8b8541 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/07 09:32 upstream 825b5991a46e 2ce644fc .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/07 00:09 upstream 964d069f93c4 0655e081 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/05 03:18 upstream 5c279c4cf206 23a562df .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/03 04:25 upstream 3aaf0a27ffc2 624dad51 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/02/02 12:22 upstream 88bb507a74ea 19e09687 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll
2021/01/17 11:39 upstream 0da0a8a0a0e1 813be542 .config console log report info ci2-upstream-kcsan-gce
2020/08/17 03:17 upstream 2cc3c4b3c2e9 5ce13532 .config console log report ci2-upstream-kcsan-gce
2020/06/19 16:18 upstream 5e857ce6eae7 123cf502 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.