syzbot


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

Status: auto-obsoleted due to no activity on 2023/12/30 14:50
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+f8f7ab84ef7b57986529@syzkaller.appspotmail.com
First crash: 159d, last: 159d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_write / tty_reopen serial 2 1101d 1112d 0/26 auto-closed as invalid on 2021/05/31 23:44
upstream KCSAN: data-race in n_tty_write / tty_reopen (3) serial 5 930d 996d 0/26 auto-closed as invalid on 2021/11/19 17:25
upstream KCSAN: data-race in n_tty_write / tty_reopen (6) serial 1 277d 277d 0/26 auto-obsoleted due to no activity on 2023/09/03 02:21
upstream KCSAN: data-race in n_tty_write / tty_reopen (4) serial 3 834d 863d 0/26 auto-closed as invalid on 2022/02/23 15:12
upstream KCSAN: data-race in n_tty_write / tty_reopen (8) serial 4 32d 104d 0/26 moderation: reported on 2024/01/19 08:53
upstream KCSAN: data-race in n_tty_write / tty_reopen (5) serial 1 772d 772d 0/26 auto-closed as invalid on 2022/04/26 05:30
upstream KCSAN: data-race in n_tty_write / tty_reopen (2) serial 1 1049d 1049d 0/26 auto-closed as invalid on 2021/07/23 04:44

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

read-write to 0xffff88813f1e71a8 of 4 bytes by task 1198 on cpu 1:
 tty_reopen+0x10c/0x1b0 drivers/tty/tty_io.c:1367
 tty_open_by_driver drivers/tty/tty_io.c:2078 [inline]
 tty_open+0x8f4/0xb00 drivers/tty/tty_io.c:2131
 chrdev_open+0x322/0x390 fs/char_dev.c:414
 do_dentry_open+0x635/0xbd0 fs/open.c:948
 vfs_open+0x4a/0x50 fs/open.c:1082
 do_open fs/namei.c:3622 [inline]
 path_openat+0x1819/0x1d70 fs/namei.c:3779
 do_filp_open+0xf6/0x200 fs/namei.c:3809
 do_sys_openat2+0xab/0x110 fs/open.c:1440
 do_sys_open fs/open.c:1455 [inline]
 __do_sys_openat fs/open.c:1471 [inline]
 __se_sys_openat fs/open.c:1466 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1466
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88813f1e71a8 of 4 bytes by task 1196 on cpu 0:
 n_tty_write+0x321/0xb60 drivers/tty/n_tty.c:2373
 iterate_tty_write drivers/tty/tty_io.c:1021 [inline]
 file_tty_write+0x382/0x680 drivers/tty/tty_io.c:1092
 tty_write+0x28/0x30 drivers/tty/tty_io.c:1113
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x48a/0x790 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000001 -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1196 Comm: syz-executor.2 Not tainted 6.7.0-rc2-syzkaller-00195-g0f5cc96c367f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/25 14:50 upstream 0f5cc96c367f 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_write / tty_reopen
* Struck through repros no longer work on HEAD.