syzbot


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

Status: auto-obsoleted due to no activity on 2024/08/31 07:27
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+2824781c3ef2f8dc4f84@syzkaller.appspotmail.com
First crash: 42d, last: 42d
Similar bugs (6)
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 971d 971d 0/27 auto-closed as invalid on 2022/02/14 10:19
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (6) serial 1 218d 218d 0/27 auto-obsoleted due to no activity on 2024/03/08 03:04
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (2) serial 2 1162d 1197d 0/27 auto-closed as invalid on 2021/08/07 13:54
upstream KCSAN: data-race in n_tty_poll / tty_set_termios serial 1 1239d 1239d 0/27 auto-closed as invalid on 2021/05/22 11:20
upstream KCSAN: data-race in n_tty_poll / tty_set_termios (5) serial 1 361d 361d 0/27 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 1052d 1052d 0/27 auto-closed as invalid on 2021/11/25 02:42

Sample crash report:
loop1: detected capacity change from 0 to 512
EXT4-fs: quotafile must be on filesystem root
==================================================================
BUG: KCSAN: data-race in n_tty_poll / tty_set_termios

read-write to 0xffff888114482514 of 4 bytes by task 5318 on cpu 1:
 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+0x1688/0x2e00 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 0xffff888114482514 of 4 bytes by task 5301 on cpu 0:
 input_available_p drivers/tty/n_tty.c:1939 [inline]
 n_tty_poll+0x2a4/0x490 drivers/tty/n_tty.c:2468
 tty_poll+0x7e/0x100 drivers/tty/tty_io.c:2214
 vfs_poll include/linux/poll.h:84 [inline]
 __io_arm_poll_handler+0x229/0xf30 io_uring/poll.c:622
 io_arm_poll_handler+0x411/0x5d0 io_uring/poll.c:756
 io_queue_async+0x89/0x370 io_uring/io_uring.c:1902
 io_queue_sqe io_uring/io_uring.c:1931 [inline]
 io_req_task_submit+0xb3/0xc0 io_uring/io_uring.c:1344
 io_handle_tw_list+0x1b9/0x200 io_uring/io_uring.c:1034
 tctx_task_work_run+0x6c/0x1b0 io_uring/io_uring.c:1106
 tctx_task_work+0x40/0x80 io_uring/io_uring.c:1124
 task_work_run+0x13a/0x1a0 kernel/task_work.c:222
 get_signal+0xeee/0x1080 kernel/signal.c:2689
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x59/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00008a3b -> 0x0000ffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5301 Comm: syz.1.479 Not tainted 6.10.0-syzkaller-12708-g2f8c4f506285 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/27 07:26 upstream 2f8c4f506285 46eb10b7 .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.