linux/net/nfc
Linmao Li 2e65bafdfd
nfc: nci: free destination parameters when closing a connection
When a connection is closed, nci_core_conn_close_rsp_packet() frees
conn_info but not conn_info->dest_params, which is a separate devm
allocation. Each connect/close cycle leaks one dest_params until the
NFC device is removed. Free dest_params along with conn_info.

Fixes: 9b8d1a4cf2 ("nfc: nci: Add an additional parameter to identify a connection id")
Cc: stable@vger.kernel.org
Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20260721023518.1697625-1-lilinmao@kylinos.cn
Signed-off-by: David Heidelberg <david@ixit.cz>
2026-08-11 18:10:04 +02:00
..
hci nfc: hci: fix out-of-bounds read in HCP header parsing 2026-05-07 12:42:09 +02:00
nci nfc: nci: free destination parameters when closing a connection 2026-08-11 18:10:04 +02:00
af_nfc.c nfc: fix error handling of nfc_proto_register() 2021-10-13 17:32:38 -07:00
core.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
digital_core.c nfc: digital: Do not dump a NULL response in command completion 2026-08-11 18:10:03 +02:00
digital_dep.c net:nfc:digital: Fix a double free in digital_tg_recv_dep_req 2021-04-27 15:36:10 -07:00
digital_technology.c nfc: digital: clamp SENSF_RES length to the destination buffer 2026-08-11 18:10:02 +02:00
digital.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
llcp_commands.c nfc: llcp: fix OOB read and u8 offset wrap in TLV parsers 2026-08-11 18:10:02 +02:00
llcp_core.c nfc: llcp: bound the connect_sn TLV walk to the skb 2026-08-11 18:10:03 +02:00
llcp_sock.c nfc: llcp: read llcp_sock->local under the socket lock in getsockopt 2026-08-11 18:10:02 +02:00
llcp.h net: nfc: Fix use-after-free caused by nfc_llcp_find_local 2023-06-26 10:57:23 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netlink.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nfc.h net: nfc: Fix use-after-free caused by nfc_llcp_find_local 2023-06-26 10:57:23 +01:00
rawsock.c nfc: rawsock: cancel tx_work before socket teardown 2026-03-04 18:18:57 -08:00