syzbot


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

Status: moderation: reported on 2024/11/20 07:11
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+3fa209762cb8e7d2e8ce@syzkaller.appspotmail.com
First crash: 23h47m, last: 23h47m
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (4) serial 3 1275d 1321d 0/28 auto-closed as invalid on 2021/06/30 05:54
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (10) serial 3 532d 578d 0/28 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 1 1042d 1042d 0/28 auto-closed as invalid on 2022/02/17 20:31
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (9) serial 1 875d 875d 0/28 auto-closed as invalid on 2022/08/03 23:21
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (6) serial 1 1133d 1133d 0/28 auto-closed as invalid on 2021/11/19 04:32
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p serial 4 1796d 1815d 0/28 auto-closed as invalid on 2020/02/29 07:50
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (11) serial 2 230d 240d 0/28 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 1 1385d 1385d 0/28 auto-closed as invalid on 2021/03/12 04:16
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (7) serial 1 1091d 1091d 0/28 auto-closed as invalid on 2021/12/30 10:24
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (5) serial 1 1223d 1223d 0/28 auto-closed as invalid on 2021/08/21 03:58
upstream KCSAN: data-race in __tty_hangup / tty_hung_up_p (2) serial 1 1567d 1567d 0/28 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 0xffff888115c6d310 of 8 bytes by task 4475 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+0x262/0x280 drivers/tty/pty.c:79
 tty_release+0x206/0x930 drivers/tty/tty_io.c:1754
 __fput+0x17a/0x6d0 fs/file_table.c:450
 ____fput+0x1c/0x30 fs/file_table.c:478
 task_work_run+0x13a/0x1a0 kernel/task_work.c:239
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [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+0xa8/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888115c6d310 of 8 bytes by task 4468 on cpu 0:
 tty_hung_up_p+0x20/0x50 drivers/tty/tty_io.c:739
 n_tty_write+0x2e7/0xb80 drivers/tty/n_tty.c:2383
 iterate_tty_write drivers/tty/tty_io.c:1015 [inline]
 file_tty_write+0x37a/0x680 drivers/tty/tty_io.c:1090
 tty_write+0x28/0x30 drivers/tty/tty_io.c:1111
 new_sync_write fs/read_write.c:586 [inline]
 vfs_write+0x77f/0x920 fs/read_write.c:679
 ksys_write+0xe8/0x1b0 fs/read_write.c:731
 __do_sys_write fs/read_write.c:742 [inline]
 __se_sys_write fs/read_write.c:739 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:739
 x64_sys_call+0x287e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffffffff8569cef8 -> 0xffffffff8569cd90

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4468 Comm: syz.4.354 Tainted: G        W          6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 07:10 upstream bf9aa14fc523 7d02db5a .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.