syzbot


KCSAN: data-race in __set_task_comm / strlen

Status: moderation: reported on 2025/09/09 23:32
Subsystems: mm fs
[Documentation on labels]
Reported-by: syzbot+cfff6bf0b01901fca878@syzkaller.appspotmail.com
First crash: 141d, last: 3d20h

Sample crash report:
EXT4-fs (loop5): 2 truncates cleaned up
EXT4-fs (loop5): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
==================================================================
BUG: KCSAN: data-race in __set_task_comm / strlen

write to 0xffff888109af6a78 of 10 bytes by task 15209 on cpu 1:
 __set_task_comm+0x4d/0x140 fs/exec.c:1088
 __do_sys_prctl kernel/sys.c:2592 [inline]
 __se_sys_prctl+0xb38/0x12e0 kernel/sys.c:2518
 __x64_sys_prctl+0x67/0x80 kernel/sys.c:2518
 x64_sys_call+0x21b8/0x3000 arch/x86/include/generated/asm/syscalls_64.h:158
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc0/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888109af6a7f of 1 bytes by task 15198 on cpu 0:
 strlen+0x19/0x40 lib/string.c:420
 __fortify_strlen include/linux/fortify-string.h:268 [inline]
 trace_event_get_offsets_sched_stat_runtime include/trace/events/sched.h:553 [inline]
 do_perf_trace_sched_stat_runtime include/trace/events/sched.h:553 [inline]
 perf_trace_sched_stat_runtime+0x48/0x150 include/trace/events/sched.h:553
 __do_trace_sched_stat_runtime include/trace/events/sched.h:576 [inline]
 trace_sched_stat_runtime include/trace/events/sched.h:576 [inline]
 update_se+0x12d/0x150 kernel/sched/fair.c:1159
 update_curr+0x2c/0x150 kernel/sched/fair.c:1209
 enqueue_entity kernel/sched/fair.c:5228 [inline]
 enqueue_task_fair+0x145/0x960 kernel/sched/fair.c:6932
 enqueue_task kernel/sched/core.c:2094 [inline]
 activate_task+0x59/0xb0 kernel/sched/core.c:2135
 ttwu_do_activate+0x6c/0x210 kernel/sched/core.c:3631
 ttwu_queue kernel/sched/core.c:3894 [inline]
 try_to_wake_up+0x389/0x630 kernel/sched/core.c:4218
 wake_up_process kernel/sched/core.c:4349 [inline]
 wake_up_q+0x48/0x80 kernel/sched/core.c:1087
 futex_wake+0x304/0x380 kernel/futex/waitwake.c:198
 do_futex+0x323/0x380 kernel/futex/syscalls.c:135
 __do_sys_futex kernel/futex/syscalls.c:207 [inline]
 __se_sys_futex+0x2f6/0x370 kernel/futex/syscalls.c:188
 __x64_sys_futex+0x78/0x90 kernel/futex/syscalls.c:188
 x64_sys_call+0x2bc2/0x3000 arch/x86/include/generated/asm/syscalls_64.h:203
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc0/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x63 -> 0x39

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 15198 Comm: syz.5.3930 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/25 14:37 upstream d91a46d6805a 40acda8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
2026/01/24 13:43 upstream 62085877ae65 40acda8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
2025/12/04 08:48 upstream 8f7aa3d3c732 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
2025/11/26 12:02 upstream 30f09200cc4a 64219f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
2025/10/26 18:40 upstream dbfc6422a34d c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
2025/10/25 20:36 upstream 566771afc7a8 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
2025/10/24 14:57 upstream 6fab32bb6508 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
2025/09/09 23:31 upstream 9dd1835ecda5 d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __set_task_comm / strlen
* Struck through repros no longer work on HEAD.