syzbot


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

Status: auto-obsoleted due to no activity on 2024/03/21 21:07
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+e729068abc53bcccc1df@syzkaller.appspotmail.com
First crash: 293d, last: 293d
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 137d 157d 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 1535d 1535d 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 927d 927d 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 88d 88d 0/28 auto-obsoleted due to no activity on 2024/10/13 16:18

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

write to 0xffff8881570195d5 of 1 bytes by task 14559 on cpu 0:
 pty_close+0x124/0x280 drivers/tty/pty.c:61
 tty_release+0x204/0x930 drivers/tty/tty_io.c:1760
 __fput+0x299/0x630 fs/file_table.c:376
 ____fput+0x15/0x20 fs/file_table.c:404
 task_work_run+0x135/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:108 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline]
 syscall_exit_to_user_mode+0xbd/0x130 kernel/entry/common.c:212
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881570195d5 of 1 bytes by task 14562 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:1886
 tty_ldisc_close drivers/tty/tty_ldisc.c:455 [inline]
 tty_ldisc_kill+0x8d/0x130 drivers/tty/tty_ldisc.c:607
 tty_ldisc_hangup+0x2e0/0x360 drivers/tty/tty_ldisc.c:723
 __tty_hangup+0x3c6/0x530 drivers/tty/tty_io.c:630
 tty_vhangup drivers/tty/tty_io.c:700 [inline]
 tty_ioctl+0x60a/0xbc0 drivers/tty/tty_io.c:2743
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:857
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14562 Comm: syz-executor.1 Not tainted 6.8.0-rc4-syzkaller-00180-g4f5e5092fdbf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/15 21:06 upstream 4f5e5092fdbf fd39cf6f .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.