Commit d22a0056 authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Liu Jian
Browse files

net: caif: add proper error handling

stable inclusion
from stable-v4.19.194
commit 758f725c392ec073f9f1cfbe34323ca1372afbf8
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I990B2
CVE: CVE-2021-47121

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



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

commit a2805dca upstream.

caif_enroll_dev() can fail in some cases. Ingnoring
these cases can lead to memory leak due to not assigning
link_support pointer to anywhere.

Fixes: 7c18d220 ("caif: Restructure how link caif link layer enroll")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent 6e1ea6a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment