]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfc: nci: fix possible NULL pointer dereference in send_acknowledge()
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 13 Oct 2023 18:41:29 +0000 (20:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:58:55 +0000 (11:58 +0200)
commitffdc881f68073ff86bf21afb9bb954812e8278be
tree7c77fd5da9a82c198201c51f956cb4d9ecaf5b12
parentd42aeae14fc40e5438476ca417f5ac6daa3c9a5a
nfc: nci: fix possible NULL pointer dereference in send_acknowledge()

commit 7937609cd387246aed994e81aa4fa951358fba41 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: 391d8a2da787 ("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>
net/nfc/nci/spi.c