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:Pavel Skripkin <paskripkin@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Liu Jian <liujian56@huawei.com>
Loading
Please sign in to comment