android_kernel_motorola_sm6225/net/nfc
Krzysztof Kozlowski 980629af14 nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
[ Upstream commit 0d9b41daa5907756a31772d8af8ac5ff25cf17c1 ]

If sock->service_name is NULL, the local variable
service_name_tlv_length will not be assigned by nfc_llcp_build_tlv(),
later leading to using value frmo the stack.  Smatch warning:

  net/nfc/llcp_commands.c:442 nfc_llcp_send_connect() error: uninitialized symbol 'service_name_tlv_length'.

Fixes: de9e5aeb4f ("NFC: llcp: Fix usage of llcp_add_tlv()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:04 +02:00
..
hci nfc: constify several pointers to u8, char and sk_buff 2023-08-11 11:45:03 +02:00
nci NFC: nci: Bounds check struct nfc_target arrays 2022-12-14 11:28:30 +01:00
af_nfc.c nfc: fix error handling of nfc_proto_register() 2021-10-20 11:23:04 +02:00
core.c nfc: constify several pointers to u8, char and sk_buff 2023-08-11 11:45:03 +02:00
digital.h NFC: digital: Add 'tg_listen_md' and 'tg_get_rf_tech' driver hooks 2014-07-23 01:17:31 +02:00
digital_core.c NFC: digital: fix possible memory leak in digital_tg_listen_mdaa() 2021-10-20 11:23:04 +02:00
digital_dep.c net:nfc:digital: Fix a double free in digital_tg_recv_dep_req 2021-05-22 10:59:38 +02:00
digital_technology.c NFC: digital: fix possible memory leak in digital_in_send_sdd_req() 2021-10-20 11:23:04 +02:00
Kconfig NFC Digital: Add NFC-F technology support 2013-09-25 02:02:25 +02:00
llcp.h nfc: constify several pointers to u8, char and sk_buff 2023-08-11 11:45:03 +02:00
llcp_commands.c nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect() 2023-08-11 11:45:04 +02:00
llcp_core.c nfc: constify several pointers to u8, char and sk_buff 2023-08-11 11:45:03 +02:00
llcp_sock.c nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind() 2022-01-27 09:04:15 +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 nfc: change order inside nfc_se_io error path 2023-03-17 08:31:42 +01:00
nfc.h nfc: constify several pointers to u8, char and sk_buff 2023-08-11 11:45:03 +02:00
rawsock.c net/nfc/rawsock.c: fix a permission check bug 2021-06-16 11:54:56 +02:00