syzbot


KCSAN: data-race in n_tty_receive_buf_standard / n_tty_write (2)

Status: moderation: reported on 2025/11/09 05:21
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+c87b97ab5952dcfd64b8@syzkaller.appspotmail.com
First crash: 61d, last: 33d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_receive_buf_standard / n_tty_write serial 6 2 1164d 1178d 0/29 auto-obsoleted due to no activity on 2022/12/07 15:48

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

write to 0xffffc90001b07028 of 8 bytes by task 56 on cpu 0:
 commit_echoes drivers/tty/n_tty.c:742 [inline]
 n_tty_receive_char_canon drivers/tty/n_tty.c:1297 [inline]
 n_tty_receive_char_special drivers/tty/n_tty.c:1372 [inline]
 n_tty_receive_buf_standard+0x1f09/0x2f10 drivers/tty/n_tty.c:1588
 __receive_buf drivers/tty/n_tty.c:1624 [inline]
 n_tty_receive_buf_common+0x805/0xbe0 drivers/tty/n_tty.c:1723
 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1769
 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

read to 0xffffc90001b07028 of 8 bytes by task 13423 on cpu 1:
 process_echoes drivers/tty/n_tty.c:768 [inline]
 n_tty_write+0x14f/0xb40 drivers/tty/n_tty.c:2363
 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+0x66b/0xa20 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+0x312/0x680 fs/splice.c:1105
 do_splice_direct_actor fs/splice.c:1204 [inline]
 do_splice_direct+0xda/0x150 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+0xd8/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000039 -> 0x0000000000000046

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 13423 Comm: syz.0.4248 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/06 23:53 upstream cc3ee4ba57b7 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_standard / n_tty_write
2025/11/09 05:20 upstream 7bb4d6512545 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_standard / n_tty_write
* Struck through repros no longer work on HEAD.