syzbot


KCSAN: data-race in __ptrace_unlink / ptrace_stop (3)

Status: auto-closed as invalid on 2021/05/17 11:16
Subsystems: kernel
[Documentation on labels]
First crash: 1124d, last: 1124d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __ptrace_unlink / ptrace_stop kernel 1 1542d 1542d 0/26 auto-closed as invalid on 2020/04/14 15:22
upstream KCSAN: data-race in __ptrace_unlink / ptrace_stop (2) kernel 1 1255d 1235d 0/26 auto-closed as invalid on 2020/12/22 11:57
upstream KCSAN: data-race in __ptrace_unlink / ptrace_stop (4) kernel 1 1062d 1062d 0/26 auto-closed as invalid on 2021/07/03 09:14

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

write to 0xffff88810e9b802c of 4 bytes by task 30827 on cpu 0:
 freezer_count include/linux/freezer.h:121 [inline]
 freezable_schedule include/linux/freezer.h:173 [inline]
 ptrace_stop+0x392/0x650 kernel/signal.c:2220
 ptrace_signal kernel/signal.c:2495 [inline]
 get_signal+0x80a/0x14e0 kernel/signal.c:2673
 arch_do_signal_or_restart+0x2a/0x270 arch/x86/kernel/signal.c:789
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x11a/0x1b0 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88810e9b802c of 4 bytes by task 30829 on cpu 1:
 __ptrace_unlink+0x187/0x300 kernel/ptrace.c:144
 __ptrace_detach+0x1b/0x1a0 kernel/ptrace.c:522
 exit_ptrace+0x93/0x160 kernel/ptrace.c:582
 forget_original_parent kernel/exit.c:628 [inline]
 exit_notify kernel/exit.c:668 [inline]
 do_exit+0x11f3/0x15e0 kernel/exit.c:845
 do_group_exit+0xce/0x180 kernel/exit.c:922
 get_signal+0xdce/0x14e0 kernel/signal.c:2777
 arch_do_signal_or_restart+0x2a/0x270 arch/x86/kernel/signal.c:789
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x11a/0x1b0 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 30829 Comm: syz-executor.0 Not tainted 5.12.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/03/28 18:45 upstream 0f4498cef9f5 a8529b82 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __ptrace_unlink / ptrace_stop
* Struck through repros no longer work on HEAD.