syzbot


KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (9)

Status: moderation: reported on 2026/01/21 17:09
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+74ebdb1d6f91a459a132@syzkaller.appspotmail.com
First crash: 5d00h, last: 5d00h
Similar bugs (8)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (2) serial 6 36 1267d 1605d 0/29 auto-closed as invalid on 2022/09/11 21:39
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (4) serial 6 5 1027d 1118d 0/29 auto-obsoleted due to no activity on 2023/05/10 10:49
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (6) serial 6 6 517d 593d 0/29 auto-obsoleted due to no activity on 2024/09/30 21:50
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write serial 6 1 2016d 2016d 0/29 auto-closed as invalid on 2020/08/23 22:27
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (8) serial 6 1 109d 109d 0/29 auto-obsoleted due to no activity on 2025/12/04 09:28
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (7) serial 6 13 166d 431d 0/29 auto-obsoleted due to no activity on 2025/10/08 13:05
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (5) serial 6 41 637d 779d 0/29 auto-obsoleted due to no activity on 2024/06/03 08:33
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (3) serial 6 5 1181d 1223d 0/29 auto-obsoleted due to no activity on 2022/12/07 10:52

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_receive_buf_common / n_tty_write

write to 0xffffc9000ba81020 of 8 bytes by task 15239 on cpu 0:
 process_echoes drivers/tty/n_tty.c:766 [inline]
 n_tty_write+0x1d2/0xc20 drivers/tty/n_tty.c:2352
 iterate_tty_write drivers/tty/tty_io.c:1006 [inline]
 file_tty_write+0x378/0x690 drivers/tty/tty_io.c:1081
 tty_write+0x25/0x30 drivers/tty/tty_io.c:1102
 iter_file_splice_write+0x6bc/0xa80 fs/splice.c:738
 do_splice_from fs/splice.c:938 [inline]
 direct_splice_actor+0x156/0x2a0 fs/splice.c:1161
 splice_direct_to_actor+0x311/0x670 fs/splice.c:1105
 do_splice_direct_actor fs/splice.c:1204 [inline]
 do_splice_direct+0x119/0x1a0 fs/splice.c:1230
 do_sendfile+0x380/0x650 fs/read_write.c:1370
 __do_sys_sendfile64 fs/read_write.c:1431 [inline]
 __se_sys_sendfile64 fs/read_write.c:1417 [inline]
 __x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1417
 x64_sys_call+0x2db1/0x3000 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc0/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc9000ba81020 of 8 bytes by task 1616 on cpu 1:
 flush_echoes drivers/tty/n_tty.c:780 [inline]
 __receive_buf drivers/tty/n_tty.c:1618 [inline]
 n_tty_receive_buf_common+0x85e/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+0x4cd/0x9d0 kernel/workqueue.c:3340
 worker_thread+0x581/0x770 kernel/workqueue.c:3421
 kthread+0x488/0x510 kernel/kthread.c:463
 ret_from_fork+0x148/0x280 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

value changed: 0x000000000000020b -> 0x0000000000000211

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 1616 Comm: kworker/u8:7 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 (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/21 17:08 upstream 6c790212c588 8fc37797 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
* Struck through repros no longer work on HEAD.