syzbot


KCSAN: data-race in do_wait / ptrace_check_attach

Status: closed as invalid on 2019/11/19 13:44
Subsystems: kasan
[Documentation on labels]
First crash: 1641d, last: 1641d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in do_wait / ptrace_check_attach (2) kasan 36 1406d 1557d 0/26 closed as invalid on 2020/06/18 14:24

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

write to 0xffff8880b3cbe0d0 of 8 bytes by task 4708 on cpu 1:
 do_wait+0x1f9/0x4c0 kernel/exit.c:1490
 kernel_wait4+0x156/0x240 kernel/exit.c:1639
 __do_sys_wait4+0xea/0x100 kernel/exit.c:1651
 __se_sys_wait4 kernel/exit.c:1647 [inline]
 __x64_sys_wait4+0x5e/0x80 kernel/exit.c:1647
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880b3cbe0d0 of 8 bytes by task 4711 on cpu 0:
 ptrace_freeze_traced kernel/ptrace.c:182 [inline]
 ptrace_check_attach+0x14b/0x270 kernel/ptrace.c:247
 __do_sys_ptrace kernel/ptrace.c:1267 [inline]
 __se_sys_ptrace kernel/ptrace.c:1237 [inline]
 __x64_sys_ptrace+0x104/0x220 kernel/ptrace.c:1237
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 4711 Comm: syz-executor.5 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4711 Comm: syz-executor.5 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0xf5/0x159 lib/dump_stack.c:113
 panic+0x210/0x640 kernel/panic.c:221
 kcsan_report.cold+0xc/0x10 kernel/kcsan/report.c:302
 __kcsan_setup_watchpoint+0x32e/0x4a0 kernel/kcsan/core.c:411
 __tsan_read8 kernel/kcsan/kcsan.c:36 [inline]
 __tsan_read8+0x2c/0x30 kernel/kcsan/kcsan.c:36
 ptrace_freeze_traced kernel/ptrace.c:182 [inline]
 ptrace_check_attach+0x14b/0x270 kernel/ptrace.c:247
 __do_sys_ptrace kernel/ptrace.c:1267 [inline]
 __se_sys_ptrace kernel/ptrace.c:1237 [inline]
 __x64_sys_ptrace+0x104/0x220 kernel/ptrace.c:1237
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x459f39
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f13cf08ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000065
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459f39
RDX: 0000000000000000 RSI: 00000000000002b2 RDI: 0000000000000018
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f13cf08f6d4
R13: 00000000004c76c7 R14: 00000000004dd1d8 R15: 00000000ffffffff
Shutting down cpus with NMI
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/27 03:02 https://github.com/google/ktsan.git kcsan 05f2236801fe 25bb509e .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.