syzbot


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

Status: moderation: reported on 2025/07/04 23:52
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+cab57903ecc2a256de4f@syzkaller.appspotmail.com
First crash: 58d, last: 2d03h
Similar bugs (13)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __process_echoes / n_tty_write (9) serial 6 4 777d 823d 0/29 auto-obsoleted due to no activity on 2023/08/21 10:01
upstream KCSAN: data-race in __process_echoes / n_tty_write serial 6 3 1841d 1883d 0/29 auto-closed as invalid on 2020/09/20 17:41
upstream KCSAN: data-race in __process_echoes / n_tty_write (3) serial 6 7 1555d 1620d 0/29 auto-closed as invalid on 2021/07/04 10:36
upstream KCSAN: data-race in __process_echoes / n_tty_write (11) serial 6 13 507d 586d 0/29 auto-obsoleted due to no activity on 2024/05/16 20:06
upstream KCSAN: data-race in __process_echoes / n_tty_write (10) serial 6 10 631d 631d 0/29 auto-obsoleted due to no activity on 2024/01/14 04:02
upstream KCSAN: data-race in __process_echoes / n_tty_write (4) serial 6 1 1512d 1512d 0/29 auto-closed as invalid on 2021/08/15 21:06
upstream KCSAN: data-race in __process_echoes / n_tty_write (6) serial 6 41 1063d 1359d 0/29 auto-obsoleted due to no activity on 2022/11/07 20:53
upstream KCSAN: data-race in __process_echoes / n_tty_write (2) serial 6 4 1709d 1729d 0/29 auto-closed as invalid on 2021/01/30 23:25
upstream KCSAN: data-race in __process_echoes / n_tty_write (7) serial 6 2 1008d 1008d 0/29 auto-obsoleted due to no activity on 2023/01/13 20:09
upstream KCSAN: data-race in __process_echoes / n_tty_write (5) serial 6 1 1432d 1432d 0/29 auto-closed as invalid on 2021/11/04 02:47
upstream KCSAN: data-race in __process_echoes / n_tty_write (12) serial 6 2 441d 447d 0/29 auto-obsoleted due to no activity on 2024/07/22 07:47
upstream KCSAN: data-race in __process_echoes / n_tty_write (13) serial 6 4 208d 272d 0/29 auto-obsoleted due to no activity on 2025/04/01 20:34
upstream KCSAN: data-race in __process_echoes / n_tty_write (8) serial 6 3 871d 923d 0/29 auto-obsoleted due to no activity on 2023/05/19 15:46

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

write to 0xffffc9000137b280 of 8 bytes by task 153 on cpu 0:
 __process_echoes+0x63e/0x6b0 drivers/tty/n_tty.c:730
 flush_echoes drivers/tty/n_tty.c:791 [inline]
 __receive_buf drivers/tty/n_tty.c:1626 [inline]
 n_tty_receive_buf_common+0x8e4/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+0x145/0x340 drivers/tty/tty_buffer.c:495
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0x4ce/0x9d0 kernel/workqueue.c:3319
 worker_thread+0x582/0x770 kernel/workqueue.c:3400
 kthread+0x486/0x510 kernel/kthread.c:463
 ret_from_fork+0xda/0x150 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffffc9000137b280 of 8 bytes by task 10021 on cpu 1:
 process_echoes drivers/tty/n_tty.c:768 [inline]
 n_tty_write+0x161/0xb50 drivers/tty/n_tty.c:2363
 iterate_tty_write drivers/tty/tty_io.c:1006 [inline]
 file_tty_write+0x370/0x690 drivers/tty/tty_io.c:1081
 tty_write+0x25/0x30 drivers/tty/tty_io.c:1102
 iter_file_splice_write+0x663/0xa60 fs/splice.c:738
 do_splice_from fs/splice.c:938 [inline]
 direct_splice_actor+0x153/0x2a0 fs/splice.c:1161
 splice_direct_to_actor+0x30f/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+0x2bb0/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0x000000000000000c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 10021 Comm: syz.0.1829 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/30 13:11 upstream 11e7861d680c 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __process_echoes / n_tty_write
2025/08/16 15:49 upstream dfd4b508c8c6 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __process_echoes / n_tty_write
2025/07/04 23:51 upstream 4c06e63b9203 d869b261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __process_echoes / n_tty_write
* Struck through repros no longer work on HEAD.