syzbot


KCSAN: data-race in n_tty_write / tty_set_termios (5)

Status: auto-closed as invalid on 2021/06/22 15:42
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 460d, last: 458d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_write / tty_set_termios (3) 1 659d 659d 0/23 auto-closed as invalid on 2020/12/02 18:50
upstream KCSAN: data-race in n_tty_write / tty_set_termios (4) 3 568d 618d 0/23 auto-closed as invalid on 2021/03/04 08:49
upstream KCSAN: data-race in n_tty_write / tty_set_termios (2) 1 724d 724d 0/23 auto-closed as invalid on 2020/09/29 07:57
upstream KCSAN: data-race in n_tty_write / tty_set_termios (6) 8 286d 405d 0/23 auto-closed as invalid on 2021/12/10 21:01
upstream KCSAN: data-race in n_tty_write / tty_set_termios 1 786d 786d 0/23 auto-closed as invalid on 2020/07/29 04:13
upstream KCSAN: data-race in n_tty_write / tty_set_termios (7) 4 168d 206d 0/23 auto-closed as invalid on 2022/04/07 21:37

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_write / tty_set_termios

write to 0xffff8881029aed1c of 4 bytes by task 31666 on cpu 0:
 unset_locked_termios drivers/tty/tty_ioctl.c:254 [inline]
 tty_set_termios+0x1c2/0x8a0 drivers/tty/tty_ioctl.c:331
 set_termios+0x375/0x3b0 drivers/tty/tty_ioctl.c:414
 tty_mode_ioctl+0x573/0x670 drivers/tty/tty_ioctl.c:725
 n_tty_ioctl_helper+0x8b/0x4c0 drivers/tty/tty_ioctl.c:883
 n_tty_ioctl+0x102/0x200 drivers/tty/n_tty.c:2487
 tty_ioctl+0xa8f/0x1120 drivers/tty/tty_io.c:2814
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:1069 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881029aed1c of 4 bytes by task 11311 on cpu 1:
 n_tty_write+0x86/0xaf0 drivers/tty/n_tty.c:2331
 do_tty_write drivers/tty/tty_io.c:1043 [inline]
 file_tty_write+0x409/0x660 drivers/tty/tty_io.c:1133
 tty_write+0x24/0x30 drivers/tty/tty_io.c:1140
 call_write_iter include/linux/fs.h:2114 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_writev fs/read_write.c:939 [inline]
 do_writev+0x1e0/0x400 fs/read_write.c:982
 __do_sys_writev fs/read_write.c:1055 [inline]
 __se_sys_writev fs/read_write.c:1052 [inline]
 __x64_sys_writev+0x41/0x50 fs/read_write.c:1052
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11311 Comm: syz-executor.2 Not tainted 5.13.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/05/18 15:37 upstream 8ac91e6c6033 a343ba6b .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/05/16 18:05 upstream 63d1cb53e26a f54a5c09 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios