syzbot


KCSAN: data-race in n_tty_flush_buffer / n_tty_poll (2)

Status: moderation: reported on 2026/01/16 01:45
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+4530758e86e7cf7b73ae@syzkaller.appspotmail.com
First crash: 3d17h, last: 3d17h
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_flush_buffer / n_tty_poll serial 6 3 62d 143d 0/29 auto-obsoleted due to no activity on 2026/01/13 13:06

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

read to 0xffffc900021c5260 of 8 bytes by task 24188 on cpu 0:
 input_available_p drivers/tty/n_tty.c:1913 [inline]
 n_tty_poll+0x2a8/0x450 drivers/tty/n_tty.c:2444
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2199
 vfs_poll include/linux/poll.h:82 [inline]
 select_poll_one fs/select.c:480 [inline]
 do_select+0x8f1/0xf40 fs/select.c:536
 core_sys_select+0x3dc/0x6e0 fs/select.c:677
 do_pselect fs/select.c:759 [inline]
 __do_sys_pselect6 fs/select.c:798 [inline]
 __se_sys_pselect6+0x213/0x280 fs/select.c:789
 __x64_sys_pselect6+0x78/0x90 fs/select.c:789
 x64_sys_call+0x2e98/0x3000 arch/x86/include/generated/asm/syscalls_64.h:271
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffffc900021c5260 of 16 bytes by task 24187 on cpu 1:
 reset_buffer_flags drivers/tty/n_tty.c:316 [inline]
 n_tty_flush_buffer+0x61/0x1d0 drivers/tty/n_tty.c:350
 tty_ldisc_hangup+0x77/0x370 drivers/tty/tty_ldisc.c:699
 __tty_hangup+0x3c2/0x540 drivers/tty/tty_io.c:621
 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:691
 pty_close+0x2c5/0x2f0 drivers/tty/pty.c:77
 tty_release+0x1ff/0xb10 drivers/tty/tty_io.c:1745
 __fput+0x29b/0x650 fs/file_table.c:468
 ____fput+0x1c/0x30 fs/file_table.c:496
 task_work_run+0x131/0x1a0 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:44 [inline]
 exit_to_user_mode_loop+0x1fe/0x740 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x1dd/0x2b0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 24187 Comm: syz.2.21631 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/16 01:44 upstream 603c05a1639f d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_flush_buffer / n_tty_poll
* Struck through repros no longer work on HEAD.