KCSAN: data-race in n_tty_receive_char_special / n_tty_receive_char_special (2)

5 views
Skip to first unread message

syzbot

unread,
Apr 3, 2020, 6:55:15 AM4/3/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 766d004d mm, kcsan: Instrument SLAB free with ASSERT_EXCLU..
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=13c45a81e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=b313b4492ea15bae
dashboard link: https://syzkaller.appspot.com/bug?extid=cb869f322216bea2107f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [gre...@linuxfoundation.org jsl...@suse.com linux-...@vger.kernel.org el...@google.com]

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

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

==================================================================
BUG: KCSAN: data-race in n_tty_receive_char_special / n_tty_receive_char_special

write to 0xffffc900012c7018 of 8 bytes by task 27178 on cpu 0:
add_echo_byte drivers/tty/n_tty.c:845 [inline]
echo_char_raw drivers/tty/n_tty.c:923 [inline]
eraser drivers/tty/n_tty.c:1079 [inline]
n_tty_receive_char_special+0x116d/0x1bc0 drivers/tty/n_tty.c:1316
n_tty_receive_buf_fast drivers/tty/n_tty.c:1610 [inline]
__receive_buf drivers/tty/n_tty.c:1644 [inline]
n_tty_receive_buf_common+0x17d6/0x1a40 drivers/tty/n_tty.c:1742
n_tty_receive_buf+0x36/0x50 drivers/tty/n_tty.c:1771
tiocsti drivers/tty/tty_io.c:2200 [inline]
tty_ioctl+0xaf5/0xd80 drivers/tty/tty_io.c:2576
vfs_ioctl fs/ioctl.c:47 [inline]
ksys_ioctl+0x101/0x150 fs/ioctl.c:763
__do_sys_ioctl fs/ioctl.c:772 [inline]
__se_sys_ioctl fs/ioctl.c:770 [inline]
__x64_sys_ioctl+0x47/0x60 fs/ioctl.c:770
do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffc900012c7018 of 8 bytes by task 15609 on cpu 1:
add_echo_byte drivers/tty/n_tty.c:845 [inline]
echo_char_raw drivers/tty/n_tty.c:923 [inline]
eraser drivers/tty/n_tty.c:1084 [inline]
n_tty_receive_char_special+0x125d/0x1bc0 drivers/tty/n_tty.c:1316
n_tty_receive_buf_fast drivers/tty/n_tty.c:1610 [inline]
__receive_buf drivers/tty/n_tty.c:1644 [inline]
n_tty_receive_buf_common+0x17d6/0x1a40 drivers/tty/n_tty.c:1742
n_tty_receive_buf2+0x39/0x50 drivers/tty/n_tty.c:1777
tty_ldisc_receive_buf+0x69/0xe0 drivers/tty/tty_buffer.c:461
tty_port_default_receive_buf+0x82/0xd0 drivers/tty/tty_port.c:38
receive_buf drivers/tty/tty_buffer.c:481 [inline]
flush_to_ldisc+0x1dd/0x260 drivers/tty/tty_buffer.c:533
process_one_work+0x424/0x930 kernel/workqueue.c:2264
worker_thread+0x9a/0x7e0 kernel/workqueue.c:2410
kthread+0x1cb/0x1f0 kernel/kthread.c:255
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 15609 Comm: kworker/u4:7 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound flush_to_ldisc
==================================================================


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 19, 2020, 7:58:08 AM6/19/20
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