linux-stable/drivers/nfc
Shang XiaoJing 92a1df9c6d nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
[ Upstream commit 93d904a734 ]

nfcmrvl_i2c_nci_send() will be called by nfcmrvl_nci_send(), and skb
should be freed in nfcmrvl_i2c_nci_send(). However, nfcmrvl_nci_send()
will only free skb when i2c_master_send() return >=0, which means skb
will memleak when i2c_master_send() failed. Free skb no matter whether
i2c_master_send() succeeds.

Fixes: b5b3e23e4c ("NFC: nfcmrvl: add i2c driver")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-10 18:17:17 +01:00
..
fdp nfc: fdp: Fix potential memory leak in fdp_nci_send() 2022-11-10 18:17:16 +01:00
microread nfc: microread: drop unneeded debug prints 2021-10-11 17:00:52 -07:00
nfcmrvl nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send() 2022-11-10 18:17:17 +01:00
nxp-nci nfc: nxp-nci: Fix potential memory leak in nxp_nci_send() 2022-11-10 18:17:17 +01:00
pn533 nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout 2022-08-22 14:51:30 +01:00
pn544 nfc: pn544: make array rset_cmd static const 2022-01-11 21:09:03 -08:00
s3fwrn5 nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send() 2022-11-10 18:17:17 +01:00
st-nci spi: Make remove() return void 2022-02-28 10:43:07 -08:00
st21nfca nfc: st21nfca: fix incorrect sizing calculations in EVT_TRANSACTION 2022-06-08 10:17:17 -07:00
st95hf spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
Kconfig nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
Makefile nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
mei_phy.c nfc: mei_phy: constify buffer passed to mei_nfc_send() 2021-07-29 12:28:02 +01:00
mei_phy.h nfc: constify nfc_phy_ops 2021-07-25 09:21:21 +01:00
nfcsim.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
port100.c NFC: port100: fix use-after-free in port100_send_complete 2022-03-09 19:59:34 -08:00
trf7970a.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
virtual_ncidev.c nfc: virtual_ncidev: Fix memory leak in virtual_nci_send() 2022-11-04 00:00:29 +09:00