syzbot


KCSAN: data-race in prepare_signal / ptrace_attach (12)

Status: moderation: reported on 2024/12/23 10:01
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+ed249812ebd8b2fe23a4@syzkaller.appspotmail.com
First crash: 3d13h, last: 3d13h
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in prepare_signal / ptrace_attach (5) kernel 2 1253d 1267d 0/28 auto-closed as invalid on 2021/08/26 15:59
upstream KCSAN: data-race in prepare_signal / ptrace_attach kernel 1 1646d 1646d 0/28 auto-closed as invalid on 2020/07/29 00:33
upstream KCSAN: data-race in prepare_signal / ptrace_attach (6) kernel 1 1096d 1096d 0/28 auto-closed as invalid on 2022/01/30 21:35
upstream KCSAN: data-race in prepare_signal / ptrace_attach (2) kernel 3 1570d 1605d 0/28 auto-closed as invalid on 2020/10/13 05:51
upstream KCSAN: data-race in prepare_signal / ptrace_attach (9) kernel 1 418d 381d 0/28 auto-obsoleted due to no activity on 2023/12/25 00:07
upstream KCSAN: data-race in prepare_signal / ptrace_attach (11) kernel 1 261d 261d 0/28 auto-obsoleted due to no activity on 2024/05/14 10:05
upstream KCSAN: data-race in prepare_signal / ptrace_attach (7) kernel 1 1033d 1033d 0/28 auto-closed as invalid on 2022/04/03 14:09
upstream KCSAN: data-race in prepare_signal / ptrace_attach (8) kernel 1 955d 955d 0/28 auto-closed as invalid on 2022/06/20 14:20
upstream KCSAN: data-race in prepare_signal / ptrace_attach (10) kernel 2 307d 332d 0/28 auto-obsoleted due to no activity on 2024/03/29 18:16
upstream KCSAN: data-race in prepare_signal / ptrace_attach (4) kernel 1 1337d 1337d 0/28 auto-closed as invalid on 2021/06/03 07:49
upstream KCSAN: data-race in prepare_signal / ptrace_attach (3) kernel 2 1431d 1466d 0/28 auto-closed as invalid on 2021/03/01 09:38

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

write to 0xffff88811776e330 of 4 bytes by task 10179 on cpu 0:
 ptrace_attach+0x258/0x520 kernel/ptrace.c:462
 __do_sys_ptrace kernel/ptrace.c:1276 [inline]
 __se_sys_ptrace+0x149/0x2b0 kernel/ptrace.c:1258
 __x64_sys_ptrace+0x55/0x70 kernel/ptrace.c:1258
 x64_sys_call+0x2225/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:102
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811776e330 of 4 bytes by task 10180 on cpu 1:
 prepare_signal+0x263/0x670 kernel/signal.c:901
 __send_signal_locked+0x2f/0x780 kernel/signal.c:1052
 send_signal_locked+0x28f/0x3a0 kernel/signal.c:1215
 do_send_sig_info+0x9f/0xf0 kernel/signal.c:1268
 do_send_specific kernel/signal.c:4091 [inline]
 do_tkill kernel/signal.c:4112 [inline]
 __do_sys_tkill kernel/signal.c:4147 [inline]
 __se_sys_tkill+0x135/0x190 kernel/signal.c:4141
 __x64_sys_tkill+0x31/0x40 kernel/signal.c:4141
 x64_sys_call+0x281a/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:201
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000 -> 0x00010001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 10180 Comm: syz.1.2207 Not tainted 6.13.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/23 10:00 upstream 4bbf9020becb b4fbdbd4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in prepare_signal / ptrace_attach
* Struck through repros no longer work on HEAD.