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

Status: moderation: reported on 2026/10/17 05:59
Subsystems: serial
Labels: race:benign
[Documentation on labels]
Reported-by: syzbot+ca627b18cfeab9ce9163@syzkaller.appspotmail.com
First crash: 2h02m, last: 2h02m
▶ ▼ ✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
16a1a784 assessment-kcsan Benign: ✅ ❓ KCSAN: data-race in n_tty_receive_char / n_tty_write (14) 2026/10/17 05:59 2026/10/17 05:59 2026/10/17 06:37 432c0077
▶ ▼ Similar bugs (13)
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 1280d 1280d 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 544d 587d 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 (13) race:benign prio:high serial 6 1 56d 56d 0/29 auto-obsoleted due to no activity on 2026/10/16 13:45
upstream KCSAN: data-race in n_tty_receive_char / n_tty_write (6) serial 6 28 912d 1044d 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 341d 468d 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 275d 275d 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 644d 678d 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 1339d 1380d 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 771d 867d 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 1428d 1568d 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 729d 729d 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 1604d 1868d 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 1205d 1229d 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 0xffffc90002839028 of 8 bytes by task 2250 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:3396 [inline]
 process_scheduled_works+0x56a/0xa50 kernel/workqueue.c:3479
 worker_thread+0x569/0x750 kernel/workqueue.c:3560
 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 0xffffc90002839028 of 8 bytes by task 5141 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:1008 [inline]
 file_tty_write+0x392/0x6a0 drivers/tty/tty_io.c:1056
 tty_write+0x25/0x30 drivers/tty/tty_io.c:1077
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x57f/0x9a0 fs/read_write.c:687
 ksys_write+0xdc/0x1a0 fs/read_write.c:739
 __do_sys_write fs/read_write.c:750 [inline]
 __se_sys_write fs/read_write.c:747 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:747
 x64_sys_call+0x154e/0x2550 arch/x86/include/generated/asm/syscalls_64.h:2
 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: 0x000000000001b022 -> 0x000000000001b024

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/17 05:59 upstream 70dd4ee72eb2 432c0077 .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.