syzbot


KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (7)

Status: fixed on 2023/12/21 01:43
Subsystems: net
[Documentation on labels]
Fix commit: de5724ca38fd xfrm: fix a data-race in xfrm_lookup_with_ifid()
First crash: 435d, last: 435d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (4) net 2 900d 903d 0/28 auto-closed as invalid on 2022/07/31 19:25
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid net 2 1094d 1097d 0/28 auto-closed as invalid on 2022/01/18 18:58
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (2) net 1 1042d 1042d 0/28 auto-closed as invalid on 2022/03/11 07:39
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (6) net 12 587d 584d 0/28 auto-obsoleted due to no activity on 2023/06/09 19:15
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (5) net 1 848d 848d 0/28 auto-closed as invalid on 2022/09/21 19:30
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (3) net 1 954d 954d 0/28 auto-closed as invalid on 2022/06/07 04:28

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

write to 0xffff88813ea41108 of 8 bytes by task 8150 on cpu 1:
 xfrm_lookup_with_ifid+0xce7/0x12d0 net/xfrm/xfrm_policy.c:3218
 xfrm_lookup net/xfrm/xfrm_policy.c:3270 [inline]
 xfrm_lookup_route+0x3b/0x100 net/xfrm/xfrm_policy.c:3281
 ip6_dst_lookup_flow+0x98/0xc0 net/ipv6/ip6_output.c:1246
 send6+0x241/0x3c0 drivers/net/wireguard/socket.c:139
 wg_socket_send_skb_to_peer+0xbd/0x130 drivers/net/wireguard/socket.c:178
 wg_socket_send_buffer_to_peer+0xd6/0x100 drivers/net/wireguard/socket.c:200
 wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:40 [inline]
 wg_packet_handshake_send_worker+0x10c/0x150 drivers/net/wireguard/send.c:51
 process_one_work kernel/workqueue.c:2630 [inline]
 process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2703
 worker_thread+0x525/0x730 kernel/workqueue.c:2784
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304

write to 0xffff88813ea41108 of 8 bytes by task 15867 on cpu 0:
 xfrm_lookup_with_ifid+0xce7/0x12d0 net/xfrm/xfrm_policy.c:3218
 xfrm_lookup net/xfrm/xfrm_policy.c:3270 [inline]
 xfrm_lookup_route+0x3b/0x100 net/xfrm/xfrm_policy.c:3281
 ip6_dst_lookup_flow+0x98/0xc0 net/ipv6/ip6_output.c:1246
 send6+0x241/0x3c0 drivers/net/wireguard/socket.c:139
 wg_socket_send_skb_to_peer+0xbd/0x130 drivers/net/wireguard/socket.c:178
 wg_socket_send_buffer_to_peer+0xd6/0x100 drivers/net/wireguard/socket.c:200
 wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:40 [inline]
 wg_packet_handshake_send_worker+0x10c/0x150 drivers/net/wireguard/send.c:51
 process_one_work kernel/workqueue.c:2630 [inline]
 process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2703
 worker_thread+0x525/0x730 kernel/workqueue.c:2784
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304

value changed: 0x00000000651cd9d1 -> 0x00000000651cd9d2

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 15867 Comm: kworker/u4:58 Not tainted 6.6.0-rc4-syzkaller-00016-g5e62ed3b1c8a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
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
2023/10/04 03:19 upstream 5e62ed3b1c8a 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid
* Struck through repros no longer work on HEAD.