syzbot


KCSAN: data-race in n_tty_close / pty_close

Status: auto-closed as invalid on 2020/10/27 12:08
Subsystems: serial
[Documentation on labels]
First crash: 1310d, last: 1310d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_close / pty_close (2) serial 1 703d 703d 0/26 auto-closed as invalid on 2022/06/27 03:27
upstream KCSAN: data-race in n_tty_close / pty_close (3) serial 1 69d 69d 0/26 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 0xffff88808d8d59e4 of 2 bytes by task 15619 on cpu 0:
 pty_close+0x153/0x2c0 drivers/tty/pty.c:61
 tty_release+0x255/0xa00 drivers/tty/tty_io.c:1679
 __fput+0x246/0x4d0 fs/file_table.c:281
 ____fput+0x11/0x20 fs/file_table.c:314
 task_work_run+0x8e/0x110 kernel/task_work.c:141
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:165 [inline]
 exit_to_user_mode_prepare+0x1b2/0x210 kernel/entry/common.c:192
 syscall_exit_to_user_mode+0x16/0x30 kernel/entry/common.c:267
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88808d8d59e4 of 2 bytes by task 15627 on cpu 1:
 n_tty_packet_mode_flush drivers/tty/n_tty.c:349 [inline]
 n_tty_close+0x53/0x130 drivers/tty/n_tty.c:1893
 tty_ldisc_close drivers/tty/tty_ldisc.c:489 [inline]
 tty_ldisc_kill drivers/tty/tty_ldisc.c:637 [inline]
 tty_ldisc_hangup+0x363/0x4a0 drivers/tty/tty_ldisc.c:756
 __tty_hangup+0x464/0x610 drivers/tty/tty_io.c:625
 tty_vhangup drivers/tty/tty_io.c:698 [inline]
 tty_ioctl+0x5a1/0xfd0 drivers/tty/tty_io.c:2597
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:739
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:739
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 15627 Comm: syz-executor.5 Not tainted 5.9.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/22 12:02 upstream 98477740630f 3e8f6c27 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.