syzbot


KCSAN: data-race in __tty_hangup / tty_hung_up_p (14)

Status: moderation: reported on 2025/12/12 04:08
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+eaebebd35f33692566a2@syzkaller.appspotmail.com
First crash: 2d16h, last: 2d16h
Similar bugs (13)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (4) serial 6 3 1663d 1709d 0/29 auto-closed as invalid on 2021/06/30 05:54
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (10) serial 6 3 920d 966d 0/29 auto-obsoleted due to no activity on 2023/07/13 04:28
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (8) serial 6 1 1431d 1431d 0/29 auto-closed as invalid on 2022/02/17 20:31
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (9) serial 6 1 1263d 1263d 0/29 auto-closed as invalid on 2022/08/03 23:21
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (6) serial 6 1 1521d 1521d 0/29 auto-closed as invalid on 2021/11/19 04:32
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p serial 6 4 2185d 2204d 0/29 auto-closed as invalid on 2020/02/29 07:50
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (11) serial 6 2 618d 628d 0/29 auto-obsoleted due to no activity on 2024/05/10 06:45
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (3) serial 6 1 1773d 1773d 0/29 auto-closed as invalid on 2021/03/12 04:16
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (7) serial 6 1 1480d 1480d 0/29 auto-closed as invalid on 2021/12/30 10:24
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (13) serial 6 1 100d 100d 0/29 auto-obsoleted due to no activity on 2025/10/31 11:41
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (12) serial 6 1 389d 389d 0/29 auto-obsoleted due to no activity on 2025/01/15 07:11
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (5) serial 6 1 1611d 1611d 0/29 auto-closed as invalid on 2021/08/21 03:58
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (2) serial 6 1 1955d 1955d 0/29 auto-closed as invalid on 2020/09/11 06:18

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

write to 0xffff88810cbf6d88 of 8 bytes by task 20247 on cpu 1:
 __tty_hangup+0x1ef/0x540 drivers/tty/tty_io.c:612
 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:691
 pty_close+0x2c5/0x2f0 drivers/tty/pty.c:77
 tty_release+0x1ff/0xb10 drivers/tty/tty_io.c:1745
 __fput+0x29b/0x650 fs/file_table.c:468
 ____fput+0x1c/0x30 fs/file_table.c:496
 task_work_run+0x131/0x1a0 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:44 [inline]
 exit_to_user_mode_loop+0x1fe/0x740 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x202/0x2a0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810cbf6d88 of 8 bytes by task 20262 on cpu 0:
 tty_hung_up_p+0x20/0x50 drivers/tty/tty_io.c:736
 n_tty_write+0x2fe/0xbf0 drivers/tty/n_tty.c:2360
 iterate_tty_write drivers/tty/tty_io.c:1006 [inline]
 file_tty_write+0x378/0x690 drivers/tty/tty_io.c:1081
 tty_write+0x25/0x30 drivers/tty/tty_io.c:1102
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x52a/0x960 fs/read_write.c:686
 ksys_write+0xda/0x1a0 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:746
 x64_sys_call+0x2847/0x3000 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd8/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffffffff858a6020 -> 0xffffffff858a5f10

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 20262 Comm: syz.5.5472 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 (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/12 04:07 upstream d358e5254674 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __tty_hangup / tty_hung_up_p
* Struck through repros no longer work on HEAD.