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: 115d, last: 5d02h
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 834d 880d 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 1899d 1940d 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 1612d 1677d 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 564d 643d 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 688d 688d 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 1569d 1569d 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 1120d 1416d 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 1766d 1786d 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 1065d 1065d 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 1489d 1489d 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 498d 504d 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 265d 329d 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 928d 981d 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 0xffffc90003f05280 of 8 bytes by task 13126 on cpu 1:
 __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_buf+0x30/0x40 drivers/tty/n_tty.c:1763
 tiocsti+0x170/0x1d0 drivers/tty/tty_io.c:2290
 tty_ioctl+0x4a4/0xb80 drivers/tty/tty_io.c:2706
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x1816/0x3000 arch/x86/include/generated/asm/syscalls_64.h:17
 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

read to 0xffffc90003f05280 of 8 bytes by task 13124 on cpu 0:
 process_echoes drivers/tty/n_tty.c:768 [inline]
 n_tty_write+0x161/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
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x52a/0x960 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+0x2802/0x3000 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: 0x0000000000000000 -> 0x0000000000000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 13124 Comm: syz.4.3281 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/23 15:43 upstream 43e9ad0c55a3 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __process_echoes / n_tty_write
2025/09/22 19:15 upstream 07e27ad16399 0ac7291c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __process_echoes / n_tty_write
2025/09/18 21:28 upstream 8b789f2b7602 e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __process_echoes / n_tty_write
2025/09/18 03:23 upstream d4b779985a6c e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __process_echoes / n_tty_write
2025/09/03 16:39 upstream e6b9dce0aeeb 96a211bc .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/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.