syzbot


KCSAN: data-race in n_tty_poll / tty_set_termios (9)

Status: moderation: reported on 2025/03/23 06:09
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+4771cf9a20cb6de82abc@syzkaller.appspotmail.com
First crash: 94d, last: 21d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (4) serial 1 1262d 1262d 0/29 auto-closed as invalid on 2022/02/14 10:19
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (6) serial 1 509d 509d 0/29 auto-obsoleted due to no activity on 2024/03/08 03:04
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (8) serial 2 190d 198d 0/29 auto-obsoleted due to no activity on 2025/02/11 05:59
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (2) serial 2 1452d 1487d 0/29 auto-closed as invalid on 2021/08/07 13:54
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (7) serial 1 333d 333d 0/29 auto-obsoleted due to no activity on 2024/08/31 07:27
upstream KCSAN: data-race in n_tty_poll / tty_set_termios serial 1 1530d 1530d 0/29 auto-closed as invalid on 2021/05/22 11:20
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (5) serial 1 652d 652d 0/29 auto-obsoleted due to no activity on 2023/10/17 08:33
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (3) serial 1 1343d 1343d 0/29 auto-closed as invalid on 2021/11/25 02:42

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

write to 0xffff88812fb96508 of 44 bytes by task 6191 on cpu 1:
 tty_set_termios+0xc0/0x8c0 drivers/tty/tty_ioctl.c:339
 set_termios+0x496/0x4e0 drivers/tty/tty_ioctl.c:516
 tty_mode_ioctl+0x379/0x5c0 drivers/tty/tty_ioctl.c:-1
 n_tty_ioctl_helper+0x91/0x210 drivers/tty/tty_ioctl.c:986
 n_tty_ioctl+0x101/0x200 drivers/tty/n_tty.c:2509
 tty_ioctl+0x845/0xb80 drivers/tty/tty_io.c:2811
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x19a8/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88812fb9651e of 1 bytes by task 6190 on cpu 0:
 input_available_p drivers/tty/n_tty.c:1921 [inline]
 n_tty_poll+0xba/0x450 drivers/tty/n_tty.c:2452
 tty_poll+0x76/0xf0 drivers/tty/tty_io.c:2208
 vfs_poll include/linux/poll.h:82 [inline]
 io_file_supports_nowait io_uring/rw.c:46 [inline]
 __io_read+0x2e7/0xc20 io_uring/rw.c:927
 io_read+0x1c/0x60 io_uring/rw.c:1020
 __io_issue_sqe+0xfb/0x2e0 io_uring/io_uring.c:1730
 io_issue_sqe+0x53/0x970 io_uring/io_uring.c:1753
 io_queue_sqe io_uring/io_uring.c:1960 [inline]
 io_submit_sqe io_uring/io_uring.c:2216 [inline]
 io_submit_sqes+0x667/0xfd0 io_uring/io_uring.c:2329
 __do_sys_io_uring_enter io_uring/io_uring.c:3396 [inline]
 __se_sys_io_uring_enter+0x1c1/0x1b70 io_uring/io_uring.c:3330
 __x64_sys_io_uring_enter+0x78/0x90 io_uring/io_uring.c:3330
 x64_sys_call+0x28c8/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:427
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00 -> 0xff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 6190 Comm: syz.3.1105 Not tainted 6.15.0-syzkaller-11796-g5abc7438f1e9 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/04 04:00 upstream 5abc7438f1e9 a30356b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / tty_set_termios
2025/05/29 20:16 upstream e0797d3b91de 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / tty_set_termios
2025/05/16 05:37 upstream fee3e843b309 cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / tty_set_termios
2025/05/13 15:12 upstream e9565e23cd89 7344edeb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / tty_set_termios
2025/04/16 17:52 upstream c62f4b82d571 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / tty_set_termios
2025/04/16 17:52 upstream c62f4b82d571 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / tty_set_termios
2025/03/23 06:08 upstream 183601b78a9b 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / tty_set_termios
* Struck through repros no longer work on HEAD.