syzbot


KCSAN: data-race in n_tty_poll / n_tty_set_termios (4)

Status: auto-obsoleted due to no activity on 2024/11/06 23:03
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+98be2f82e2f7d41e765d@syzkaller.appspotmail.com
First crash: 79d, last: 79d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_poll / n_tty_set_termios (2) serial 1 647d 647d 0/28 auto-obsoleted due to no activity on 2023/04/26 05:55
upstream KCSAN: data-race in n_tty_poll / n_tty_set_termios serial 1 1571d 1571d 0/28 auto-closed as invalid on 2020/10/07 08:58
upstream KCSAN: data-race in n_tty_poll / n_tty_set_termios (3) serial 1 197d 197d 0/28 auto-obsoleted due to no activity on 2024/07/12 11:40

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

write to 0xffffc9000e235010 of 8 bytes by task 5528 on cpu 0:
 n_tty_set_termios+0x188/0x850 drivers/tty/n_tty.c:1812
 tty_set_termios+0x849/0x8b0 drivers/tty/tty_ioctl.c:352
 set_termios+0x497/0x4e0 drivers/tty/tty_ioctl.c:516
 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+0x87a/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+0xcd/0x140 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x15cc/0x2d60 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 0xffffc9000e235010 of 8 bytes by task 5529 on cpu 1:
 input_available_p drivers/tty/n_tty.c:1940 [inline]
 n_tty_poll+0x2d2/0x490 drivers/tty/n_tty.c:2468
 tty_poll+0x78/0xf0 drivers/tty/tty_io.c:2208
 vfs_poll include/linux/poll.h:84 [inline]
 io_poll_check_events io_uring/poll.c:304 [inline]
 io_poll_task_func+0x146/0x8a0 io_uring/poll.c:358
 io_handle_tw_list+0xe3/0x200 io_uring/io_uring.c:1060
 tctx_task_work_run+0x6c/0x1b0 io_uring/io_uring.c:1132
 tctx_task_work+0x40/0x80 io_uring/io_uring.c:1150
 task_work_run+0x13a/0x1a0 kernel/task_work.c:228
 get_signal+0xee9/0x1070 kernel/signal.c:2690
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 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: 0x0000000000000000 -> 0x0000000000000fff

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5529 Comm: syz.3.400 Not tainted 6.12.0-rc1-syzkaller-00042-gf23aa4c0761a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/02 23:02 upstream f23aa4c0761a 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / n_tty_set_termios
* Struck through repros no longer work on HEAD.