syzbot


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

Status: auto-closed as invalid on 2021/12/10 21:01
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 515d, last: 397d
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 770d 770d 0/24 auto-closed as invalid on 2020/12/02 18:50
upstream KCSAN: data-race in n_tty_write / tty_set_termios (8) 9 111d 237d 0/24 auto-closed as invalid on 2022/09/22 18:33
upstream KCSAN: data-race in n_tty_write / tty_set_termios (4) 3 678d 729d 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 834d 834d 0/24 auto-closed as invalid on 2020/09/29 07:57
upstream KCSAN: data-race in n_tty_write / tty_set_termios (5) 2 568d 570d 0/24 auto-closed as invalid on 2021/06/22 15:42
upstream KCSAN: data-race in n_tty_write / tty_set_termios 1 896d 896d 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 279d 316d 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

write to 0xffff8881244d9d14 of 4 bytes by task 22594 on cpu 0:
 unset_locked_termios drivers/tty/tty_ioctl.c:233 [inline]
 tty_set_termios+0x1d3/0x8b0 drivers/tty/tty_ioctl.c:355
 set_termios+0x384/0x3c0 drivers/tty/tty_ioctl.c:438
 tty_mode_ioctl+0x5a1/0x690
 n_tty_ioctl_helper+0x83/0x450 drivers/tty/tty_ioctl.c:903
 n_tty_ioctl+0xfc/0x1f0 drivers/tty/n_tty.c:2421
 tty_ioctl+0xaf5/0x1130 drivers/tty/tty_io.c:2814
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:860
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881244d9d14 of 4 bytes by task 22589 on cpu 1:
 n_tty_write+0x87/0xaf0 drivers/tty/n_tty.c:2265
 do_tty_write drivers/tty/tty_io.c:1038 [inline]
 file_tty_write+0x409/0x660 drivers/tty/tty_io.c:1110
 tty_write+0x24/0x30 drivers/tty/tty_io.c:1131
 call_write_iter include/linux/fs.h:2161 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x7f5/0x950 fs/read_write.c:590
 ksys_write+0xd9/0x190 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:652
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00008a3b -> 0x00000040

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

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/05 20:56 upstream fe91c4725aee 4c1be0be .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/10/09 14:32 upstream 5d6ab0bb408f 838e7e2c .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/10/07 02:39 upstream 5af4055fa813 62ee0987 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/09/25 19:48 upstream 85736168463d 8cac236e .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/08/27 15:24 upstream 77dd11439b86 b318694d .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/08/08 16:57 upstream 85a90500f9a1 6972b106 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/08/07 16:18 upstream c9194f32bfd9 6972b106 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2021/07/10 02:59 upstream 3dbdb38e2869 8f5a7b8c .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
* Struck through repros no longer work on HEAD.