syzbot


KCSAN: data-race in n_tty_write / tty_reopen (3)

Status: auto-closed as invalid on 2021/11/19 17:25
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 473d, last: 407d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_write / tty_reopen 2 578d 590d 0/24 auto-closed as invalid on 2021/05/31 23:44
upstream KCSAN: data-race in n_tty_write / tty_reopen (4) 3 311d 340d 0/24 auto-closed as invalid on 2022/02/23 15:12
upstream KCSAN: data-race in n_tty_write / tty_reopen (5) 1 249d 249d 0/24 auto-closed as invalid on 2022/04/26 05:30
upstream KCSAN: data-race in n_tty_write / tty_reopen (2) 1 526d 526d 0/24 auto-closed as invalid on 2021/07/23 04:44

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

write to 0xffff88810289d9a8 of 4 bytes by task 8881 on cpu 1:
 tty_reopen+0x114/0x1c0 drivers/tty/tty_io.c:1376
 tty_open_by_driver drivers/tty/tty_io.c:2092 [inline]
 tty_open+0x900/0xb60 drivers/tty/tty_io.c:2146
 chrdev_open+0x39e/0x420 fs/char_dev.c:414
 do_dentry_open+0x52c/0x860 fs/open.c:822
 vfs_open+0x43/0x50 fs/open.c:945
 do_open fs/namei.c:3428 [inline]
 path_openat+0x17c3/0x1ec0 fs/namei.c:3561
 do_filp_open+0x105/0x220 fs/namei.c:3588
 do_sys_openat2+0xb5/0x2b0 fs/open.c:1200
 do_sys_open fs/open.c:1216 [inline]
 __do_sys_openat fs/open.c:1232 [inline]
 __se_sys_openat fs/open.c:1227 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1227
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88810289d9a8 of 4 bytes by task 8585 on cpu 0:
 n_tty_write+0x2e8/0xaf0 drivers/tty/n_tty.c:2282
 do_tty_write drivers/tty/tty_io.c:1038 [inline]
 file_tty_write+0x409/0x660 drivers/tty/tty_io.c:1110
 tty_write+0x24/0x30 drivers/tty/tty_io.c:1131
 call_write_iter include/linux/fs.h:2163 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x7bc/0x900 fs/read_write.c:594
 ksys_write+0xd9/0x190 fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:656
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000001 -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 8585 Comm: syz-executor.3 Not tainted 5.15.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/10/15 17:22 upstream 8fe31e0995f0 0c5d9412 .config log report info KCSAN: data-race in n_tty_write / tty_reopen
ci2-upstream-kcsan-gce 2021/10/06 14:05 upstream 60a9483534ed 0a63fd36 .config log report info KCSAN: data-race in n_tty_write / tty_reopen
ci2-upstream-kcsan-gce 2021/09/05 22:37 upstream a9c9a6f741cd d236a457 .config log report info KCSAN: data-race in n_tty_write / tty_reopen
ci2-upstream-kcsan-gce 2021/09/02 13:43 upstream 4ac6d90867a4 d0f0970b .config log report info KCSAN: data-race in n_tty_write / tty_reopen
ci2-upstream-kcsan-gce 2021/08/10 16:26 upstream 9a73fa375d58 6972b106 .config log report info KCSAN: data-race in n_tty_write / tty_reopen
* Struck through repros no longer work on HEAD.