[moderation] [serial?] KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl (8)

0 views
Skip to first unread message

syzbot

unread,
Sep 18, 2025, 4:33:33 PM (2 days ago) Sep 18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8b789f2b7602 Merge tag 'mm-hotfixes-stable-2025-09-17-21-1..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=153e1c7c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6e0c213d0735f5dd
dashboard link: https://syzkaller.appspot.com/bug?extid=2c07226023b8cff07b76
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [gre...@linuxfoundation.org jiri...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d27f31fd8806/disk-8b789f2b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2f3ad0aec29b/vmlinux-8b789f2b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/cb1aaa046381/bzImage-8b789f2b.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2c0722...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl

write to 0xffffc90002eb7270 of 8 bytes by task 3760 on cpu 0:
reset_buffer_flags drivers/tty/n_tty.c:322 [inline]
n_tty_flush_buffer+0xa8/0x180 drivers/tty/n_tty.c:353
tty_ldisc_hangup+0x77/0x370 drivers/tty/tty_ldisc.c:699
__tty_hangup+0x3c2/0x540 drivers/tty/tty_io.c:621
tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:691
pty_close+0x266/0x290 drivers/tty/pty.c:79
tty_release+0x1fc/0xb10 drivers/tty/tty_io.c:1745
__fput+0x29b/0x650 fs/file_table.c:468
____fput+0x1c/0x30 fs/file_table.c:496
task_work_run+0x12e/0x1a0 kernel/task_work.c:227
get_signal+0xe13/0xf70 kernel/signal.c:2807
arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x7a/0x100 kernel/entry/common.c:40
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read-write to 0xffffc90002eb7270 of 8 bytes by task 12 on cpu 1:
n_tty_lookahead_flow_ctrl+0x48/0x130 drivers/tty/n_tty.c:1491
tty_port_default_lookahead_buf+0x91/0xc0 drivers/tty/tty_port.c:59
lookahead_bufs drivers/tty/tty_buffer.c:428 [inline]
flush_to_ldisc+0x285/0x340 drivers/tty/tty_buffer.c:498
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0x4cb/0x9d0 kernel/workqueue.c:3319
worker_thread+0x582/0x770 kernel/workqueue.c:3400
kthread+0x489/0x510 kernel/kthread.c:463
ret_from_fork+0x11f/0x1b0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

value changed: 0x000000000000243e -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 12 Comm: kworker/u8:0 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Workqueue: events_unbound flush_to_ldisc
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages