KCSAN: data-race in n_tty_receive_char / n_tty_write (13)

Status: moderation: reported on 2026/08/21 13:45
Subsystems: serial
Labels: race:benign
[Documentation on labels]
Reported-by: syzbot+39ea3f4b6fd24a1ca1ca@syzkaller.appspotmail.com
First crash: 10h16m, last: 10h16m
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
e5b86a11 assessment-kcsan Benign: ✅ KCSAN: data-race in n_tty_receive_char / n_tty_write (13) 2026/08/21 13:45 2026/08/21 13:45 2026/08/21 14:11 1e72964b
Similar bugs (12)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (4) serial 6 1 1224d 1224d 0/29 auto-obsoleted due to no activity on 2023/05/20 17:17
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (10) serial 6 7 488d 531d 0/29 auto-obsoleted due to no activity on 2025/06/15 15:33
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (6) serial 6 28 855d 988d 0/29 auto-obsoleted due to no activity on 2024/05/23 04:54
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (11) serial 6 11 284d 411d 0/29 auto-obsoleted due to no activity on 2026/01/05 01:20
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (12) serial 6 1 219d 219d 0/29 auto-obsoleted due to no activity on 2026/03/11 21:58
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (9) serial 6 3 588d 622d 0/29 auto-obsoleted due to no activity on 2025/03/07 19:30
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (3) serial 6 5 1283d 1324d 0/29 auto-obsoleted due to no activity on 2023/03/30 21:01
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (7) serial 6 6 715d 811d 0/29 auto-obsoleted due to no activity on 2024/10/10 09:15
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (2) serial 6 13 1371d 1512d 0/29 auto-obsoleted due to no activity on 2022/12/30 17:18
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (8) serial 6 1 672d 672d 0/29 auto-obsoleted due to no activity on 2024/11/22 07:31
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write serial 6 25 1548d 1811d 0/29 auto-closed as invalid on 2022/06/30 23:55
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (5) serial 6 3 1149d 1173d 0/29 auto-obsoleted due to no activity on 2023/08/03 17:30

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

write to 0xffffc9000109b028 of 8 bytes by task 7247 on cpu 0:
 commit_echoes drivers/tty/n_tty.c:738 [inline]
 n_tty_receive_char+0x44e/0x6d0 drivers/tty/n_tty.c:1413
 n_tty_receive_buf_standard+0x563/0x3cb0 drivers/tty/n_tty.c:1582
 __receive_buf drivers/tty/n_tty.c:1616 [inline]
 n_tty_receive_buf_common+0x821/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:394
 tty_port_default_receive_buf+0x59/0x90 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:452 [inline]
 flush_to_ldisc+0x13a/0x330 drivers/tty/tty_buffer.c:502
 process_one_work kernel/workqueue.c:3387 [inline]
 process_scheduled_works+0x56a/0xa50 kernel/workqueue.c:3470
 worker_thread+0x569/0x750 kernel/workqueue.c:3551
 kthread+0x223/0x270 kernel/kthread.c:436
 ret_from_fork+0x146/0x330 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffffc9000109b028 of 8 bytes by task 15407 on cpu 1:
 process_echoes drivers/tty/n_tty.c:762 [inline]
 n_tty_write+0x178/0xb00 drivers/tty/n_tty.c:2352
 iterate_tty_write drivers/tty/tty_io.c:1006 [inline]
 file_tty_write+0x392/0x6a0 drivers/tty/tty_io.c:1054
 tty_write+0x25/0x30 drivers/tty/tty_io.c:1075
 iter_file_splice_write+0x6a0/0xa60 fs/splice.c:736
 do_splice_from fs/splice.c:936 [inline]
 direct_splice_actor+0x158/0x280 fs/splice.c:1159
 splice_direct_to_actor+0x2f9/0x680 fs/splice.c:1103
 do_splice_direct_actor fs/splice.c:1202 [inline]
 do_splice_direct+0x119/0x1a0 fs/splice.c:1228
 do_sendfile+0x37d/0x640 fs/read_write.c:1371
 __do_sys_sendfile64 fs/read_write.c:1432 [inline]
 __se_sys_sendfile64 fs/read_write.c:1418 [inline]
 __x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1418
 x64_sys_call+0x1015/0x2550 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000039 -> 0x000000000000003f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 15407 Comm: syz.4.3643 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/21 13:45 upstream 818bebeb63dd 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_char / n_tty_write
* Struck through repros no longer work on HEAD.