nfc: nci: fix possible NULL pointer dereference in send_acknowledge()
stable inclusion from stable-v4.19.297 commit 5622592f8f74ae3e594379af02e64ea84772d0dd category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8YCSH CVE: CVE-2023-46343 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5622592f8f74ae3e594379af02e64ea84772d0dd -------------------------------- commit 7937609c upstream. Handle memory allocation failure from nci_skb_alloc() (calling alloc_skb()) to avoid possible NULL pointer dereference. Reported-by:黄思聪 <huangsicong@iie.ac.cn> Fixes: 391d8a2d ("NFC: Add NCI over SPI receive") Cc: <stable@vger.kernel.org> Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20231013184129.18738-1-krzysztof.kozlowski@linaro.org Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Ziyang Xuan <william.xuanziyang@huawei.com>
Loading
Please sign in to comment