syzbot


KCSAN: data-race in n_tty_write / tty_release (4)

Status: auto-obsoleted due to no activity on 2024/06/20 17:11
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+7916a2967e7c7a30b3d9@syzkaller.appspotmail.com
First crash: 36d, last: 36d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_write / tty_release (2) serial 1 1162d 1162d 0/27 auto-closed as invalid on 2021/05/21 10:47
upstream KCSAN: data-race in n_tty_write / tty_release serial 2 1598d 1614d 0/27 auto-closed as invalid on 2020/04/15 20:43
upstream KCSAN: data-race in n_tty_write / tty_release (3) serial 1 997d 997d 0/27 auto-closed as invalid on 2021/11/03 05:49

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_write / tty_release

read-write to 0xffff88811611eda8 of 4 bytes by task 5372 on cpu 1:
 tty_release+0x60a/0x940 drivers/tty/tty_io.c:1821
 __fput+0x2c1/0x660 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811611eda8 of 4 bytes by task 5369 on cpu 0:
 n_tty_write+0x329/0xb90 drivers/tty/n_tty.c:2373
 iterate_tty_write drivers/tty/tty_io.c:1021 [inline]
 file_tty_write+0x386/0x690 drivers/tty/tty_io.c:1096
 tty_write+0x28/0x30 drivers/tty/tty_io.c:1117
 call_write_iter include/linux/fs.h:2120 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x765/0x8e0 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x27b7/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000002 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5369 Comm: syz-executor.3 Not tainted 6.9.0-syzkaller-07726-g3c999d1ae3c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/16 17:11 upstream 3c999d1ae3c7 c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_write / tty_release
* Struck through repros no longer work on HEAD.