syzbot


KCSAN: data-race in do_con_write / stop_tty (7)

Status: moderation: reported on 2025/02/15 02:05
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+39a480dd00bdafa10444@syzkaller.appspotmail.com
First crash: 6d03h, last: 6d03h
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in do_con_write / stop_tty (4) serial 2 925d 933d 0/28 auto-closed as invalid on 2022/09/14 19:26
upstream KCSAN: data-race in do_con_write / stop_tty (5) serial 1 683d 683d 0/28 auto-obsoleted due to no activity on 2023/05/14 17:18
upstream KCSAN: data-race in do_con_write / stop_tty (3) serial 6 1047d 1097d 0/28 auto-closed as invalid on 2022/05/16 00:29
upstream KCSAN: data-race in do_con_write / stop_tty (6) serial 1 180d 180d 0/28 auto-obsoleted due to no activity on 2024/09/28 11:28
upstream KCSAN: data-race in do_con_write / stop_tty serial 1 1307d 1307d 0/28 auto-closed as invalid on 2021/08/28 20:41
upstream KCSAN: data-race in do_con_write / stop_tty (2) serial 7 1199d 1263d 0/28 auto-closed as invalid on 2021/12/14 11:52

Sample crash report:
==================================================================
BUG: KCSAN: data-race in do_con_write / stop_tty

write to 0xffff8881171471bc of 1 bytes by task 10340 on cpu 1:
 __stop_tty drivers/tty/tty_io.c:747 [inline]
 stop_tty+0x58/0xc0 drivers/tty/tty_io.c:771
 n_tty_receive_char_flow_ctrl+0x87/0x1a0 drivers/tty/n_tty.c:1254
 n_tty_receive_char_special drivers/tty/n_tty.c:1359 [inline]
 n_tty_receive_buf_standard+0x4e1/0x2e30 drivers/tty/n_tty.c:1604
 __receive_buf drivers/tty/n_tty.c:1640 [inline]
 n_tty_receive_buf_common+0x830/0xbd0 drivers/tty/n_tty.c:1739
 n_tty_receive_buf+0x30/0x40 drivers/tty/n_tty.c:1779
 tiocsti+0x166/0x1d0 drivers/tty/tty_io.c:2299
 tty_ioctl+0x409/0xbe0 drivers/tty/tty_io.c:2716
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xc9/0x140 fs/ioctl.c:892
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:892
 x64_sys_call+0x1690/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881171471bc of 1 bytes by task 10338 on cpu 0:
 do_con_write+0x1a29/0x25f0 drivers/tty/vt/vt.c:3072
 con_write+0x26/0x40 drivers/tty/vt/vt.c:3432
 process_output_block drivers/tty/n_tty.c:574 [inline]
 n_tty_write+0x843/0xb80 drivers/tty/n_tty.c:2389
 iterate_tty_write drivers/tty/tty_io.c:1015 [inline]
 file_tty_write+0x37a/0x680 drivers/tty/tty_io.c:1090
 tty_write+0x28/0x30 drivers/tty/tty_io.c:1111
 new_sync_write fs/read_write.c:586 [inline]
 vfs_write+0x77b/0x920 fs/read_write.c:679
 ksys_write+0xe8/0x1b0 fs/read_write.c:731
 __do_sys_write fs/read_write.c:742 [inline]
 __se_sys_write fs/read_write.c:739 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:739
 x64_sys_call+0x287e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 10338 Comm: syz.7.2500 Tainted: G        W          6.14.0-rc2-syzkaller-00185-g128c8f96eb86 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/15 02:04 upstream 128c8f96eb86 1022af74 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in do_con_write / stop_tty
* Struck through repros no longer work on HEAD.