syzbot


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

Status: moderation: reported on 2024/06/07 11:40
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+a7e2f400e009149d531a@syzkaller.appspotmail.com
First crash: 18d, last: 18d
Similar bugs (2)
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 468d 468d 0/27 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 1392d 1392d 0/27 auto-closed as invalid on 2020/10/07 08:58

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

write to 0xffffc900001dd05d of 1 bytes by task 11196 on cpu 1:
 n_tty_set_termios+0x1fd/0x850 drivers/tty/n_tty.c:1810
 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:2511
 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 0xffffc900001dd05d of 1 bytes by task 11187 on cpu 0:
 input_available_p drivers/tty/n_tty.c:1929 [inline]
 n_tty_poll+0x27c/0x490 drivers/tty/n_tty.c:2458
 tty_poll+0x7e/0x100 drivers/tty/tty_io.c:2214
 vfs_poll include/linux/poll.h:84 [inline]
 do_pollfd fs/select.c:873 [inline]
 do_poll fs/select.c:921 [inline]
 do_sys_poll+0x644/0xc10 fs/select.c:1016
 __do_sys_ppoll fs/select.c:1122 [inline]
 __se_sys_ppoll+0x1af/0x1f0 fs/select.c:1102
 __x64_sys_ppoll+0x67/0x80 fs/select.c:1102
 x64_sys_call+0xeaf/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:272
 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: 0x10 -> 0x0c

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11187 Comm: syz-executor.1 Tainted: G        W          6.10.0-rc2-syzkaller-00235-g8a92980606e3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/07 11:40 upstream 8a92980606e3 121701b6 .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.