syzbot


KCSAN: data-race in __tty_hangup / filp_flush

Status: moderation: reported on 2025/04/03 14:25
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+05bc8aebf378cee2fd49@syzkaller.appspotmail.com
First crash: 22h57m, last: 22h57m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __tty_hangup / filp_flush

write to 0xffff888103acc248 of 8 bytes by task 19859 on cpu 1:
 __tty_hangup+0x1d6/0x530 drivers/tty/tty_io.c:615
 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:694
 pty_close+0x260/0x280 drivers/tty/pty.c:79
 tty_release+0x204/0x940 drivers/tty/tty_io.c:1754
 __fput+0x2ac/0x640 fs/file_table.c:465
 ____fput+0x1c/0x30 fs/file_table.c:493
 task_work_run+0x13c/0x1b0 kernel/task_work.c:227
 get_signal+0xee2/0x1080 kernel/signal.c:2807
 arch_do_signal_or_restart+0x9a/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x62/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888103acc248 of 8 bytes by task 19863 on cpu 0:
 filp_flush+0x51/0x120 fs/open.c:1540
 filp_close+0x1e/0x40 fs/open.c:1554
 close_files fs/file.c:479 [inline]
 put_files_struct+0x120/0x210 fs/file.c:494
 exit_files+0x65/0x80 fs/file.c:511
 do_exit+0x584/0x17e0 kernel/exit.c:948
 do_group_exit+0x102/0x150 kernel/exit.c:1102
 get_signal+0xf35/0x1080 kernel/signal.c:3034
 arch_do_signal_or_restart+0x9a/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x62/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffffffff8589e418 -> 0xffffffff8589e2b0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 19863 Comm: syz.8.5692 Not tainted 6.14.0-syzkaller-12886-ga1b5bd45d4ee #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/03 14:24 upstream a1b5bd45d4ee 996a9618 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tty_hangup / filp_flush
* Struck through repros no longer work on HEAD.