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: 50d, last: 22h36m
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
312dcf54-1e5a-4ba4-b8a1-a9b911c58d34 assessment-kcsan Benign: ✅  Confident: ✅  KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (9) 2026/02/25 03:55 2026/02/25 03:55 2026/02/25 03:58 305c0ec5cd886e2d13738e28e1b2df9b0ec20fc9
6a9d25c7-1ff4-4fd2-8100-f026ac232a90 assessment-kcsan 💥 KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (9) 2026/01/23 07:54 2026/01/23 07:54 2026/01/23 07:56 499a21815ec0ab13dbfc80e05fc32aadbc482145 failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "16" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/usr/local/google/home/dvyukov/syzkaller/workdir/cache/build/8a8d223043183454fcb320f80eb129c08706d7cc" "bzImage" "compile_commands.json"]: exit status 2
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 1313d 1651d 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 1073d 1164d 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 563d 638d 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 2062d 2062d 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 155d 155d 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 211d 477d 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 683d 825d 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 1227d 1269d 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 0xffffc9000453d020 of 8 bytes by task 12352 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
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x5a6/0x9f0 fs/read_write.c:688
 ksys_write+0xdc/0x1a0 fs/read_write.c:740
 __do_sys_write fs/read_write.c:751 [inline]
 __se_sys_write fs/read_write.c:748 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:748
 x64_sys_call+0x27e1/0x3020 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc9000453d020 of 8 bytes by task 9732 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:3275 [inline]
 process_scheduled_works+0x4de/0x9e0 kernel/workqueue.c:3358
 worker_thread+0x581/0x770 kernel/workqueue.c:3439
 kthread+0x22a/0x280 kernel/kthread.c:436
 ret_from_fork+0x150/0x360 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

value changed: 0x00000000000000bf -> 0x00000000000000c5

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 9732 Comm: kworker/u8:48 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Workqueue: events_unbound flush_to_ldisc
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/12 12:43 upstream 80234b5ab240 4efadf07 .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
2026/02/19 22:45 upstream 2b7a25df823d c8d8c52d .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
2026/01/30 03:20 upstream 4d310797262f bfa73b7b .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
2026/01/27 18:23 upstream fcb70a56f4d8 9a514c2f .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
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.