syzbot


KCSAN: data-race in do_notify_parent_cldstop / prepare_signal (7)

Status: auto-obsoleted due to no activity on 2024/01/09 18:17
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+5b6c305f1d6cd51e4ad4@syzkaller.appspotmail.com
First crash: 78d, last: 78d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in do_notify_parent_cldstop / prepare_signal (2) kernel 1 1278d 1278d 0/26 auto-closed as invalid on 2020/09/26 16:47
upstream KCSAN: data-race in do_notify_parent_cldstop / prepare_signal (5) kernel 3 677d 709d 0/26 auto-closed as invalid on 2022/05/20 20:48
upstream KCSAN: data-race in do_notify_parent_cldstop / prepare_signal kernel 1 1331d 1331d 0/26 auto-closed as invalid on 2020/08/05 00:26
upstream KCSAN: data-race in do_notify_parent_cldstop / prepare_signal (4) kernel 1 870d 870d 0/26 auto-closed as invalid on 2021/11/08 08:53
upstream KCSAN: data-race in do_notify_parent_cldstop / prepare_signal (6) kernel 2 212d 218d 0/26 auto-obsoleted due to no activity on 2023/08/29 03:36
upstream KCSAN: data-race in do_notify_parent_cldstop / prepare_signal (3) kernel 1 1163d 1163d 0/26 auto-closed as invalid on 2021/01/19 10:47

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

write to 0xffff888100e43660 of 4 bytes by interrupt on cpu 1:
 prepare_signal+0x3e2/0x660 kernel/signal.c:972
 send_sigqueue+0x141/0x450 kernel/signal.c:2001
 posix_timer_event kernel/time/posix-timers.c:298 [inline]
 posix_timer_fn+0xdb/0x1e0 kernel/time/posix-timers.c:324
 __run_hrtimer kernel/time/hrtimer.c:1688 [inline]
 __hrtimer_run_queues+0x217/0x700 kernel/time/hrtimer.c:1752
 hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1814
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
 __sysvec_apic_timer_interrupt+0x52/0x190 arch/x86/kernel/apic/apic.c:1082
 sysvec_apic_timer_interrupt+0x31/0x80 arch/x86/kernel/apic/apic.c:1076
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
 __sanitizer_cov_trace_pc+0x8/0x60 kernel/kcov.c:203
 ___neigh_lookup_noref include/net/neighbour.h:307 [inline]
 __ipv4_neigh_lookup_noref include/net/arp.h:27 [inline]
 ip_neigh_gw4+0x11f/0x170 include/net/route.h:366
 ip_neigh_for_gw include/net/route.h:386 [inline]
 ip_finish_output2+0x83f/0x880 net/ipv4/ip_output.c:229
 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:323
 NF_HOOK_COND include/linux/netfilter.h:303 [inline]
 ip_output+0xab/0x170 net/ipv4/ip_output.c:433
 dst_output include/net/dst.h:451 [inline]
 ip_local_out+0x64/0x80 net/ipv4/ip_output.c:129
 igmpv3_sendpack+0x101/0x200 net/ipv4/igmp.c:427
 igmpv3_send_cr net/ipv4/igmp.c:723 [inline]
 igmp_ifc_timer_expire+0x5db/0x900 net/ipv4/igmp.c:813
 call_timer_fn+0x37/0x2f0 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x46c/0x650 kernel/time/timer.c:2022
 run_timer_softirq+0x1d/0x40 kernel/time/timer.c:2035
 __do_softirq+0xc4/0x279 kernel/softirq.c:553
 invoke_softirq kernel/softirq.c:427 [inline]
 __irq_exit_rcu kernel/softirq.c:632 [inline]
 irq_exit_rcu+0x3b/0x90 kernel/softirq.c:644
 sysvec_apic_timer_interrupt+0x6d/0x80 arch/x86/kernel/apic/apic.c:1076
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
 should_watch kernel/kcsan/core.c:277 [inline]
 check_access kernel/kcsan/core.c:752 [inline]
 __tsan_read8+0x103/0x180 kernel/kcsan/core.c:1025
 __tlb_adjust_range include/asm-generic/tlb.h:360 [inline]
 tlb_flush_pte_range include/asm-generic/tlb.h:569 [inline]
 zap_pte_range mm/memory.c:1443 [inline]
 zap_pmd_range mm/memory.c:1582 [inline]
 zap_pud_range mm/memory.c:1611 [inline]
 zap_p4d_range mm/memory.c:1632 [inline]
 unmap_page_range+0x723/0x1d10 mm/memory.c:1653
 unmap_single_vma+0x142/0x1d0 mm/memory.c:1699
 unmap_vmas+0x18d/0x280 mm/memory.c:1743
 exit_mmap+0x167/0x640 mm/mmap.c:3308
 __mmput+0x28/0x1c0 kernel/fork.c:1349
 mmput+0x4c/0x60 kernel/fork.c:1371
 exit_mm+0xe3/0x180 kernel/exit.c:567
 do_exit+0x585/0x16d0 kernel/exit.c:858
 do_group_exit+0x141/0x150 kernel/exit.c:1021
 __do_sys_exit_group kernel/exit.c:1032 [inline]
 __se_sys_exit_group kernel/exit.c:1030 [inline]
 __x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1030
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888100e43660 of 4 bytes by task 20354 on cpu 0:
 do_notify_parent_cldstop+0x192/0x290 kernel/signal.c:2195
 do_signal_stop+0x54f/0x5f0 kernel/signal.c:2516
 get_signal+0x776/0x10a0 kernel/signal.c:2751
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296
 do_syscall_64+0x50/0x110 arch/x86/entry/common.c:88
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000014 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 20354 Comm: syz-executor.0 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/05 09:42 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in do_notify_parent_cldstop / prepare_signal
* Struck through repros no longer work on HEAD.