syzbot


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

Status: auto-closed as invalid on 2022/09/22 18:33
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 235d, last: 109d
similar bugs (7):
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 768d 768d 0/24 auto-closed as invalid on 2020/12/02 18:50
upstream KCSAN: data-race in n_tty_write / tty_set_termios (4) 3 677d 727d 0/24 auto-closed as invalid on 2021/03/04 08:49
upstream KCSAN: data-race in n_tty_write / tty_set_termios (2) 1 833d 833d 0/24 auto-closed as invalid on 2020/09/29 07:57
upstream KCSAN: data-race in n_tty_write / tty_set_termios (6) 8 395d 514d 0/24 auto-closed as invalid on 2021/12/10 21:01
upstream KCSAN: data-race in n_tty_write / tty_set_termios (5) 2 566d 568d 0/24 auto-closed as invalid on 2021/06/22 15:42
upstream KCSAN: data-race in n_tty_write / tty_set_termios 1 895d 895d 0/24 auto-closed as invalid on 2020/07/29 04:13
upstream KCSAN: data-race in n_tty_write / tty_set_termios (7) 4 277d 315d 0/24 auto-closed as invalid on 2022/04/07 21:37

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

read-write to 0xffff888179576914 of 4 bytes by task 9120 on cpu 0:
 unset_locked_termios drivers/tty/tty_ioctl.c:233 [inline]
 tty_set_termios+0x1b0/0x8a0 drivers/tty/tty_ioctl.c:357
 set_termios+0x388/0x3c0 drivers/tty/tty_ioctl.c:442
 tty_mode_ioctl+0x4fa/0x5d0
 n_tty_ioctl_helper+0x83/0x340 drivers/tty/tty_ioctl.c:905
 n_tty_ioctl+0xfc/0x1f0 drivers/tty/n_tty.c:2483
 tty_ioctl+0x71e/0x970 drivers/tty/tty_io.c:2787
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888179576914 of 4 bytes by task 9118 on cpu 1:
 n_tty_write+0x88/0xb10 drivers/tty/n_tty.c:2327
 do_tty_write drivers/tty/tty_io.c:1024 [inline]
 file_tty_write+0x3f9/0x650 drivers/tty/tty_io.c:1095
 tty_write+0x24/0x30 drivers/tty/tty_io.c:1116
 call_write_iter include/linux/fs.h:2187 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x468/0x760 fs/read_write.c:578
 ksys_write+0xe8/0x1a0 fs/read_write.c:631
 __do_sys_write fs/read_write.c:643 [inline]
 __se_sys_write fs/read_write.c:640 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:640
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00008a3b -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9118 Comm: syz-executor.0 Not tainted 6.0.0-rc1-syzkaller-00066-g3b06a2755758-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (9):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/08/18 18:31 upstream 3b06a2755758 d58e263f .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/07/24 03:26 upstream 515f71412bb7 22343af4 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/07/15 09:39 upstream 9bd572ec7a66 5d921b08 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/07/05 19:29 upstream e35e5b6f695d bff65f44 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/06/22 03:24 upstream ca1fdab7fd27 0fc5c330 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/06/08 15:53 upstream 9886142c7a22 b2706118 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/06/01 08:40 upstream e1cbc3b96a99 3666edfe .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/04/28 14:25 upstream 8f4dd16603ce 8a1f1f07 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/04/14 19:02 upstream a19944809fe9 b17b2923 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
* Struck through repros no longer work on HEAD.