[moderation] [serial?] KCSAN: data-race in n_tty_write / tty_set_termios (11)

0 views
Skip to first unread message

syzbot

unread,
Jun 19, 2024, 7:07:23 AM (10 days ago) Jun 19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 92e5605a199e Merge tag 'linux_kselftest-fixes-6.10-rc5' of..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14a76851980000
kernel config: https://syzkaller.appspot.com/x/.config?x=704451bc2941bcb0
dashboard link: https://syzkaller.appspot.com/bug?extid=a469633f93ab54a7e2e3
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/f9372939a8c4/disk-92e5605a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a0db084d0cae/vmlinux-92e5605a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f39e8696548d/bzImage-92e5605a.xz

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

==================================================================
BUG: KCSAN: data-race in n_tty_write / tty_set_termios

read-write to 0xffff888111915914 of 4 bytes by task 30099 on cpu 1:
unset_locked_termios drivers/tty/tty_ioctl.c:217 [inline]
tty_set_termios+0x1a2/0x8b0 drivers/tty/tty_ioctl.c:340
set_termios+0x365/0x4e0 drivers/tty/tty_ioctl.c:520
tty_mode_ioctl+0x391/0x5d0
n_tty_ioctl_helper+0x8d/0x240 drivers/tty/tty_ioctl.c:986
n_tty_ioctl+0xfd/0x200 drivers/tty/n_tty.c:2521
tty_ioctl+0x886/0xbe0 drivers/tty/tty_io.c:2812
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl+0xd3/0x150 fs/ioctl.c:893
__x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
x64_sys_call+0x1581/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:17
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888111915914 of 4 bytes by task 30098 on cpu 0:
n_tty_write+0xa0/0xb90 drivers/tty/n_tty.c:2366
iterate_tty_write drivers/tty/tty_io.c:1021 [inline]
file_tty_write+0x386/0x690 drivers/tty/tty_io.c:1096
tty_write+0x28/0x30 drivers/tty/tty_io.c:1117
new_sync_write fs/read_write.c:497 [inline]
vfs_write+0x78f/0x900 fs/read_write.c:590
ksys_write+0xeb/0x1b0 fs/read_write.c:643
__do_sys_write fs/read_write.c:655 [inline]
__se_sys_write fs/read_write.c:652 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:652
x64_sys_call+0x27ef/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00008a3b -> 0x0000001f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 30098 Comm: syz-executor.4 Tainted: G W 6.10.0-rc4-syzkaller-00045-g92e5605a199e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================


---
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