CVE-2026-23339: nfc: nci: free skb on nci_transceive early error paths
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
nfc: nci: free skb on nci_transceive early error paths
nci_transceive() takes ownership of the skb passed by the caller, but the -EPROTO, -EINVAL, and -EBUSY error paths return without freeing it.
Due to issues clearing NCI_DATA_EXCHANGE fixed by subsequent changes the nci/nci_dev selftest hits the error path occasionally in NIPA, and kmemleak detects leaks:
unreferenced object 0xff11000015ce6a40 (size 640):
comm "nci_dev", pid 3954, jiffies 4295441246
hex dump (first 32 bytes):
6b 6b 6b 6b 00 a4 00 0c 02 e1 03 6b 6b 6b 6b 6b kkkk.......kkkkk 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
backtrace (crc 7c40cc2a):
kmem_cache_alloc_node_noprof+0x492/0x630
__alloc_skb+0x11e/0x5f0
alloc_skb_with_frags+0xc6/0x8f0
sock_alloc_send_pskb+0x326/0x3f0
nfc_alloc_send_skb+0x94/0x1d0
rawsock_sendmsg+0x162/0x4c0
do_syscall_64+0x117/0xfc0The Linux kernel CVE team has assigned CVE-2026-23339 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.2 with commit 6a2968aaf50c7a22fced77a5e24aa636281efca8 and fixed in 6.1.167 with commit 33f6b8a96dda045789796c3bcb451c74ac158039 Issue introduced in 3.2 with commit 6a2968aaf50c7a22fced77a5e24aa636281efca8 and fixed in 6.6.130 with commit dcbcccfc5195c9caaa4bb8d31f23c345f00a9e89 Issue introduced in 3.2 with commit 6a2968aaf50c7a22fced77a5e24aa636281efca8 and fixed in 6.12.77 with commit 3245801d44a44c090acefe19a12d22d12cac45c5 Issue introduced in 3.2 with commit 6a2968aaf50c7a22fced77a5e24aa636281efca8 and fixed in 6.18.17 with commit 9d448bbab724b94d6c561e1f314656f5b88a7cb3 Issue introduced in 3.2 with commit 6a2968aaf50c7a22fced77a5e24aa636281efca8 and fixed in 6.19.7 with commit 54f7f0eaafa56b5994cdb5c7967946922c2e1d22 Issue introduced in 3.2 with commit 6a2968aaf50c7a22fced77a5e24aa636281efca8 and fixed in 7.0-rc3 with commit 7bd4b0c4779f978a6528c9b7937d2ca18e936e2c
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-2026-23339
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/core.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/33f6b8a96dda045789796c3bcb451c74ac158039 https://git.kernel.org/stable/c/dcbcccfc5195c9caaa4bb8d31f23c345f00a9e89 https://git.kernel.org/stable/c/3245801d44a44c090acefe19a12d22d12cac45c5 https://git.kernel.org/stable/c/9d448bbab724b94d6c561e1f314656f5b88a7cb3 https://git.kernel.org/stable/c/54f7f0eaafa56b5994cdb5c7967946922c2e1d22 https://git.kernel.org/stable/c/7bd4b0c4779f978a6528c9b7937d2ca18e936e2c