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

4 views
Skip to first unread message

syzbot

unread,
Nov 11, 2024, 1:22:30 AM11/11/24
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a9cda7c0ffed Merge tag 'irq_urgent_for_v6.12_rc7' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1042935f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=e351f666e62e0b06
dashboard link: https://syzkaller.appspot.com/bug?extid=c7584e16b268d10c87e7
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
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/2e2674428251/disk-a9cda7c0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/0111f7e76c0c/vmlinux-a9cda7c0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/cc3fbcf76077/bzImage-a9cda7c0.xz

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

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

write to 0xffffc90005d70270 of 8 bytes by task 5947 on cpu 0:
reset_buffer_flags drivers/tty/n_tty.c:328 [inline]
n_tty_flush_buffer+0x9f/0x190 drivers/tty/n_tty.c:359
tty_ldisc_hangup+0x72/0x370 drivers/tty/tty_ldisc.c:699
__tty_hangup+0x3b1/0x530 drivers/tty/tty_io.c:624
tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:694
pty_close+0x262/0x280 drivers/tty/pty.c:79
tty_release+0x206/0x930 drivers/tty/tty_io.c:1754
__fput+0x17a/0x6d0 fs/file_table.c:431
____fput+0x1c/0x30 fs/file_table.c:459
task_work_run+0x13a/0x1a0 kernel/task_work.c:239
get_signal+0xee9/0x1070 kernel/signal.c:2691
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x59/0x130 kernel/entry/common.c:218
do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read-write to 0xffffc90005d70270 of 8 bytes by task 28 on cpu 1:
n_tty_lookahead_flow_ctrl+0x48/0x130 drivers/tty/n_tty.c:1507
tty_port_default_lookahead_buf+0x8a/0xc0 drivers/tty/tty_port.c:59
lookahead_bufs drivers/tty/tty_buffer.c:428 [inline]
flush_to_ldisc+0x31c/0x410 drivers/tty/tty_buffer.c:498
process_one_work kernel/workqueue.c:3229 [inline]
process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
kthread+0x1d1/0x210 kernel/kthread.c:389
ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x0000000000001fed -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 28 Comm: kworker/u8:1 Not tainted 6.12.0-rc6-syzkaller-00318-ga9cda7c0ffed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
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

syzbot

unread,
Jun 27, 2025, 8:49:14 AM6/27/25
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages