syzbot


KCSAN: data-race in futex_wait_queue_me / ptrace_attach

Status: auto-closed as invalid on 2020/03/26 14:54
Subsystems: kasan
[Documentation on labels]
First crash: 1559d, last: 1559d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in futex_wait_queue_me / ptrace_attach (2) kasan 1 1462d 1462d 0/26 auto-closed as invalid on 2020/06/18 13:13
upstream KCSAN: data-race in futex_wait_queue_me / ptrace_attach (3) kernel 1 1338d 1338d 0/26 auto-closed as invalid on 2020/09/28 13:37
upstream KCSAN: data-race in futex_wait_queue_me / ptrace_attach (4) kernel 1 1186d 1186d 0/26 auto-closed as invalid on 2021/02/27 10:07
upstream KCSAN: data-race in futex_wait_queue_me / ptrace_attach (5) kernel 1 1076d 1076d 0/26 auto-closed as invalid on 2021/06/16 19:26

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

read to 0xffff88812107a0a4 of 4 bytes by task 25367 on cpu 0:
 ptrace_attach+0xd7/0x480 kernel/ptrace.c:379
 __do_sys_ptrace kernel/ptrace.c:1257 [inline]
 __se_sys_ptrace kernel/ptrace.c:1237 [inline]
 __x64_sys_ptrace+0x22c/0x270 kernel/ptrace.c:1237
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88812107a0a4 of 4 bytes by task 25344 on cpu 1:
 freezer_do_not_count include/linux/freezer.h:109 [inline]
 freezable_schedule include/linux/freezer.h:171 [inline]
 futex_wait_queue_me+0x17d/0x290 kernel/futex.c:2704
 futex_wait+0x19b/0x3f0 kernel/futex.c:2810
 do_futex+0xe9/0x18d0 kernel/futex.c:3881
 __do_sys_futex kernel/futex.c:3942 [inline]
 __se_sys_futex kernel/futex.c:3910 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3910
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 25344 Comm: syz-executor.4 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 25344 Comm: syz-executor.4 Not tainted 5.5.0-rc1-syzkaller #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+0x11d/0x181 lib/dump_stack.c:118
 panic+0x210/0x640 kernel/panic.c:221
 kcsan_report.cold+0xc/0xd kernel/kcsan/report.c:313
 kcsan_setup_watchpoint+0x3fe/0x460 kernel/kcsan/core.c:416
 check_access kernel/kcsan/core.c:459 [inline]
 __tsan_unaligned_write4+0xc7/0x110 kernel/kcsan/core.c:588
 freezer_do_not_count include/linux/freezer.h:109 [inline]
 freezable_schedule include/linux/freezer.h:171 [inline]
 futex_wait_queue_me+0x17d/0x290 kernel/futex.c:2704
 futex_wait+0x19b/0x3f0 kernel/futex.c:2810
 do_futex+0xe9/0x18d0 kernel/futex.c:3881
 __do_sys_futex kernel/futex.c:3942 [inline]
 __se_sys_futex kernel/futex.c:3910 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3910
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45aff9
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:00007ffc69bd63d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00000000000003e8 RCX: 000000000045aff9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075c07c
RBP: 000000000000002d R08: ffffffffffffffff R09: ffffffffffffffff
R10: 00007ffc69bd64b0 R11: 0000000000000246 R12: 000000000075c070
R13: 00000000001233a4 R14: 00000000001233d1 R15: 000000000075c07c
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
2020/01/16 14:52 https://github.com/google/ktsan.git kcsan 245a43005292 3de7aabb .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.