syzbot


KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (10)

Status: moderation: reported on 2024/04/15 16:05
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+6241e42afd7f404fd187@syzkaller.appspotmail.com
First crash: 14d, last: 14d
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (3) serial 1 601d 601d 0/26 auto-obsoleted due to no activity on 2022/10/12 09:32
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common serial 3 863d 906d 0/26 auto-closed as invalid on 2022/01/22 22:31
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (4) serial 1 540d 540d 0/26 auto-obsoleted due to no activity on 2022/12/12 09:48
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (6) serial 2 269d 273d 0/26 auto-obsoleted due to no activity on 2023/09/09 12:48
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (9) serial 2 91d 92d 0/26 auto-obsoleted due to no activity on 2024/03/05 13:33
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (7) serial 1 232d 232d 0/26 auto-obsoleted due to no activity on 2023/10/16 13:09
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (2) serial 1 717d 717d 0/26 auto-closed as invalid on 2022/06/18 01:09
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (8) serial 1 132d 132d 0/26 auto-obsoleted due to no activity on 2024/01/24 11:50
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (5) serial 1 373d 373d 0/26 auto-obsoleted due to no activity on 2023/05/28 00:42

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common

write to 0xffff8881160d25dc of 4 bytes by task 26211 on cpu 0:
 tty_set_flow_change drivers/tty/tty.h:59 [inline]
 n_tty_check_unthrottle+0xd7/0x1c0 drivers/tty/n_tty.c:280
 n_tty_read+0xf0b/0x11d0 drivers/tty/n_tty.c:2302
 iterate_tty_read drivers/tty/tty_io.c:862 [inline]
 tty_read+0x15b/0x480 drivers/tty/tty_io.c:937
 call_read_iter include/linux/fs.h:2104 [inline]
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5bc/0x6b0 fs/read_write.c:476
 ksys_read+0xeb/0x1b0 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:627
 x64_sys_call+0x27ad/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:1
 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

write to 0xffff8881160d25dc of 4 bytes by task 26214 on cpu 1:
 n_tty_receive_buf_common+0xae5/0xbd0
 n_tty_receive_buf+0x30/0x40 drivers/tty/n_tty.c:1769
 tiocsti+0x166/0x1d0 drivers/tty/tty_io.c:2299
 tty_ioctl+0x415/0xbe0 drivers/tty/tty_io.c:2717
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:904 [inline]
 __se_sys_ioctl+0xd3/0x150 fs/ioctl.c:890
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:890
 x64_sys_call+0x155d/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:17
 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: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 26214 Comm: syz-executor.3 Not tainted 6.9.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/15 16:04 upstream 0bbac3facb5d b9af7e61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common
* Struck through repros no longer work on HEAD.