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: 3d04h, last: 3d04h
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 1105d 1120d 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 0xffffc90006b35028 of 8 bytes by task 10380 on cpu 1:
 commit_echoes drivers/tty/n_tty.c:742 [inline]
 n_tty_receive_char_canon drivers/tty/n_tty.c:1289 [inline]
 n_tty_receive_char_special drivers/tty/n_tty.c:1372 [inline]
 n_tty_receive_buf_standard+0x2bea/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_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 0xffffc90006b35028 of 8 bytes by task 10379 on cpu 0:
 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
 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: 10379 Comm: syz.3.2505 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

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