nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done
mainline inclusion from mainline-v5.16-rc5 commit 4cd8371a category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9S23J CVE: CVE-2021-47518 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4cd8371a234d051f9c9557fcbb1f8c523b1c0d10 -------------------------------- The done() netlink callback nfc_genl_dump_ses_done() should check if received argument is non-NULL, because its allocation could fail earlier in dumpit() (nfc_genl_dump_ses()). Fixes: ac22ac46 ("NFC: Add a GET_SE netlink API") Signed-off-by:Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20211209081307.57337-1-krzysztof.kozlowski@canonical.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Luo Gengkun <luogengkun2@huawei.com>
Loading
Please sign in to comment