syzbot


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

Status: auto-closed as invalid on 2022/09/21 19:30
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 111d, last: 111d
similar bugs (4):
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) 2 163d 167d 0/24 auto-closed as invalid on 2022/07/31 19:25
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid 2 357d 361d 0/24 auto-closed as invalid on 2022/01/18 18:58
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (2) 1 306d 306d 0/24 auto-closed as invalid on 2022/03/11 07:39
upstream KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid (3) 1 218d 218d 0/24 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 0xffff88813da44508 of 8 bytes by interrupt on cpu 1:
 xfrm_lookup_with_ifid+0x10ca/0x1880 net/xfrm/xfrm_policy.c:3142
 xfrm_lookup+0x33/0x40 net/xfrm/xfrm_policy.c:3194
 icmp6_dst_alloc+0x31d/0x360 net/ipv6/route.c:3281
 ndisc_send_skb+0x160/0x640 net/ipv6/ndisc.c:488
 ndisc_send_rs+0x3c0/0x3f0 net/ipv6/ndisc.c:718
 addrconf_rs_timer+0x1de/0x320 net/ipv6/addrconf.c:3927
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1474
 expire_timers+0x116/0x240 kernel/time/timer.c:1519
 __run_timers+0x350/0x400 kernel/time/timer.c:1790
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:1803
 __do_softirq+0x158/0x2e3 kernel/softirq.c:571
 __irq_exit_rcu kernel/softirq.c:650 [inline]
 irq_exit_rcu+0x41/0x70 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x8d/0xb0 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x16/0x20
 __sanitizer_cov_trace_const_cmp8+0x4/0xa0 kernel/kcov.c:305
 pte_none arch/x86/include/asm/pgtable.h:725 [inline]
 copy_pte_range+0x38f/0xc50 mm/memory.c:1059
 copy_pmd_range mm/memory.c:1171 [inline]
 copy_pud_range mm/memory.c:1208 [inline]
 copy_p4d_range mm/memory.c:1232 [inline]
 copy_page_range+0x5ea/0x8f0 mm/memory.c:1330
 dup_mmap+0x6e0/0xa60 kernel/fork.c:699
 dup_mm+0x7c/0x210 kernel/fork.c:1524
 copy_mm+0xce/0x140 kernel/fork.c:1576
 copy_process+0xdf8/0x2140 kernel/fork.c:2256
 kernel_clone+0x163/0x5c0 kernel/fork.c:2673
 __do_sys_clone kernel/fork.c:2807 [inline]
 __se_sys_clone kernel/fork.c:2791 [inline]
 __x64_sys_clone+0xc3/0xf0 kernel/fork.c:2791
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

write to 0xffff88813da44508 of 8 bytes by interrupt on cpu 0:
 xfrm_lookup_with_ifid+0x10ca/0x1880 net/xfrm/xfrm_policy.c:3142
 xfrm_lookup+0x33/0x40 net/xfrm/xfrm_policy.c:3194
 icmp6_dst_alloc+0x31d/0x360 net/ipv6/route.c:3281
 ndisc_send_skb+0x160/0x640 net/ipv6/ndisc.c:488
 ndisc_send_rs+0x3c0/0x3f0 net/ipv6/ndisc.c:718
 addrconf_rs_timer+0x1de/0x320 net/ipv6/addrconf.c:3927
 call_timer_fn+0x2e/0x240 kernel/time/timer.c:1474
 expire_timers+0x116/0x240 kernel/time/timer.c:1519
 __run_timers+0x350/0x400 kernel/time/timer.c:1790
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:1803
 __do_softirq+0x158/0x2e3 kernel/softirq.c:571
 __irq_exit_rcu kernel/softirq.c:650 [inline]
 irq_exit_rcu+0x41/0x70 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x8d/0xb0 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x16/0x20
 kcsan_setup_watchpoint+0x3e9/0x3f0 kernel/kcsan/core.c:694
 vm_normal_page+0x7f/0x1b0 mm/memory.c:662
 zap_pte_range+0x226/0x1560 mm/memory.c:1433
 zap_pmd_range mm/memory.c:1575 [inline]
 zap_pud_range mm/memory.c:1604 [inline]
 zap_p4d_range mm/memory.c:1625 [inline]
 unmap_page_range+0x3ac/0x730 mm/memory.c:1646
 unmap_single_vma+0x157/0x230 mm/memory.c:1694
 unmap_vmas+0xdf/0x1a0 mm/memory.c:1731
 exit_mmap+0x11f/0x380 mm/mmap.c:3113
 __mmput+0x27/0x1b0 kernel/fork.c:1187
 mmput+0x3d/0x50 kernel/fork.c:1208
 exit_mm+0xdb/0x170 kernel/exit.c:510
 do_exit+0x525/0x16e0 kernel/exit.c:782
 do_group_exit+0xa5/0x160 kernel/exit.c:925
 get_signal+0xf54/0x1020 kernel/signal.c:2857
 arch_do_signal_or_restart+0x87/0x2d0 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:166
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000062fd3fc5 -> 0x0000000062fd3fca

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 28383 Comm: syz-executor.4 Not tainted 5.19.0-syzkaller-13930-g7ebfc85e2cd7-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/08/17 19:21 upstream 7ebfc85e2cd7 4e72d229 .config log report info KCSAN: data-race in xfrm_lookup_with_ifid / xfrm_lookup_with_ifid
* Struck through repros no longer work on HEAD.