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: 8d22h, last: 8d22h
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 727d 773d 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 1792d 1833d 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 1505d 1570d 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 458d 536d 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 581d 581d 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 1463d 1463d 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 1014d 1309d 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 1659d 1679d 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 958d 958d 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 1382d 1382d 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 391d 397d 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 159d 222d 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 821d 874d 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 0xffffc900011bd280 of 8 bytes by task 51 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+0x144/0x360 drivers/tty/tty_buffer.c:495
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4cb/0x9d0 kernel/workqueue.c:3321
 worker_thread+0x582/0x770 kernel/workqueue.c:3402
 kthread+0x489/0x510 kernel/kthread.c:464
 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 0xffffc900011bd280 of 8 bytes by task 31622 on cpu 1:
 process_echoes drivers/tty/n_tty.c:768 [inline]
 n_tty_write+0x161/0xb10 drivers/tty/n_tty.c:2363
 iterate_tty_write drivers/tty/tty_io.c:1006 [inline]
 file_tty_write+0x389/0x670 drivers/tty/tty_io.c:1081
 tty_write+0x25/0x30 drivers/tty/tty_io.c:1102
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x4a0/0x8e0 fs/read_write.c:686
 ksys_write+0xda/0x1a0 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:746
 x64_sys_call+0x2cdd/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:2
 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: 0x0000000000000008 -> 0x000000000000000e

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 31622 Comm: syz.8.9036 Tainted: G        W           6.16.0-rc4-syzkaller-00123-g4c06e63b9203 #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.