syzbot


KCSAN: data-race in isig / n_tty_poll

Status: moderation: reported on 2025/12/31 10:50
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+a6f6fec32bf08a0b9f6f@syzkaller.appspotmail.com
First crash: 2d12h, last: 2d12h

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

read to 0xffffc90002edb260 of 8 bytes by task 26665 on cpu 0:
 input_available_p drivers/tty/n_tty.c:1913 [inline]
 n_tty_poll+0x164/0x450 drivers/tty/n_tty.c:2440
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2199
 vfs_poll include/linux/poll.h:82 [inline]
 do_pollfd fs/select.c:866 [inline]
 do_poll fs/select.c:909 [inline]
 do_sys_poll+0x65e/0xbd0 fs/select.c:1005
 __do_sys_ppoll fs/select.c:1111 [inline]
 __se_sys_ppoll+0x1b9/0x200 fs/select.c:1091
 __x64_sys_ppoll+0x67/0x80 fs/select.c:1091
 x64_sys_call+0x22fe/0x3000 arch/x86/include/generated/asm/syscalls_64.h:272
 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 0xffffc90002edb260 of 16 bytes by task 7345 on cpu 1:
 reset_buffer_flags drivers/tty/n_tty.c:316 [inline]
 isig+0x181/0x2f0 drivers/tty/n_tty.c:1092
 n_tty_receive_signal_char+0x22/0x460 drivers/tty/n_tty.c:1184
 n_tty_receive_char_special drivers/tty/n_tty.c:-1 [inline]
 n_tty_receive_buf_standard+0x82f/0x2fe0 drivers/tty/n_tty.c:1580
 __receive_buf drivers/tty/n_tty.c:1609 [inline]
 n_tty_receive_buf_common+0x7a4/0xc10 drivers/tty/n_tty.c:1715
 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1759
 tty_ldisc_receive_buf+0x66/0xf0 drivers/tty/tty_buffer.c:387
 tty_port_default_receive_buf+0x59/0x90 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:445 [inline]
 flush_to_ldisc+0x148/0x340 drivers/tty/tty_buffer.c:495
 process_one_work kernel/workqueue.c:3257 [inline]
 process_scheduled_works+0x4ce/0x9d0 kernel/workqueue.c:3340
 worker_thread+0x582/0x770 kernel/workqueue.c:3421
 kthread+0x489/0x510 kernel/kthread.c:463
 ret_from_fork+0x149/0x290 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 7345 Comm: kworker/u8:13 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: events_unbound flush_to_ldisc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/31 10:54 upstream c8ebd433459b d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isig / n_tty_poll
2025/12/31 10:50 upstream c8ebd433459b d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isig / n_tty_poll
* Struck through repros no longer work on HEAD.