syzbot


KCSAN: data-race in n_tty_close / pty_close (5)

Status: auto-obsoleted due to no activity on 2024/10/13 16:18
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+5d616f112e17788f6c58@syzkaller.appspotmail.com
First crash: 103d, last: 103d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_close / pty_close (4) serial 3 153d 173d 0/28 auto-obsoleted due to no activity on 2024/08/24 22:26
upstream KCSAN: data-race in n_tty_close / pty_close serial 1 1550d 1550d 0/28 auto-closed as invalid on 2020/10/27 12:08
upstream KCSAN: data-race in n_tty_close / pty_close (2) serial 1 943d 943d 0/28 auto-closed as invalid on 2022/06/27 03:27
upstream KCSAN: data-race in n_tty_close / pty_close (3) serial 1 309d 309d 0/28 auto-obsoleted due to no activity on 2024/03/21 21:07

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_close / pty_close

write to 0xffff8881155211d5 of 1 bytes by task 5738 on cpu 0:
 pty_close+0x124/0x280 drivers/tty/pty.c:61
 tty_release+0x20c/0x940 drivers/tty/tty_io.c:1760
 __fput+0x192/0x6f0 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:228
 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:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 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 0xffff8881155211d5 of 1 bytes by task 5743 on cpu 1:
 n_tty_packet_mode_flush drivers/tty/n_tty.c:335 [inline]
 n_tty_close+0x58/0x130 drivers/tty/n_tty.c:1896
 tty_ldisc_close drivers/tty/tty_ldisc.c:455 [inline]
 tty_ldisc_kill+0x90/0x140 drivers/tty/tty_ldisc.c:613
 tty_ldisc_hangup+0x2f4/0x370 drivers/tty/tty_ldisc.c:729
 __tty_hangup+0x3c9/0x540 drivers/tty/tty_io.c:630
 tty_vhangup drivers/tty/tty_io.c:700 [inline]
 tty_ioctl+0x613/0xbe0 drivers/tty/tty_io.c:2743
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xd3/0x150 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x15cc/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:17
 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: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5743 Comm: syz.3.810 Not tainted 6.11.0-rc6-syzkaller-00326-gd1f2d51b711a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/08 16:17 upstream d1f2d51b711a 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_close / pty_close
* Struck through repros no longer work on HEAD.