]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Oct 2023 00:34:53 +0000 (17:34 -0700)
commit7937609cd387246aed994e81aa4fa951358fba41
tree63070df34f7e0ad79b9e57621dabb0ae0d439b3d
parent503930f8e113edc86f92b767efb4ea57bdffffb2
nfc: nci: fix possible NULL pointer dereference in send_acknowledge()

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>
net/nfc/nci/spi.c