linux/net/nfc
Ömer Mete Kaya 408cff6bd6
nfc: llcp: fix WKS SAP hijacking via prefix match in nfc_llcp_wks_sap()
nfc_llcp_wks_sap() compares only service_name_len bytes, so a short
service_name like "u" matches longer WKS strings like "urn:nfc:sn:snep".
Fix by requiring exact length match before strncmp().

Fixes: d646960f79 ("NFC: Initial LLCP support")
Signed-off-by: Ömer Mete Kaya <omermetekaya0@gmail.com>
Link: https://patch.msgid.link/20260909121437.33744-1-omermetekaya0@gmail.com
Signed-off-by: David Heidelberg <david@ixit.cz>
2026-09-23 22:13:17 +02:00
..
hci nfc: hci: fix out-of-bounds read in HCP header parsing 2026-05-07 12:42:09 +02:00
nci nfc: fix use-after-free in nfc_get_local_general_bytes 2026-09-23 22:13:17 +02:00
af_nfc.c nfc: fix error handling of nfc_proto_register() 2021-10-13 17:32:38 -07:00
core.c nfc: fix use-after-free in nfc_get_local_general_bytes 2026-09-23 22:13:17 +02: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 nfc: fix use-after-free in nfc_get_local_general_bytes 2026-09-23 22:13:17 +02: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: fix WKS SAP hijacking via prefix match in nfc_llcp_wks_sap() 2026-09-23 22:13:17 +02:00
llcp_sock.c nfc: llcp: fix -ENOMEM on connect with zero-length service name 2026-09-23 22:13:17 +02:00
llcp.h nfc: llcp: Fix race condition in accept_queue lifecycle 2026-09-23 22:13:16 +02:00
Makefile
netlink.c nfc: llcp: fix sdreq TLV list leak on parse/alloc/send failure 2026-09-23 22:13:17 +02:00
nfc.h nfc: fix use-after-free in nfc_get_local_general_bytes 2026-09-23 22:13:17 +02:00
rawsock.c nfc: rawsock: cancel tx_work before socket teardown 2026-03-04 18:18:57 -08:00