syzbot


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

Status: auto-closed as invalid on 2022/04/07 21:37
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 311d, last: 274d
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 765d 765d 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 106d 232d 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 673d 724d 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 829d 829d 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 392d 511d 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 563d 565d 0/24 auto-closed as invalid on 2021/06/22 15:42
upstream KCSAN: data-race in n_tty_write / tty_set_termios 1 892d 892d 0/24 auto-closed as invalid on 2020/07/29 04:13

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

write to 0xffff88813467ed14 of 4 bytes by task 26813 on cpu 1:
 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:2381
 tty_ioctl+0xaf7/0x1130 drivers/tty/tty_io.c:2787
 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/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88813467ed14 of 4 bytes by task 26814 on cpu 0:
 n_tty_write+0x87/0xaf0 drivers/tty/n_tty.c:2225
 do_tty_write drivers/tty/tty_io.c:1024 [inline]
 file_tty_write+0x409/0x660 drivers/tty/tty_io.c:1095
 tty_write+0x24/0x30 drivers/tty/tty_io.c:1116
 call_write_iter include/linux/fs.h:2074 [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/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00008a3b -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26814 Comm: syz-executor.1 Not tainted 5.17.0-rc6-syzkaller-00066-g5859a2b19911-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/03/03 21:32 upstream 5859a2b19911 45a13a73 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/02/18 15:44 upstream a3580ac9b7a3 3cd800e4 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/01/26 11:52 upstream 0280e3c58f92 2cbffd88 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
ci2-upstream-kcsan-gce 2022/01/25 08:48 upstream dd81e1c7d5fb 2cbffd88 .config log report info KCSAN: data-race in n_tty_write / tty_set_termios
* Struck through repros no longer work on HEAD.