Commit dc7c9de1 authored by Rustam Kovhaev's avatar Rustam Kovhaev Committed by Liu Jian
Browse files

usb: hso: check for return value in hso_serial_common_create()

stable inclusion
from stable-v4.19.139
commit a46691bb7cc2686934748c8b33e4b9f5dc936aeb
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I93LMH
CVE: CVE-2021-46904

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a46691bb7cc2686934748c8b33e4b9f5dc936aeb



---------------------------

[ Upstream commit e911e99a ]

in case of an error tty_register_device_attr() returns ERR_PTR(),
add IS_ERR() check

Reported-and-tested-by: default avatar <syzbot+67b2bd0e34f952d0321e@syzkaller.appspotmail.com>
Link: https://syzkaller.appspot.com/bug?extid=67b2bd0e34f952d0321e


Signed-off-by: default avatarRustam Kovhaev <rkovhaev@gmail.com>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent b97b6350
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment