linux/drivers/nfc
Chengfeng Ye 572599cbf1 nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails
[ Upstream commit 9fec40f850658e00a14a7dd9e06f7fbc7e59cc4a ]

skb is already freed by dev_kfree_skb in pn533_fill_fragment_skbs,
but follow error handler branch when pn533_fill_fragment_skbs()
fails, skb is freed again, results in double free issue. Fix this
by not free skb in error path of pn533_fill_fragment_skbs.

Fixes: 963a82e07d ("NFC: pn533: Split large Tx frames in chunks")
Fixes: 93ad42020c ("NFC: pn533: Target mode Tx fragmentation support")
Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-17 09:48:47 +01:00
..
fdp NFC: fdp: Fix a signedness bug in fdp_nci_send_patch() 2020-04-01 11:01:38 +02:00
microread treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 399 2019-06-05 17:37:12 +02:00
nfcmrvl NFC: nfcmrvl: fix gpio-handling regression 2019-08-05 10:25:48 -07:00
nxp-nci NFC: nxp-nci: Fix probing without ACPI 2019-12-31 16:41:49 +01:00
pn533 nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails 2021-11-17 09:48:47 +01:00
pn544 nfc: pn544: Fix occasional HW initialization failure 2020-03-05 16:43:32 +01:00
s3fwrn5 nfc: s3fwrn5: Release the nfc firmware 2020-12-30 11:51:26 +01:00
st-nci st_nci_hci_connectivity_event_received: null check the allocation 2019-07-25 11:48:06 -07:00
st21nfca NFC: st21nfca: add missed kfree_skb() in an error path 2020-06-10 20:24:54 +02:00
st95hf NFC: st95hf: Fix memleak in st95hf_in_send_cmd 2020-09-17 13:47:45 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
mei_phy.c
mei_phy.h
nfcsim.c nfc: nfcsim: fix use after free during module unload 2021-08-04 12:27:38 +02:00
port100.c nfc: port100: fix using -ERRNO as command type mask 2021-11-02 19:46:12 +01:00
trf7970a.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 417 2019-06-05 17:37:15 +02:00