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

2 views
Skip to first unread message

syzbot

unread,
Dec 21, 2023, 11:56:27 PM12/21/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9a6b294ab496 afs: Fix use-after-free due to get/remove rac..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13f60ccee80000
kernel config: https://syzkaller.appspot.com/x/.config?x=989a728d0f884055
dashboard link: https://syzkaller.appspot.com/bug?extid=87e59071df53d6aa0f00
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/0f06283de702/disk-9a6b294a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c0d968a7d11c/vmlinux-9a6b294a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6e8a5d6779b3/bzImage-9a6b294a.xz

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

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

write to 0xffffc9000e40b270 of 8 bytes by task 30619 on cpu 0:
reset_buffer_flags drivers/tty/n_tty.c:328 [inline]
n_tty_flush_buffer+0x9f/0x180 drivers/tty/n_tty.c:359
tty_ldisc_hangup+0x6e/0x360 drivers/tty/tty_ldisc.c:693
__tty_hangup+0x3c6/0x530 drivers/tty/tty_io.c:630
tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:700
pty_close+0x262/0x280 drivers/tty/pty.c:79
tty_release+0x204/0x930 drivers/tty/tty_io.c:1756
__fput+0x299/0x630 fs/file_table.c:394
____fput+0x15/0x20 fs/file_table.c:422
task_work_run+0x135/0x1a0 kernel/task_work.c:180
get_signal+0xf04/0x10a0 kernel/signal.c:2680
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296
do_syscall_64+0x50/0x110 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read-write to 0xffffc9000e40b270 of 8 bytes by task 5218 on cpu 1:
n_tty_lookahead_flow_ctrl+0x48/0x130 drivers/tty/n_tty.c:1507
tty_port_default_lookahead_buf+0x87/0xb0 drivers/tty/tty_port.c:59
lookahead_bufs drivers/tty/tty_buffer.c:427 [inline]
flush_to_ldisc+0x30c/0x400 drivers/tty/tty_buffer.c:497
process_one_work kernel/workqueue.c:2627 [inline]
process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2700
worker_thread+0x525/0x730 kernel/workqueue.c:2781
kthread+0x1d7/0x210 kernel/kthread.c:388
ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

value changed: 0x0000000000001202 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5218 Comm: kworker/u4:10 Not tainted 6.7.0-rc6-syzkaller-00168-g9a6b294ab496 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
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,
Jan 25, 2024, 11:56:17 PMJan 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