Subject: CVE-2023-52919: nfc: nci: fix possible NULL pointer dereference in send_acknowledge()

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

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.

The Linux kernel CVE team has assigned CVE-2023-52919 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 4.14.328 with commit 2b2edf089df3
	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 4.19.297 with commit 5622592f8f74
	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 5.4.259 with commit 76050b0cc5a7
	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 5.10.199 with commit c95fa5b20fe0
	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 5.15.137 with commit ffdc881f6807
	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 6.1.60 with commit d7dbdbe3800a
	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 6.5.9 with commit bb6cacc439dd
	Issue introduced in 3.11 with commit 391d8a2da787 and fixed in 6.6 with commit 7937609cd387

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2023-52919
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	net/nfc/nci/spi.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/2b2edf089df3a69f0072c6e71563394c5a94e62e
	https://git.kernel.org/stable/c/5622592f8f74ae3e594379af02e64ea84772d0dd
	https://git.kernel.org/stable/c/76050b0cc5a72e0c7493287b7e18e1cb9e3c4612
	https://git.kernel.org/stable/c/c95fa5b20fe03609e0894656fa43c18045b5097e
	https://git.kernel.org/stable/c/ffdc881f68073ff86bf21afb9bb954812e8278be
	https://git.kernel.org/stable/c/d7dbdbe3800a908eecd4975c31be47dd45e2104a
	https://git.kernel.org/stable/c/bb6cacc439ddd2cd51227ab193f4f91cfc7f014f
	https://git.kernel.org/stable/c/7937609cd387246aed994e81aa4fa951358fba41