syzbot


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

Status: moderation: reported on 2025/04/02 22:45
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+98d1723c756a6f0e7929@syzkaller.appspotmail.com
First crash: 1d14h, last: 1d14h
Similar bugs (12)
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 940d 940d 0/28 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 1202d 1245d 0/28 auto-closed as invalid on 2022/01/22 22:31
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (10) serial 2 330d 353d 0/28 auto-obsoleted due to no activity on 2024/06/13 09:39
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (4) serial 1 879d 879d 0/28 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 608d 612d 0/28 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 (12) serial 1 110d 110d 0/28 auto-obsoleted due to no activity on 2025/02/09 11:57
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (9) serial 2 429d 431d 0/28 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 571d 571d 0/28 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 1056d 1056d 0/28 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 471d 471d 0/28 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 (11) serial 1 237d 237d 0/28 auto-obsoleted due to no activity on 2024/09/14 05:07
upstream KCSAN: data-race in n_tty_check_unthrottle / n_tty_receive_buf_common (5) serial 1 712d 712d 0/28 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 0xffff8881179975dc of 4 bytes by task 5221 on cpu 0:
 tty_set_flow_change drivers/tty/tty.h:59 [inline]
 n_tty_check_unthrottle+0xdd/0x1d0 drivers/tty/n_tty.c:280
 n_tty_read+0xab3/0xd30 drivers/tty/n_tty.c:2312
 iterate_tty_read drivers/tty/tty_io.c:856 [inline]
 tty_read+0x15a/0x480 drivers/tty/tty_io.c:931
 new_sync_read fs/read_write.c:489 [inline]
 vfs_read+0x5e6/0x710 fs/read_write.c:570
 ksys_read+0xeb/0x1b0 fs/read_write.c:713
 __do_sys_read fs/read_write.c:722 [inline]
 __se_sys_read fs/read_write.c:720 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:720
 x64_sys_call+0x2a3b/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff8881179975dc of 4 bytes by task 5225 on cpu 1:
 n_tty_receive_buf_common+0xaf4/0xbe0 drivers/tty/n_tty.c:-1
 n_tty_receive_buf+0x30/0x40 drivers/tty/n_tty.c:1779
 tiocsti+0x16b/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+0x168d/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5225 Comm: syz.3.655 Not tainted 6.14.0-syzkaller-12508-g92b71befc349 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/02 22:45 upstream 92b71befc349 c799dfdd .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.