syzbot


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

Status: auto-obsoleted due to no activity on 2024/07/29 01:08
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+a469633f93ab54a7e2e3@syzkaller.appspotmail.com
First crash: 332d, last: 328d
Similar bugs (11)
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 1662d 1662d 0/28 auto-closed as invalid on 2020/12/02 18:50
upstream KCSAN: data-race in n_tty_write / tty_set_termios (10) serial 1 759d 759d 0/28 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 1003d 1129d 0/28 auto-closed as invalid on 2022/09/22 18:33
upstream KCSAN: data-race in n_tty_write / tty_set_termios (4) serial 3 1570d 1621d 0/28 auto-closed as invalid on 2021/03/04 08:49
upstream KCSAN: data-race in n_tty_write / tty_set_termios (12) serial 33 8d07h 169d 0/28 moderation: reported on 2024/11/30 05:29
upstream KCSAN: data-race in n_tty_write / tty_set_termios (2) serial 1 1726d 1726d 0/28 auto-closed as invalid on 2020/09/29 07:57
upstream KCSAN: data-race in n_tty_write / tty_set_termios (6) serial 8 1289d 1408d 0/28 auto-closed as invalid on 2021/12/10 21:01
upstream KCSAN: data-race in n_tty_write / tty_set_termios (5) serial 2 1460d 1462d 0/28 auto-closed as invalid on 2021/06/22 15:42
upstream KCSAN: data-race in n_tty_write / tty_set_termios serial 1 1789d 1789d 0/28 auto-closed as invalid on 2020/07/29 04:13
upstream KCSAN: data-race in n_tty_write / tty_set_termios (7) serial 4 1171d 1208d 0/28 auto-closed as invalid on 2022/04/07 21:37
upstream KCSAN: data-race in n_tty_write / tty_set_termios (9) serial 7 850d 931d 0/28 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

read-write to 0xffff888118c66d14 of 4 bytes by task 5945 on cpu 0:
 unset_locked_termios drivers/tty/tty_ioctl.c:217 [inline]
 tty_set_termios+0x1a2/0x8b0 drivers/tty/tty_ioctl.c:340
 set_termios+0x365/0x4e0 drivers/tty/tty_ioctl.c:520
 tty_mode_ioctl+0x391/0x5d0
 n_tty_ioctl_helper+0x8d/0x240 drivers/tty/tty_ioctl.c:986
 n_tty_ioctl+0xfd/0x200 drivers/tty/n_tty.c:2521
 tty_ioctl+0x886/0xbe0 drivers/tty/tty_io.c:2812
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xd3/0x150 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x1581/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888118c66d14 of 4 bytes by task 5944 on cpu 1:
 n_tty_write+0xa0/0xb90 drivers/tty/n_tty.c:2366
 iterate_tty_write drivers/tty/tty_io.c:1021 [inline]
 file_tty_write+0x386/0x690 drivers/tty/tty_io.c:1096
 tty_write+0x28/0x30 drivers/tty/tty_io.c:1117
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x78f/0x900 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 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+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x27ef/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00008a3b -> 0x0000001f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5944 Comm: syz-executor.2 Not tainted 6.10.0-rc4-syzkaller-00330-g7c16f0a4ed1c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/24 01:07 upstream 7c16f0a4ed1c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_write / tty_set_termios
2024/06/22 21:35 upstream 563a50672d8a edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_write / tty_set_termios
2024/06/19 11:06 upstream 92e5605a199e 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_write / tty_set_termios
* Struck through repros no longer work on HEAD.