syzbot


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

Status: moderation: reported on 2025/07/06 00:58
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+b486e50e6efb44751c37@syzkaller.appspotmail.com
First crash: 54d, last: 1d00h
Similar bugs (10)
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 866d 866d 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 130d 173d 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 (6) serial 6 28 498d 631d 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 (9) serial 6 3 230d 264d 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 925d 966d 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 358d 453d 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 1014d 1154d 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 315d 315d 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 1190d 1454d 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 791d 816d 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 0xffffc9000121d028 of 8 bytes by task 58 on cpu 0:
 commit_echoes drivers/tty/n_tty.c:742 [inline]
 n_tty_receive_char+0x437/0x6a0 drivers/tty/n_tty.c:1421
 n_tty_receive_buf_standard+0x473/0x2f10 drivers/tty/n_tty.c:1590
 __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+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 0xffffc9000121d028 of 8 bytes by task 10080 on cpu 1:
 process_echoes drivers/tty/n_tty.c:768 [inline]
 n_tty_write+0x14f/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
 do_iter_readv_writev+0x499/0x540 fs/read_write.c:-1
 vfs_writev+0x2df/0x8b0 fs/read_write.c:1057
 do_writev+0xe7/0x210 fs/read_write.c:1103
 __do_sys_writev fs/read_write.c:1171 [inline]
 __se_sys_writev fs/read_write.c:1168 [inline]
 __x64_sys_writev+0x45/0x50 fs/read_write.c:1168
 x64_sys_call+0x1e9a/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:21
 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: 0x00000000000001b0 -> 0x00000000000001ba

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

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/28 11:05 upstream 07d9df80082b e12e5ba4 .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
2025/08/28 03:47 upstream 39f90c196721 e12e5ba4 .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
2025/08/17 15:11 upstream 99bade344cfa 1804e95e .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
2025/08/16 02:49 upstream ee94b00c1a64 1804e95e .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
2025/08/14 15:35 upstream 0cc53520e68b 5d8c2ac2 .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
2025/08/02 06:48 upstream 0905809b38bd 7368264b .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
2025/07/06 00:58 upstream 05df91921da6 4f67c4ae .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.