syzbot


KCSAN: data-race in futex_wait_queue_me / task_set_jobctl_pending

Status: closed as invalid on 2019/11/19 14:04
Subsystems: kasan
[Documentation on labels]
First crash: 1653d, last: 1640d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in futex_wait_queue_me / task_set_jobctl_pending (2) kernel 49 1444d 1616d 0/26 closed as invalid on 2020/06/18 14:24

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

read to 0xffff88810cea6064 of 4 bytes by task 26847 on cpu 0:
 task_set_jobctl_pending+0x9c/0x180 kernel/signal.c:291
 do_signal_stop+0x40e/0x500 kernel/signal.c:2349
 get_signal+0x61b/0x1320 kernel/signal.c:2694
 do_signal+0x3b/0xbf0 arch/x86/kernel/signal.c:815
 exit_to_usermode_loop+0x250/0x2c0 arch/x86/entry/common.c:159
 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:274 [inline]
 do_syscall_64+0x353/0x370 arch/x86/entry/common.c:300
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88810cea6064 of 4 bytes by task 26842 on cpu 1:
 freezer_count include/linux/freezer.h:121 [inline]
 freezable_schedule include/linux/freezer.h:173 [inline]
 futex_wait_queue_me+0x1a2/0x290 kernel/futex.c:2627
 futex_wait+0x19b/0x3f0 kernel/futex.c:2733
 do_futex+0xe9/0x18d0 kernel/futex.c:3644
 __do_sys_futex kernel/futex.c:3705 [inline]
 __se_sys_futex kernel/futex.c:3673 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3673
 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: 1 PID: 26842 Comm: syz-executor.3 Not tainted 5.4.0-rc6+ #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: 26842 Comm: syz-executor.3 Not tainted 5.4.0-rc6+ #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/0xe kernel/kcsan/report.c:302
 kcsan_setup_watchpoint+0x3fe/0x410 kernel/kcsan/core.c:357
 check_access kernel/kcsan/core.c:409 [inline]
 __tsan_unaligned_write4+0x143/0x1f0 kernel/kcsan/core.c:529
 freezer_count include/linux/freezer.h:121 [inline]
 freezable_schedule include/linux/freezer.h:173 [inline]
 futex_wait_queue_me+0x1a2/0x290 kernel/futex.c:2627
 futex_wait+0x19b/0x3f0 kernel/futex.c:2733
 do_futex+0xe9/0x18d0 kernel/futex.c:3644
 __do_sys_futex kernel/futex.c:3705 [inline]
 __se_sys_futex kernel/futex.c:3673 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3673
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45a219
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:00007ffe9e564ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00000000000003e8 RCX: 000000000045a219
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075c07c
RBP: 000000000000002d R08: ffffffffffffffff R09: ffffffffffffffff
R10: 00007ffe9e564dc0 R11: 0000000000000246 R12: 000000000075c070
R13: 00000000000e9d6a R14: 00000000000e9d97 R15: 000000000075c07c
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/07 06:21 https://github.com/google/ktsan.git kcsan 94c006602e13 d797d201 .config console log report ci2-upstream-kcsan-gce
2019/11/04 20:14 https://github.com/google/ktsan.git kcsan 94c006602e13 18e12644 .config console log report ci2-upstream-kcsan-gce
2019/11/04 12:30 https://github.com/google/ktsan.git kcsan 05f2236801fe 18e12644 .config console log report ci2-upstream-kcsan-gce
2019/10/26 14:11 https://github.com/google/ktsan.git kcsan 05f2236801fe 25bb509e .config console log report ci2-upstream-kcsan-gce
2019/10/25 12:07 https://github.com/google/ktsan.git kcsan 05f2236801fe 04ca72cd .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.