syzbot


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

Status: auto-closed as invalid on 2021/12/10 21:01
Subsystems: serial
[Documentation on labels]
First crash: 1029d, last: 911d
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_write / tty_set_termios (3) serial 1 1284d 1284d 0/26 auto-closed as invalid on 2020/12/02 18:50
upstream KCSAN: data-race in n_tty_write / tty_set_termios (10) serial 1 381d 381d 0/26 auto-obsoleted due to no activity on 2023/05/24 17:53
upstream KCSAN: data-race in n_tty_write / tty_set_termios (8) serial 9 625d 751d 0/26 auto-closed as invalid on 2022/09/22 18:33
upstream KCSAN: data-race in n_tty_write / tty_set_termios (4) serial 3 1192d 1243d 0/26 auto-closed as invalid on 2021/03/04 08:49
upstream KCSAN: data-race in n_tty_write / tty_set_termios (2) serial 1 1348d 1348d 0/26 auto-closed as invalid on 2020/09/29 07:57
upstream KCSAN: data-race in n_tty_write / tty_set_termios (5) serial 2 1082d 1084d 0/26 auto-closed as invalid on 2021/06/22 15:42
upstream KCSAN: data-race in n_tty_write / tty_set_termios serial 1 1410d 1410d 0/26 auto-closed as invalid on 2020/07/29 04:13
upstream KCSAN: data-race in n_tty_write / tty_set_termios (7) serial 4 793d 830d 0/26 auto-closed as invalid on 2022/04/07 21:37
upstream KCSAN: data-race in n_tty_write / tty_set_termios (9) serial 7 472d 553d 0/26 auto-obsoleted due to no activity on 2023/02/26 21:46

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