syzbot


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

Status: auto-obsoleted due to no activity on 2024/08/24 22:26
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+a678fcffb9af096f794a@syzkaller.appspotmail.com
First crash: 161d, last: 140d
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 serial 1 1538d 1538d 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 930d 930d 0/28 auto-closed as invalid on 2022/06/27 03:27
upstream KCSAN: data-race in n_tty_close / pty_close (5) serial 1 91d 91d 0/28 auto-obsoleted due to no activity on 2024/10/13 16:18
upstream KCSAN: data-race in n_tty_close / pty_close (3) serial 1 296d 296d 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 0xffff888112dff1d5 of 1 bytes by task 3470 on cpu 1:
 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:222
 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 0xffff888112dff1d5 of 1 bytes by task 3471 on cpu 0:
 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+0x3c6/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+0x1688/0x2e00 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: 0 PID: 3471 Comm: syz.3.82 Not tainted 6.10.0-syzkaller-10729-g3c3ff7be9729 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/20 22:26 upstream 3c3ff7be9729 b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_close / pty_close
2024/07/15 05:54 upstream 0c3836482481 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_close / pty_close
2024/06/30 20:22 upstream 8282d5af7be8 757f06b1 .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.