* [PATCH v5 0/5] net/nfc: fix skb ownership, reassembly cleanup, and NCI status errors
@ 2026-11-27 13:40 Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 1/5] net/nfc: fix skb ownership on data exchange errors Bin Luo (University of Electronic Science and Technology of China)
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Bin Luo (University of Electronic Science and Technology of China) @ 2026-11-27 13:40 UTC (permalink / raw)
To: oe-linux-nfc; +Cc: johan, david, kuba, netdev
Hi,
This v5 series addresses all four findings from the Sashiko AI review on
v4 and includes the discovery method requested by netdev-bot+sinfo:
Changes in v5:
- Split the former v4 Patch 1/2 into four single-purpose patches with
accurate problem descriptions and complete Fixes: tags covering each
affected driver/layer:
- 1/5: Document the data_exchange_cb_t ownership contract and fix
callback skb leaks across rawsock, LLCP, HCI/NCI-HCI, Microread,
PN544, and ST21NFCA (explicitly covering ST21NFCA DEP success-path
leaks on READER_F, r < 0, and unknown PFB types), synchronize
HCI/NCI-HCI rx_hcp_frags with a local splice, and accurately
describe the nci_nfcc_loopback_cb() NULL-dereference / !conn_info
leak (noting the current mainline NCI_DATA_EXCHANGE gating nuance).
- 2/5: Fix double-free of resp after queueing to dev->resp_q in PN533
(both pn533_data_exchange_complete() and
pn533_tm_get_data_complete()).
- 3/5: Fix missing completion callbacks on terminal errors in Digital
DEP (preventing hangs and socket refcount leaks).
- 4/5: Drop stale ndev->rx_data_reassembly on NCI data-status errors,
unconditionally on CORE_INTERFACE_ERROR_NTF (outside the
NCI_DATA_EXCHANGE check, covering listen/target mode), on
data-exchange timeouts, and in nci_close_device() after
flush_workqueue(ndev->rx_wq) on both close paths (guarded by
req_lock and !NCI_UP).
- 5/5: Preserve signed errno codes in nci_add_rx_data_frag() (former
v4 Patch 2/2).
- Document the discovery method in every commit message (static
call-chain audit and code inspection, with QEMU KASAN+kmemleak
reproduction for the NCI status truncation and rawsock leak).
Validation:
- All 5 patches apply cleanly on v7.4-rc5 (4dce97c6c265) and pass
full-tree scripts/checkpatch.pl --strict (0 errors, 0 checks; the
only 2 warnings in 1/5 are checkpatch codespell false positives on
the verbatim upstream commit subject of Fixes: 97f18414af39).
- W=1 compilation of all 13 modified NFC object files (rawsock,
llcp_core, digital_dep, hci/core, nci/{core,data,hci,ntf}, pn533,
pn544, microread, st21nfca/{core,dep}) passed with 0 warnings and
0 errors.
- Full x86_64 KASAN + kmemleak bzImage build and real QEMU TCG
verification (32 NCI 1.0 MIFARE status-error 0x01 exchanges as
euid 65534 over virtual_ncidev): all 32 iterations reported
SO_ERROR_OBSERVED=16 (expected=16) with SELFTEST_STATUS=0, 0 KASAN
reports, and 0 kmemleak unreferenced objects.
- Real PN533/PN544/Microread/ST21NFCA hardware was not exercised.
Best regards,
Bin Luo
Bin Luo (University of Electronic Science and Technology of China) (5):
net/nfc: fix skb ownership on data exchange errors
nfc: pn533: clear resp after queueing to avoid double free
nfc: digital: complete DEP data exchange on terminal errors
nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close
nfc: preserve NCI data status error codes
drivers/nfc/microread/microread.c | 3 +--
drivers/nfc/pn533/pn533.c | 2 ++
drivers/nfc/pn544/pn544.c | 3 +--
drivers/nfc/st21nfca/core.c | 3 +--
drivers/nfc/st21nfca/dep.c | 26 ++++++++++++-------------
include/net/nfc/nfc.h | 5 ++++-
net/nfc/digital_dep.c | 32 ++++++++++++++-----------------
net/nfc/hci/core.c | 25 +++++++++++++++++-------
net/nfc/llcp_core.c | 4 +++-
net/nfc/nci/core.c | 25 ++++++++++++++++++++++--
net/nfc/nci/data.c | 8 ++++----
net/nfc/nci/hci.c | 23 +++++++++++++++++-----
net/nfc/nci/ntf.c | 4 ++++
net/nfc/rawsock.c | 5 ++++-
14 files changed, 110 insertions(+), 58 deletions(-)
base-commit: 4dce97c6c265544342e716e62fd24bbb232590c5
--
2.51.0.windows.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v5 1/5] net/nfc: fix skb ownership on data exchange errors
2026-11-27 13:40 [PATCH v5 0/5] net/nfc: fix skb ownership, reassembly cleanup, and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-27 13:40 ` Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
2026-11-27 13:40 ` [PATCH v5 2/5] nfc: pn533: clear resp after queueing to avoid double free Bin Luo (University of Electronic Science and Technology of China)
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Bin Luo (University of Electronic Science and Technology of China) @ 2026-11-27 13:40 UTC (permalink / raw)
To: oe-linux-nfc; +Cc: johan, david, kuba, netdev, stable
NFC data_exchange_cb_t callbacks may receive a non-NULL response skb
together with a nonzero error. Because callback ownership was not
documented, multiple consumers and wrapper callbacks mishandle skb
lifetime on error (and in ST21NFCA DEP, also on several normal/error
returns).
Document the data_exchange_cb_t ownership contract so callbacks always
own a non-NULL skb regardless of err, and update affected callbacks:
- Free non-NULL skbs on error paths in rawsock, LLCP, HCI/NCI-HCI
wrappers, Microread, PN544, and ST21NFCA core.
- Fix skb leaks in st21nfca_im_recv_atr_res_cb() (including the
READER_F success path and r < 0 returns) and
st21nfca_im_recv_dep_res_cb() (including unknown PFB types), as well
as their error paths.
- Handle nonzero err in nci_nfcc_loopback_cb() by freeing skb and
failing the pending NCI request rather than reporting NCI_STATUS_OK
with a NULL resp (which could cause a NULL pointer dereference in
st_nci_loopback()), and free skb when conn_info lookup fails. Note
that on current mainline nci_data_exchange_complete() requires
NCI_DATA_EXCHANGE to be set (which loopback and NCI-HCI send paths
do not currently set); keeping these callbacks compliant with the
contract avoids regressions once that separate gating is addressed
and protects stable trees.
- Splice queued HCI/NCI-HCI rx_hcp_frags onto a local sk_buff_head
under rx_hcp_frags.lock before walking/reassembling so concurrent
error purges cannot race with skb_queue_walk(), and purge partial
fragments on error.
Found by static call-chain audit and code inspection; the rawsock
error-path skb leak was additionally reproduced and verified under
QEMU with KASAN and kmemleak.
Fixes: 98ff416f97c5 ("NFC: nci: Add status byte management in case of error.")
Fixes: 23b7869c0fd0 ("NFC: add the NFC socket raw protocol")
Fixes: 30cc4587659e ("NFC: Move LLCP code to the NFC top level diirectory")
Fixes: f3e8fb552789 ("NFC: Modified hci_transceive to become an asynchronous operation")
Fixes: 412fda538f4b ("NFC: Changed HCI and PN544 HCI driver to use the new HCI LLC Core")
Fixes: 11f54f228643 ("NFC: nci: Add HCI over NCI protocol support")
Fixes: 1c53855f6be2 ("nfc: nci: Add nci_nfcc_loopback to the nci core")
Fixes: 1892bf844ea0 ("NFC: st21nfca: Adding P2P support to st21nfca in Initiator & Target mode")
Fixes: 1c54795da05a ("NFC: st21nfca: Align st21nfca driver with other nfc driver")
Fixes: cfad1ba87150 ("NFC: Initial support for Inside Secure microread")
Fixes: 97f18414af39 ("NFC: Separate pn544 hci driver in HW dependant and independant parts")
Cc: stable@vger.kernel.org
Signed-off-by: Bin Luo (University of Electronic Science and Technology of China) <luob87709@gmail.com>
---
drivers/nfc/microread/microread.c | 3 +--
drivers/nfc/pn544/pn544.c | 3 +--
drivers/nfc/st21nfca/core.c | 3 +--
drivers/nfc/st21nfca/dep.c | 26 +++++++++++++-------------
include/net/nfc/nfc.h | 5 ++++-
net/nfc/hci/core.c | 25 ++++++++++++++++++-------
net/nfc/llcp_core.c | 4 +++-
net/nfc/nci/core.c | 10 ++++++++++
net/nfc/nci/hci.c | 23 ++++++++++++++++++-----
net/nfc/rawsock.c | 5 ++++-
10 files changed, 73 insertions(+), 34 deletions(-)
diff --git a/drivers/nfc/microread/microread.c b/drivers/nfc/microread/microread.c
index 2bfafa9..f221ec7 100644
--- a/drivers/nfc/microread/microread.c
+++ b/drivers/nfc/microread/microread.c
@@ -383,8 +383,7 @@ static void microread_im_transceive_cb(void *context, struct sk_buff *skb,
info->async_cb(info->async_cb_context, skb, err);
break;
default:
- if (err == 0)
- kfree_skb(skb);
+ kfree_skb(skb);
break;
}
}
diff --git a/drivers/nfc/pn544/pn544.c b/drivers/nfc/pn544/pn544.c
index c4fa70e..82f7107 100644
--- a/drivers/nfc/pn544/pn544.c
+++ b/drivers/nfc/pn544/pn544.c
@@ -581,8 +581,7 @@ static void pn544_hci_data_exchange_cb(void *context, struct sk_buff *skb,
info->async_cb(info->async_cb_context, skb, err);
break;
default:
- if (err == 0)
- kfree_skb(skb);
+ kfree_skb(skb);
break;
}
}
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c
index b5c1ca3..68327ca 100644
--- a/drivers/nfc/st21nfca/core.c
+++ b/drivers/nfc/st21nfca/core.c
@@ -743,8 +743,7 @@ static void st21nfca_hci_data_exchange_cb(void *context, struct sk_buff *skb,
info->async_cb(info->async_cb_context, skb, err);
break;
default:
- if (err == 0)
- kfree_skb(skb);
+ kfree_skb(skb);
break;
}
}
diff --git a/drivers/nfc/st21nfca/dep.c b/drivers/nfc/st21nfca/dep.c
index a5fab4f..c907b6e 100644
--- a/drivers/nfc/st21nfca/dep.c
+++ b/drivers/nfc/st21nfca/dep.c
@@ -449,11 +449,10 @@ static void st21nfca_im_recv_atr_res_cb(void *context, struct sk_buff *skb,
struct st21nfca_atr_res *atr_res;
int r;
- if (err != 0)
- return;
-
if (!skb)
return;
+ if (err)
+ goto out;
switch (info->async_cb_type) {
case ST21NFCA_CB_TYPE_READER_F:
@@ -463,7 +462,7 @@ static void st21nfca_im_recv_atr_res_cb(void *context, struct sk_buff *skb,
atr_res->gbi,
skb->len - sizeof(struct st21nfca_atr_res));
if (r < 0)
- return;
+ goto out;
if (atr_res->to >= 0x0e)
info->dep_info.to = 0x0e;
@@ -475,7 +474,7 @@ static void st21nfca_im_recv_atr_res_cb(void *context, struct sk_buff *skb,
r = nfc_dep_link_is_up(info->hdev->ndev, info->dep_info.idx,
NFC_COMM_PASSIVE, NFC_RF_INITIATOR);
if (r < 0)
- return;
+ goto out;
info->dep_info.curr_nfc_dep_pni = 0;
if (ST21NFCA_PP2LRI(atr_res->ppi) != info->dep_info.lri)
@@ -484,9 +483,11 @@ static void st21nfca_im_recv_atr_res_cb(void *context, struct sk_buff *skb,
ST21NFCA_PP2LRI(atr_res->ppi));
break;
default:
- kfree_skb(skb);
break;
}
+
+out:
+ kfree_skb(skb);
}
int st21nfca_im_send_atr_req(struct nfc_hci_dev *hdev, u8 *gb, size_t gb_len)
@@ -561,11 +562,10 @@ static void st21nfca_im_recv_dep_res_cb(void *context, struct sk_buff *skb,
int size;
- if (err != 0)
- return;
-
if (!skb)
return;
+ if (err)
+ goto exit;
switch (info->async_cb_type) {
case ST21NFCA_CB_TYPE_READER_F:
@@ -596,7 +596,7 @@ static void st21nfca_im_recv_dep_res_cb(void *context, struct sk_buff *skb,
size++;
skb_pull(skb, size);
nfc_tm_data_received(info->hdev->ndev, skb);
- break;
+ return;
case ST21NFCA_NFC_DEP_PFB_SUPERVISOR_PDU:
pr_err("Received a SUPERVISOR PDU\n");
skb_pull(skb, size);
@@ -606,10 +606,10 @@ static void st21nfca_im_recv_dep_res_cb(void *context, struct sk_buff *skb,
*(u8 *)skb_push(skb, 1) = info->dep_info.to | 0x10;
st21nfca_im_send_pdu(info, skb);
- break;
+ return;
+ default:
+ goto exit;
}
-
- return;
default:
break;
}
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index bcafab5..bdf2ac3 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -31,12 +31,15 @@ struct nfc_dev;
* data_exchange_cb_t - Definition of nfc_data_exchange callback
*
* @context: nfc_data_exchange cb_context parameter
- * @skb: response data
+ * @skb: response data, owned by the callback if non-NULL
* @err: If an error has occurred during data exchange, it is the
* error number. Zero means no error.
*
* When a rx or tx package is lost or corrupted or the target gets out
* of the operating field, err is -EIO.
+ * If skb is non-NULL, the callback owns it regardless of err and must free
+ * or otherwise consume it. Providers must not access or free it after the
+ * callback returns.
*/
typedef void (*data_exchange_cb_t)(void *context, struct sk_buff *skb,
int err);
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index ba6f031..1b43f1e 100644
--- a/net/nfc/hci/core.c
+++ b/net/nfc/hci/core.c
@@ -713,8 +713,7 @@ static void hci_transceive_cb(void *context, struct sk_buff *skb, int err)
hdev->async_cb(hdev->async_cb_context, skb, err);
break;
default:
- if (err == 0)
- kfree_skb(skb);
+ kfree_skb(skb);
break;
}
}
@@ -833,6 +832,7 @@ static int hci_se_io(struct nfc_dev *nfc_dev, u32 se_idx,
static void nfc_hci_failure(struct nfc_hci_dev *hdev, int err)
{
+ skb_queue_purge(&hdev->rx_hcp_frags);
mutex_lock(&hdev->msg_tx_mutex);
if (hdev->cmd_pending_msg == NULL) {
@@ -859,9 +859,12 @@ static void nfc_hci_recv_from_llc(struct nfc_hci_dev *hdev, struct sk_buff *skb)
struct sk_buff *hcp_skb;
u8 pipe;
struct sk_buff *frag_skb;
+ struct sk_buff_head frags;
+ unsigned long flags;
int msg_len;
if (!pskb_may_pull(skb, NFC_HCI_HCP_PACKET_HEADER_LEN)) {
+ skb_queue_purge(&hdev->rx_hcp_frags);
kfree_skb(skb);
return;
}
@@ -873,12 +876,19 @@ static void nfc_hci_recv_from_llc(struct nfc_hci_dev *hdev, struct sk_buff *skb)
}
/* it's the last fragment. Does it need re-aggregation? */
- if (skb_queue_len(&hdev->rx_hcp_frags)) {
+ __skb_queue_head_init(&frags);
+ spin_lock_irqsave(&hdev->rx_hcp_frags.lock, flags);
+ if (!skb_queue_empty(&hdev->rx_hcp_frags)) {
+ __skb_queue_tail(&hdev->rx_hcp_frags, skb);
+ skb_queue_splice_init(&hdev->rx_hcp_frags, &frags);
+ }
+ spin_unlock_irqrestore(&hdev->rx_hcp_frags.lock, flags);
+
+ if (!skb_queue_empty(&frags)) {
pipe = packet->header & NFC_HCI_FRAGMENT;
- skb_queue_tail(&hdev->rx_hcp_frags, skb);
msg_len = 0;
- skb_queue_walk(&hdev->rx_hcp_frags, frag_skb) {
+ skb_queue_walk(&frags, frag_skb) {
msg_len += (frag_skb->len -
NFC_HCI_HCP_PACKET_HEADER_LEN);
}
@@ -886,20 +896,21 @@ static void nfc_hci_recv_from_llc(struct nfc_hci_dev *hdev, struct sk_buff *skb)
hcp_skb = nfc_alloc_recv_skb(NFC_HCI_HCP_PACKET_HEADER_LEN +
msg_len, GFP_KERNEL);
if (hcp_skb == NULL) {
+ __skb_queue_purge(&frags);
nfc_hci_failure(hdev, -ENOMEM);
return;
}
skb_put_u8(hcp_skb, pipe);
- skb_queue_walk(&hdev->rx_hcp_frags, frag_skb) {
+ skb_queue_walk(&frags, frag_skb) {
msg_len = frag_skb->len - NFC_HCI_HCP_PACKET_HEADER_LEN;
skb_put_data(hcp_skb,
frag_skb->data + NFC_HCI_HCP_PACKET_HEADER_LEN,
msg_len);
}
- skb_queue_purge(&hdev->rx_hcp_frags);
+ __skb_queue_purge(&frags);
} else {
packet->header &= NFC_HCI_FRAGMENT;
hcp_skb = skb;
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c
index 74bf817..0736a0e 100644
--- a/net/nfc/llcp_core.c
+++ b/net/nfc/llcp_core.c
@@ -1636,8 +1636,10 @@ void nfc_llcp_recv(void *data, struct sk_buff *skb, int err)
{
struct nfc_llcp_local *local = (struct nfc_llcp_local *) data;
- if (err < 0) {
+ if (err) {
pr_err("LLCP PDU receive err %d\n", err);
+ if (skb)
+ kfree_skb(skb);
return;
}
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 73e3a96..efd4e5e 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -411,8 +411,18 @@ static void nci_nfcc_loopback_cb(void *context, struct sk_buff *skb, int err)
struct nci_dev *ndev = (struct nci_dev *)context;
struct nci_conn_info *conn_info;
+ if (err) {
+ kfree_skb(skb);
+ if (err < 0)
+ nci_req_cancel(ndev, -err);
+ else
+ nci_req_complete(ndev, NCI_STATUS_FAILED);
+ return;
+ }
+
conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_conn_id);
if (!conn_info) {
+ kfree_skb(skb);
nci_req_complete(ndev, NCI_STATUS_REJECTED);
return;
}
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index c03e8a0..aca05ca 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -432,14 +432,19 @@ void nci_hci_data_received_cb(void *context,
u8 pipe, type;
struct sk_buff *hcp_skb;
struct sk_buff *frag_skb;
+ struct sk_buff_head frags;
+ unsigned long flags;
int msg_len;
if (err) {
+ skb_queue_purge(&ndev->hci_dev->rx_hcp_frags);
+ kfree_skb(skb);
nci_req_complete(ndev, err);
return;
}
if (!pskb_may_pull(skb, NCI_HCI_HCP_PACKET_HEADER_LEN)) {
+ skb_queue_purge(&ndev->hci_dev->rx_hcp_frags);
kfree_skb(skb);
return;
}
@@ -451,12 +456,19 @@ void nci_hci_data_received_cb(void *context,
}
/* it's the last fragment. Does it need re-aggregation? */
- if (skb_queue_len(&ndev->hci_dev->rx_hcp_frags)) {
+ __skb_queue_head_init(&frags);
+ spin_lock_irqsave(&ndev->hci_dev->rx_hcp_frags.lock, flags);
+ if (!skb_queue_empty(&ndev->hci_dev->rx_hcp_frags)) {
+ __skb_queue_tail(&ndev->hci_dev->rx_hcp_frags, skb);
+ skb_queue_splice_init(&ndev->hci_dev->rx_hcp_frags, &frags);
+ }
+ spin_unlock_irqrestore(&ndev->hci_dev->rx_hcp_frags.lock, flags);
+
+ if (!skb_queue_empty(&frags)) {
pipe = NCI_HCP_MSG_GET_PIPE(packet->header);
- skb_queue_tail(&ndev->hci_dev->rx_hcp_frags, skb);
msg_len = 0;
- skb_queue_walk(&ndev->hci_dev->rx_hcp_frags, frag_skb) {
+ skb_queue_walk(&frags, frag_skb) {
msg_len += (frag_skb->len -
NCI_HCI_HCP_PACKET_HEADER_LEN);
}
@@ -464,20 +476,21 @@ void nci_hci_data_received_cb(void *context,
hcp_skb = nfc_alloc_recv_skb(NCI_HCI_HCP_PACKET_HEADER_LEN +
msg_len, GFP_KERNEL);
if (!hcp_skb) {
+ __skb_queue_purge(&frags);
nci_req_complete(ndev, -ENOMEM);
return;
}
skb_put_u8(hcp_skb, pipe);
- skb_queue_walk(&ndev->hci_dev->rx_hcp_frags, frag_skb) {
+ skb_queue_walk(&frags, frag_skb) {
msg_len = frag_skb->len - NCI_HCI_HCP_PACKET_HEADER_LEN;
skb_put_data(hcp_skb,
frag_skb->data + NCI_HCI_HCP_PACKET_HEADER_LEN,
msg_len);
}
- skb_queue_purge(&ndev->hci_dev->rx_hcp_frags);
+ __skb_queue_purge(&frags);
} else {
packet->header &= NCI_HCI_FRAGMENT;
hcp_skb = skb;
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c
index f7d7a59..3bf65b1 100644
--- a/net/nfc/rawsock.c
+++ b/net/nfc/rawsock.c
@@ -156,8 +156,11 @@ static void rawsock_data_exchange_complete(void *context, struct sk_buff *skb,
pr_debug("sk=%p err=%d\n", sk, err);
- if (err)
+ if (err) {
+ if (skb)
+ kfree_skb(skb);
goto error;
+ }
err = rawsock_add_header(skb);
if (err)
--
2.51.0.windows.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 2/5] nfc: pn533: clear resp after queueing to avoid double free
2026-11-27 13:40 [PATCH v5 0/5] net/nfc: fix skb ownership, reassembly cleanup, and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 1/5] net/nfc: fix skb ownership on data exchange errors Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-27 13:40 ` Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 3/5] nfc: digital: complete DEP data exchange on terminal errors Bin Luo (University of Electronic Science and Technology of China)
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Bin Luo (University of Electronic Science and Technology of China) @ 2026-11-27 13:40 UTC (permalink / raw)
To: oe-linux-nfc; +Cc: johan, david, kuba, netdev, stable
In both pn533_data_exchange_complete() and pn533_tm_get_data_complete(),
resp is queued onto dev->resp_q before calling pn533_build_response().
If pn533_build_response() fails to allocate the reassembled skb, it
purges dev->resp_q (freeing resp) and returns NULL, after which the
error label calls dev_kfree_skb(resp) on the already-freed skb.
Clear resp immediately after queueing it to dev->resp_q in both
completion handlers so subsequent error handling cannot double-free it.
Found by static call-chain audit and code inspection.
Fixes: 6ff73fd239ff ("NFC: pn533 Rx chaining support")
Fixes: 3c13b244de96 ("NFC: pn533: Add support for incoming fragmented frame in target mode")
Cc: stable@vger.kernel.org
Signed-off-by: Bin Luo (University of Electronic Science and Technology of China) <luob87709@gmail.com>
---
drivers/nfc/pn533/pn533.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c
index b0133e5..c42cc33 100644
--- a/drivers/nfc/pn533/pn533.c
+++ b/drivers/nfc/pn533/pn533.c
@@ -1104,6 +1104,7 @@ static int pn533_tm_get_data_complete(struct pn533 *dev, void *arg,
}
skb_queue_tail(&dev->resp_q, resp);
+ resp = NULL;
if (mi) {
queue_work(dev->wq, &dev->mi_tm_rx_work);
@@ -2138,6 +2139,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg,
}
skb_queue_tail(&dev->resp_q, resp);
+ resp = NULL;
if (mi) {
dev->cmd_complete_mi_arg = arg;
--
2.51.0.windows.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 3/5] nfc: digital: complete DEP data exchange on terminal errors
2026-11-27 13:40 [PATCH v5 0/5] net/nfc: fix skb ownership, reassembly cleanup, and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 1/5] net/nfc: fix skb ownership on data exchange errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 2/5] nfc: pn533: clear resp after queueing to avoid double free Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-27 13:40 ` Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
2026-11-27 13:40 ` [PATCH v5 4/5] nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 5/5] nfc: preserve NCI data status error codes Bin Luo (University of Electronic Science and Technology of China)
4 siblings, 1 reply; 10+ messages in thread
From: Bin Luo (University of Electronic Science and Technology of China) @ 2026-11-27 13:40 UTC (permalink / raw)
To: oe-linux-nfc; +Cc: johan, david, kuba, netdev, stable
In digital_in_recv_dep_res(), terminal error branches jumped to the
error label, bypassing data_exch->cb(). For callers such as AF_NFC raw
sockets, missing the completion callback leaves the exchange hung,
leaks the socket reference, and leaves tx_work_scheduled set.
Route terminal errors through the exit label so data_exch->cb() is
always invoked, and drop the redundant kfree_skb(resp) because the
callback owns any non-NULL resp skb under the data_exchange_cb_t
contract.
Found by static call-chain audit and code inspection.
Fixes: 7d0911c02fa2 ("NFC Digital: Add initiator NFC-DEP support")
Cc: stable@vger.kernel.org
Signed-off-by: Bin Luo (University of Electronic Science and Technology of China) <luob87709@gmail.com>
---
net/nfc/digital_dep.c | 32 ++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c
index 968547c..cd6eff0 100644
--- a/net/nfc/digital_dep.c
+++ b/net/nfc/digital_dep.c
@@ -703,7 +703,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
rc = digital_in_send_nack(ddev, data_exch);
if (rc)
- goto error;
+ goto exit;
return;
} else if ((rc == -ETIMEDOUT) &&
@@ -712,7 +712,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
rc = digital_in_send_atn(ddev, data_exch);
if (rc)
- goto error;
+ goto exit;
return;
}
@@ -734,7 +734,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
rc = digital_in_send_nack(ddev, data_exch);
if (rc)
- goto error;
+ goto exit;
kfree_skb(resp);
@@ -742,7 +742,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
}
PROTOCOL_ERR("14.4.1.6");
- goto error;
+ goto exit;
}
ddev->atn_count = 0;
@@ -759,7 +759,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (resp->len < size || dep_res->dir != DIGITAL_NFC_DEP_FRAME_DIR_IN ||
dep_res->cmd != DIGITAL_CMD_DEP_RES) {
rc = -EIO;
- goto error;
+ goto exit;
}
pfb = dep_res->pfb;
@@ -767,7 +767,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (DIGITAL_NFC_DEP_DID_BIT_SET(pfb)) {
PROTOCOL_ERR("14.8.2.1");
rc = -EIO;
- goto error;
+ goto exit;
}
if (DIGITAL_NFC_DEP_NAD_BIT_SET(pfb)) {
@@ -777,7 +777,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (size > resp->len) {
rc = -EIO;
- goto error;
+ goto exit;
}
skb_pull(resp, size);
@@ -787,7 +787,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (DIGITAL_NFC_DEP_PFB_PNI(pfb) != ddev->curr_nfc_dep_pni) {
PROTOCOL_ERR("14.12.3.3");
rc = -EIO;
- goto error;
+ goto exit;
}
ddev->curr_nfc_dep_pni =
@@ -802,7 +802,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (IS_ERR(resp)) {
rc = PTR_ERR(resp);
resp = NULL;
- goto error;
+ goto exit;
}
/* If resp is NULL then we're still chaining so return and
@@ -847,7 +847,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
ddev->chaining_skb,
ddev->data_exch);
if (rc)
- goto error;
+ goto exit;
goto free_resp;
@@ -855,7 +855,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (!DIGITAL_NFC_DEP_PFB_IS_TIMEOUT(pfb)) { /* ATN */
rc = digital_in_send_saved_skb(ddev, data_exch);
if (rc)
- goto error;
+ goto exit;
goto free_resp;
}
@@ -863,19 +863,19 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (ddev->atn_count || ddev->nack_count) {
PROTOCOL_ERR("14.12.4.4");
rc = -EIO;
- goto error;
+ goto exit;
}
rtox = DIGITAL_NFC_DEP_RTOX_VALUE(resp->data[0]);
if (!rtox || rtox > DIGITAL_NFC_DEP_RTOX_MAX) {
PROTOCOL_ERR("14.8.4.1");
rc = -EIO;
- goto error;
+ goto exit;
}
rc = digital_in_send_rtox(ddev, data_exch, rtox);
if (rc)
- goto error;
+ goto exit;
goto free_resp;
}
@@ -883,7 +883,6 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
exit:
data_exch->cb(data_exch->cb_context, resp, rc);
-error:
kfree(data_exch);
kfree_skb(ddev->chaining_skb);
@@ -892,9 +891,6 @@ error:
kfree_skb(ddev->saved_skb);
ddev->saved_skb = NULL;
- if (rc)
- kfree_skb(resp);
-
return;
free_resp:
--
2.51.0.windows.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 4/5] nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close
2026-11-27 13:40 [PATCH v5 0/5] net/nfc: fix skb ownership, reassembly cleanup, and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
` (2 preceding siblings ...)
2026-11-27 13:40 ` [PATCH v5 3/5] nfc: digital: complete DEP data exchange on terminal errors Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-27 13:40 ` Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
2026-11-27 13:40 ` [PATCH v5 5/5] nfc: preserve NCI data status error codes Bin Luo (University of Electronic Science and Technology of China)
4 siblings, 1 reply; 10+ messages in thread
From: Bin Luo (University of Electronic Science and Technology of China) @ 2026-11-27 13:40 UTC (permalink / raw)
To: oe-linux-nfc; +Cc: johan, david, kuba, netdev, stable
When an NCI data exchange receives a partial NCI_PBF_CONT fragment into
ndev->rx_data_reassembly and then terminates due to a data-status error,
CORE_INTERFACE_ERROR_NTF, data-exchange timeout, or device close, the
buffered fragment is left behind. On subsequent packets or after a
close/reopen cycle (including listen/target mode, where
NCI_DATA_EXCHANGE is never set), stale bytes are prepended to later
responses or leaked until device free.
Drop and clear ndev->rx_data_reassembly on all four paths:
- In nci_add_rx_data_frag() when a nonzero data status is received.
- Unconditionally in nci_core_conn_intf_error_ntf_packet() before the
NCI_DATA_EXCHANGE check, matching nci_rf_deactivate_ntf_packet() so
target mode is covered too.
- In nci_rx_work() when handling a data-exchange timeout.
- In nci_close_device() after flush_workqueue(ndev->rx_wq) on both
close paths, guarded by req_lock and !NCI_UP.
Found by static call-chain audit and code inspection.
Fixes: 6a2968aaf50c ("NFC: basic NCI protocol implementation")
Fixes: 004161cb52ac ("NFC: Handle error during NCI data exchange")
Fixes: c4bf98b220cb ("NFC: Add NCI data exchange timer")
Fixes: 98ff416f97c5 ("NFC: nci: Add status byte management in case of error.")
Cc: stable@vger.kernel.org
Signed-off-by: Bin Luo (University of Electronic Science and Technology of China) <luob87709@gmail.com>
---
net/nfc/nci/core.c | 15 +++++++++++++--
net/nfc/nci/data.c | 2 ++
net/nfc/nci/ntf.c | 4 ++++
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index efd4e5e..f832251 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -582,7 +582,7 @@ static int nci_close_device(struct nci_dev *ndev)
ndev->cur_conn_id,
-ENODEV);
mutex_unlock(&ndev->req_lock);
- return 0;
+ goto flush_rx;
}
/* Drop RX and TX queues */
@@ -622,9 +622,17 @@ static int nci_close_device(struct nci_dev *ndev)
mutex_unlock(&ndev->req_lock);
+flush_rx:
/* rx_work may take req_lock via nci_deactivate_target */
flush_workqueue(ndev->rx_wq);
+ mutex_lock(&ndev->req_lock);
+ if (!test_bit(NCI_UP, &ndev->flags)) {
+ kfree_skb(ndev->rx_data_reassembly);
+ ndev->rx_data_reassembly = NULL;
+ }
+ mutex_unlock(&ndev->req_lock);
+
return 0;
}
@@ -1607,10 +1615,13 @@ static void nci_rx_work(struct work_struct *work)
/* check if a data exchange timeout has occurred */
if (test_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags)) {
/* complete the data exchange transaction, if exists */
- if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags))
+ if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags)) {
+ kfree_skb(ndev->rx_data_reassembly);
+ ndev->rx_data_reassembly = NULL;
nci_data_exchange_complete(ndev, NULL,
ndev->cur_conn_id,
-ETIMEDOUT);
+ }
clear_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags);
}
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index 4253ede..3bbebb9 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -220,6 +220,8 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev,
if (status) {
err = status;
+ kfree_skb(ndev->rx_data_reassembly);
+ ndev->rx_data_reassembly = NULL;
goto exit;
}
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index f5c9a8a..3ca1009 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -132,6 +132,10 @@ static int nci_core_conn_intf_error_ntf_packet(struct nci_dev *ndev,
pr_debug("status 0x%x, conn_id %d\n", ntf->status, ntf->conn_id);
+ /* drop partial rx data packet */
+ kfree_skb(ndev->rx_data_reassembly);
+ ndev->rx_data_reassembly = NULL;
+
/* complete the data exchange transaction, if exists */
if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags))
nci_data_exchange_complete(ndev, NULL, ntf->conn_id, -EIO);
--
2.51.0.windows.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 5/5] nfc: preserve NCI data status error codes
2026-11-27 13:40 [PATCH v5 0/5] net/nfc: fix skb ownership, reassembly cleanup, and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
` (3 preceding siblings ...)
2026-11-27 13:40 ` [PATCH v5 4/5] nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-27 13:40 ` Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
4 siblings, 1 reply; 10+ messages in thread
From: Bin Luo (University of Electronic Science and Technology of China) @ 2026-11-27 13:40 UTC (permalink / raw)
To: oe-linux-nfc; +Cc: johan, david, kuba, netdev, stable
nci_to_errno() returns negative errno values for nonzero data-status
bytes. Passing that value to nci_add_rx_data_frag() through a __u8
parameter truncates the signed errno into an unrelated positive value
before the completion callback receives it.
For userspace AF_NFC raw sockets, this corrupts the reported error: for
example, an NCI status error mapped to -EBUSY (-16) is truncated to
240 and negated to SO_ERROR=-240 instead of reporting EBUSY (16).
Keep the error parameter as int so the original errno reaches the
completion path and userspace unchanged.
Found by static call-chain audit and reproduced under QEMU with
virtual_ncidev and KASAN/kmemleak.
Fixes: 98ff416f97c5 ("NFC: nci: Add status byte management in case of error.")
Cc: stable@vger.kernel.org
Signed-off-by: Bin Luo (University of Electronic Science and Technology of China) <luob87709@gmail.com>
---
net/nfc/nci/data.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index 3bbebb9..4a2326a 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -213,13 +213,11 @@ EXPORT_SYMBOL(nci_send_data);
static void nci_add_rx_data_frag(struct nci_dev *ndev,
struct sk_buff *skb,
- __u8 pbf, __u8 conn_id, __u8 status)
+ __u8 pbf, __u8 conn_id, int err)
{
int reassembly_len;
- int err = 0;
- if (status) {
- err = status;
+ if (err) {
kfree_skb(ndev->rx_data_reassembly);
ndev->rx_data_reassembly = NULL;
goto exit;
--
2.51.0.windows.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v5 1/5] net/nfc: fix skb ownership on data exchange errors
2026-11-27 13:40 ` [PATCH v5 1/5] net/nfc: fix skb ownership on data exchange errors Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-28 14:13 ` netdev-bot+sashiko
0 siblings, 0 replies; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-28 14:13 UTC (permalink / raw)
To: luob87709; +Cc: oe-linux-nfc, johan, david, kuba, netdev, stable
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The patch adds `skb_queue_purge(&hdev->rx_hcp_frags)` to
`nfc_hci_failure()` in net/nfc/hci/core.c.
- [Low] net/nfc: Fixes trailers cite file-rename commits instead of bug
introductions
--
net/nfc: fix skb ownership on data exchange errors
This commit documents that a data_exchange_cb_t callback owns any
non-NULL skb it receives, whatever the err value. It updates the rawsock,
LLCP, HCI, NCI-HCI, loopback, microread, pn544 and st21nfca callbacks to
free or consume the skb on error paths. It also makes HCI/NCI-HCI fragment
reassembly splice rx_hcp_frags onto a local list under the queue lock, and
purges partial fragments on error.
> diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
> index ba6f0310ffd7c..1b43f1e854071 100644
> --- a/net/nfc/hci/core.c
> +++ b/net/nfc/hci/core.c
[ ... ]
> @@ -833,6 +832,7 @@ static int hci_se_io(struct nfc_dev *nfc_dev, u32 se_idx,
>
> static void nfc_hci_failure(struct nfc_hci_dev *hdev, int err)
> {
> + skb_queue_purge(&hdev->rx_hcp_frags);
> mutex_lock(&hdev->msg_tx_mutex);
[Severity: Medium]
Can this purge drop the first fragments of a message that is still being
reassembled, and cause the last fragment to be misparsed?
nfc_hci_failure() is not only reached from the reassembly path. It is also
reached from msg_rx_work through nfc_hci_event_received():
net/nfc/hci/core.c:nfc_hci_event_received() {
...
default:
pr_info("Discarded unknown event %x to gate %x\n", event, gate);
r = -EINVAL;
break;
}
...
exit_noskb:
if (r)
nfc_hci_driver_failure(hdev, r);
}
It is also reached from nfc_hci_llc_failure() and from drivers that call
the exported nfc_hci_driver_failure().
In the no-pending-command case, nfc_driver_failure() only calls
nfc_targets_found(dev, NULL, 0), so the link keeps receiving frames after
this.
Consider a message larger than the LLC payload. nfc_hci_recv_from_llc() has
queued the first fragments on rx_hcp_frags. Then, before the last fragment
arrives, msg_rx_work handles an unknown event. The resulting call chain
empties rx_hcp_frags:
nfc_hci_event_received()->nfc_hci_driver_failure()->nfc_hci_failure()
The window is the whole gap between fragment arrivals, so no tight race
seems to be needed.
> @@ -873,12 +876,19 @@ static void nfc_hci_recv_from_llc(struct nfc_hci_dev *hdev, struct sk_buff *skb)
> }
>
> /* it's the last fragment. Does it need re-aggregation? */
> - if (skb_queue_len(&hdev->rx_hcp_frags)) {
> + __skb_queue_head_init(&frags);
> + spin_lock_irqsave(&hdev->rx_hcp_frags.lock, flags);
> + if (!skb_queue_empty(&hdev->rx_hcp_frags)) {
> + __skb_queue_tail(&hdev->rx_hcp_frags, skb);
> + skb_queue_splice_init(&hdev->rx_hcp_frags, &frags);
> + }
> + spin_unlock_irqrestore(&hdev->rx_hcp_frags.lock, flags);
> +
> + if (!skb_queue_empty(&frags)) {
[ ... ]
> - skb_queue_purge(&hdev->rx_hcp_frags);
> + __skb_queue_purge(&frags);
> } else {
> packet->header &= NFC_HCI_FRAGMENT;
> hcp_skb = skb;
When the last fragment arrives after such a purge, the queue is empty. It
then takes this else branch and is handled as a complete HCP message.
The byte after the packet header is continuation payload, not a message
header. HCP_MSG_GET_TYPE() and HCP_MSG_GET_CMD() would then decode
payload bytes as the type and instruction.
The tail fragment would then either complete the pending command with the
wrong data and status, or be queued to msg_rx_queue as a bogus command or
event.
The splice under rx_hcp_frags.lock keeps skb_queue_walk() memory-safe. It
does not record that a reassembly was in progress, though. Is the commit
message right that this makes concurrent error purges safe?
Before this patch, rx_hcp_frags was only purged by the reassembly context
itself and by nfc_hci_unregister_device(). This cross-context reset appears
to be new.
Would it be better to purge partial fragments only from the reassembly path
in nfc_hci_recv_from_llc()? Another option is to track the reassembly state
so that an orphaned last fragment is dropped instead of dispatched.
[ ... ]
> diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c
> --- a/net/nfc/llcp_core.c
> +++ b/net/nfc/llcp_core.c
> @@ -1636,8 +1636,10 @@ void nfc_llcp_recv(void *data, struct sk_buff *skb, int err)
> {
> struct nfc_llcp_local *local = (struct nfc_llcp_local *) data;
>
> - if (err < 0) {
> + if (err) {
> pr_err("LLCP PDU receive err %d\n", err);
> + if (skb)
> + kfree_skb(skb);
> return;
> }
>
[Severity: Low]
Three of the Fixes: tags seem to point at commits that only moved or
renamed files. They do not point at the commits that introduced the
code being fixed.
30cc4587659e ("NFC: Move LLCP code to the NFC top level diirectory")
only renamed net/nfc/llcp/llcp.c to net/nfc/llcp_core.c, and did not
touch nfc_llcp_recv(). That function was added by d646960f7986 ("NFC:
Initial LLCP support"). It started taking the skb directly, without
skb_get(), in 1727cf937401 ("NFC: llcp: Fix Rx memory leak").
1c54795da05a ("NFC: st21nfca: Align st21nfca driver with other nfc
driver") only renamed st21nfca.c to core.c and st21nfca_dep.c to
dep.c. st21nfca_hci_data_exchange_cb() was added by 7974728094d3
("NFC: st21nfca: Add ISO15693 Reader/Writer support"). The dep.c
callbacks are already covered by the 1892bf844ea0 tag.
97f18414af39 ("NFC: Separate pn544 hci driver in HW dependant and
independant parts") moved pn544_hci_data_exchange_cb() unchanged from
drivers/nfc/pn544_hci.c to drivers/nfc/pn544/pn544.c. The function
itself came from f3e8fb552789, which is already listed. That makes
this tag look redundant.
This has no effect at runtime. However, the stable tooling uses these
tags to decide how far back the fix should go, and rename commits make
that range harder to work out. Could you replace them with the commits
that introduced the code, and drop the ones already covered by another
tag?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127134029.1813-1-luob87709%40gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v5 3/5] nfc: digital: complete DEP data exchange on terminal errors
2026-11-27 13:40 ` [PATCH v5 3/5] nfc: digital: complete DEP data exchange on terminal errors Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-28 14:13 ` netdev-bot+sashiko
0 siblings, 0 replies; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-28 14:13 UTC (permalink / raw)
To: luob87709; +Cc: oe-linux-nfc, johan, david, kuba, netdev, stable
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 (1) · High: 0 · Medium: 2 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The commit message calls the removed `if (rc)
kfree_skb(resp);` in digital_in_recv_dep_res() "redundant".
- [Medium] The commit message says that after the change "data_exch->cb()
is always invoked" for DEP data exchanges.
Pre-existing issues:
- [Critical] This problem wasn't introduced by this patch, but the ACK-
PDU branch of digital_in_recv_dep_res() can be reached while RX…
--
nfc: digital: complete DEP data exchange on terminal errors
This patch changes the terminal error branches in digital_in_recv_dep_res()
to jump to the exit label instead of the error label, so data_exch->cb() is
called. It also removes the trailing kfree_skb(resp) on error, because the
callback now owns any non-NULL resp.
> diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c
> index 968547c306a5d..cd6eff01235f8 100644
> --- a/net/nfc/digital_dep.c
> +++ b/net/nfc/digital_dep.c
> @@ -703,7 +703,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
>
> rc = digital_in_send_nack(ddev, data_exch);
> if (rc)
> - goto error;
> + goto exit;
>
> return;
> } else if ((rc == -ETIMEDOUT) &&
[Severity: Medium]
The commit message says errors are routed "so data_exch->cb() is always
invoked". Does that still hold after a retry like this one has been queued?
All of these go through digital_in_send_cmd() -> digital_send_cmd():
digital_in_send_nack()
digital_in_send_atn()
digital_in_send_rtox()
digital_in_send_saved_skb()
digital_in_send_ack()
digital_in_send_dep_req()
digital_send_cmd() only queues the command and returns 0, so this path
returns and waits for the next response.
If the driver's send fails later, digital_wq_cmd() drops the command
without calling cmd->cmd_cb:
net/nfc/digital_core.c:digital_wq_cmd() {
...
pr_err("in_send_command returned err %d\n", rc);
mutex_lock(&ddev->cmd_lock);
list_del(&cmd->queue);
mutex_unlock(&ddev->cmd_lock);
kfree_skb(cmd->req);
kfree(cmd->mdaa_params);
kfree(cmd);
...
}
digital_unregister_device(), by contrast, does notify the issuer:
if (cmd->cmd_cb)
cmd->cmd_cb(ddev, cmd->cb_context, ERR_PTR(-ENODEV));
In that case digital_in_recv_dep_res() never runs again for the exchange.
data_exch is leaked and data_exch->cb() is never called.
For rawsock, this looks like the same hang the commit message describes.
The sock_hold() taken in rawsock_tx_work() is never dropped, and
tx_work_scheduled stays set.
This needs an in_send_cmd() failure from the driver. Examples are trf7970a
returning -EIO, -EBUSY or -ECANCELED, or a port100 USB submit failure.
Is a matching change needed in digital_wq_cmd(), calling cmd->cmd_cb with
ERR_PTR(rc), to close this completely? If not, could the commit message
be narrowed?
[ ... ]
> @@ -847,7 +847,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
> ddev->chaining_skb,
> ddev->data_exch);
> if (rc)
> - goto error;
> + goto exit;
>
> goto free_resp;
>
[Severity: Critical]
This isn't a bug introduced by this patch, but this branch is being
touched. Can a remote target reach this ACK PDU branch while RX chaining
is in progress, rather than TX chaining?
The only guard before the digital_in_send_dep_req() call is:
if (!ddev->chaining_skb) {
PROTOCOL_ERR("14.12.4.3");
rc = -EIO;
goto exit;
}
This accepts any chaining buffer. During RX reassembly,
digital_recv_dep_data_gather() stores the receive buffer in the same
field:
if (DIGITAL_NFC_DEP_MI_BIT_SET(pfb) && (!ddev->chaining_skb)) {
ddev->chaining_skb =
nfc_alloc_recv_skb(8 * ddev->local_payload_max,
GFP_KERNEL);
nfc_alloc_recv_skb() reserves only 1 byte of headroom, and
skb_copy_expand() keeps it:
total_size = size + 1;
skb = alloc_skb(total_size, gfp);
if (skb)
skb_reserve(skb, 1);
A target could do the following:
1) Reply to a DEP_REQ with an I-PDU that has MI set and the correct PNI.
The initiator allocates the RX chaining skb and sends an ACK
carrying curr_nfc_dep_pni.
2) Reply with a DEP_RES ACK PDU using that PNI.
All the checks pass, and digital_in_send_dep_req() then runs this on the
RX buffer:
skb_push(skb, sizeof(struct digital_dep_req_res));
Would this push 3 bytes into 1 byte of headroom and hit
skb_under_panic() -> BUG()?
There is a second issue. ddev->data_exch is only written in
digital_send_dep_data_prep():
ddev->chaining_skb = skb;
ddev->data_exch = data_exch;
It is never cleared, including when the exit label does kfree(data_exch).
On this path it would be NULL or point to an earlier exchange that has
already been freed.
Even without the headroom problem, the queued command would carry a stale
or NULL cb_context. Wouldn't the next digital_in_recv_dep_res() then call
data_exch->cb() through freed memory or a NULL pointer, while the current
exchange's data_exch is orphaned?
> @@ -883,7 +883,6 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
> exit:
> data_exch->cb(data_exch->cb_context, resp, rc);
>
> -error:
> kfree(data_exch);
>
> kfree_skb(ddev->chaining_skb);
> @@ -892,9 +891,6 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
> kfree_skb(ddev->saved_skb);
> ddev->saved_skb = NULL;
>
> - if (rc)
> - kfree_skb(resp);
> -
> return;
>
> free_resp:
[Severity: Medium]
The commit message describes this as dropping "the redundant
kfree_skb(resp)". Is "redundant" accurate for the series as posted?
The earlier patch "net/nfc: fix skb ownership on data exchange errors"
changed rawsock_data_exchange_complete() and nfc_llcp_recv() to free a
non-NULL skb when err != 0:
net/nfc/rawsock.c:rawsock_data_exchange_complete() {
...
if (err) {
if (skb)
kfree_skb(skb);
goto error;
}
...
}
That patch does not touch net/nfc/digital_dep.c. Neither does "nfc: pn533:
clear resp after queueing to avoid double free".
So at both of those intermediate commits, the existing goto exit paths
that carry a non-NULL resp with rc != 0 free resp twice. One malformed
DEP_RES frame is enough:
digital_in_recv_dep_res()
digital_skb_pull_dep_sod() returns -EIO
goto exit
data_exch->cb(data_exch->cb_context, resp, -EIO)
rawsock_data_exchange_complete()
kfree_skb(skb)
if (rc) kfree_skb(resp) <- second free
The same applies to these paths:
- the -EMSGSIZE check
- the NAD bit check
- the ACK PDU checks for the NACK bit, a PNI mismatch and a missing
chaining_skb
The reverse case also breaks. If this patch is backported to stable
without the ownership patch, the callbacks there don't free on error.
Wouldn't resp then leak on every terminal error path, including the ones
that already went to exit before this patch?
Both patches carry Cc: stable, but this one only has Fixes: 7d0911c02fa2
and no dependency note.
Could this be squashed into the ownership patch? Alternatively, could the
commit message say that this removal is required by that patch, and note
the dependency for stable?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127134029.1813-1-luob87709%40gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v5 4/5] nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close
2026-11-27 13:40 ` [PATCH v5 4/5] nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-28 14:13 ` netdev-bot+sashiko
0 siblings, 0 replies; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-28 14:13 UTC (permalink / raw)
To: luob87709; +Cc: oe-linux-nfc, johan, david, kuba, netdev, stable
Thank you for your contribution! Sashiko AI review found 5 potential
issue(s) to consider.
Critical: 0 · High: 1 · Medium: 2 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [High] nci_close_device() (net/nfc/nci/core.c) now frees
ndev->rx_data_reassembly at lines 629-634, after…
- [Medium] The commit says it stops stale reassembly bytes from surviving
a close/reopen cycle, but it only frees ndev->rx_data_reassembly in…
- [Medium] nci_core_conn_intf_error_ntf_packet()
(net/nfc/nci/ntf.c:135-137) now drops ndev->rx_data_reassembly on…
- [Low] The patch changes the early `return 0` in the already-down branch
of nci_close_device() (net/nfc/nci/core.c:585) to `goto flush_rx`.
- [Low] The From:/Signed-off-by: names do not match.
--
nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close
This patch frees and clears ndev->rx_data_reassembly in four cases where
a data exchange ends: a nonzero data status, CORE_INTERFACE_ERROR_NTF, a
data exchange timeout, and device close. The goal is to stop a partial
NCI_PBF_CONT fragment from being leaked or prepended to later data.
> Signed-off-by: Bin Luo (University of Electronic Science and Technology of China) <luob87709@gmail.com>
[Severity: Low]
This isn't a bug, but the author and Signed-off-by names don't match.
The author name is recorded as the bare email address,
"luob87709@gmail.com <luob87709@gmail.com>". The Signed-off-by name is
"Bin Luo (University of Electronic Science and Technology of China)".
checkpatch reports this as FROM_SIGN_OFF_MISMATCH. Could this be resent
with a proper From: header and a plain "Bin Luo <luob87709@gmail.com>"
sign-off? The other patches in this series have the same metadata.
> diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
> index efd4e5e0290d4..f832251589f33 100644
> --- a/net/nfc/nci/core.c
> +++ b/net/nfc/nci/core.c
> @@ -582,7 +582,7 @@ static int nci_close_device(struct nci_dev *ndev)
> ndev->cur_conn_id,
> -ENODEV);
> mutex_unlock(&ndev->req_lock);
> - return 0;
> + goto flush_rx;
> }
[Severity: Low]
Before this patch, the already-down branch of nci_close_device() returned
here without touching rx_wq. With the goto, it now also runs
flush_workqueue(ndev->rx_wq) and then takes req_lock a second time. This
branch is mostly reached from nci_unregister_device() when the device is
already down.
The commit message says:
- In nci_close_device() after flush_workqueue(ndev->rx_wq) on both
close paths, guarded by req_lock and !NCI_UP.
It doesn't say that the rx_wq flush is new on the down path.
The change looks harmless, because destroy_workqueue() drains rx_wq right
after this during unregister. Could the commit message still mention
this behaviour change, since the patch is tagged for stable?
>
> /* Drop RX and TX queues */
> @@ -622,9 +622,17 @@ static int nci_close_device(struct nci_dev *ndev)
>
> mutex_unlock(&ndev->req_lock);
>
> +flush_rx:
> /* rx_work may take req_lock via nci_deactivate_target */
> flush_workqueue(ndev->rx_wq);
>
> + mutex_lock(&ndev->req_lock);
> + if (!test_bit(NCI_UP, &ndev->flags)) {
> + kfree_skb(ndev->rx_data_reassembly);
> + ndev->rx_data_reassembly = NULL;
> + }
> + mutex_unlock(&ndev->req_lock);
[Severity: High]
Can this free ndev->rx_data_reassembly while nci_add_rx_data_frag() is
still using it?
Holding req_lock here doesn't keep rx_work out. The chain
nci_rx_work()->nci_rx_data_packet()->nci_add_rx_data_frag() reads,
copies from, frees and reassigns ndev->rx_data_reassembly without ever
taking req_lock.
The flush before this also doesn't stop rx_work from being queued again.
In nci_recv_frame(), the flag test and the queueing are not atomic with
respect to close:
net/nfc/nci/core.c:nci_recv_frame() {
if (!ndev || (!test_bit(NCI_UP, &ndev->flags) &&
!test_bit(NCI_INIT, &ndev->flags))) {
kfree_skb(skb);
return -ENXIO;
}
/* Queue frame for rx worker thread */
skb_queue_tail(&ndev->rx_q, skb);
queue_work(ndev->rx_wq, &ndev->rx_work);
...
}
The normal close path sets NCI_INIT again while
__nci_request(nci_reset_req) runs. Could this sequence happen?
CPU1 (driver rx path)
nci_recv_frame()
passes the NCI_INIT test during the reset request
<preempted>
CPU2
nci_close_device()
clear_bit(NCI_INIT, &ndev->flags);
...
flush_workqueue(ndev->rx_wq);
CPU1
skb_queue_tail(&ndev->rx_q, skb);
queue_work(ndev->rx_wq, &ndev->rx_work);
rf_conn_info survives close, so the requeued rx_work accepts a data
packet on conn 0. It then runs nci_add_rx_data_frag() while CPU2 does
this:
mutex_lock(&ndev->req_lock);
if (!test_bit(NCI_UP, &ndev->flags)) {
kfree_skb(ndev->rx_data_reassembly);
That could result in:
- a use-after-free in the memcpy() from rx_data_reassembly->data
- a double kfree_skb() of rx_data_reassembly
- a fragment stored after the close-time free, which survives into the
next open (the stale data problem this patch is meant to fix)
virtual_ncidev_write() calls nci_recv_frame() without a lock and without
checking vdev->running. That lets userspace on /dev/virtual_nci time
frames against close.
Before this patch, only two places touched this field. One was rx_work,
which is single-threaded. The other was nci_free_device(), which runs
after destroy_workqueue().
[Severity: Medium]
Does this cover a reopen after nci_open_device() fails?
The init failure branch of nci_open_device() purges the queues and calls
ops->close(). It doesn't flush rx_wq or drop rx_data_reassembly:
net/nfc/nci/core.c:nci_open_device() {
...
} else {
/* Init failed, cleanup */
skb_queue_purge(&ndev->cmd_q);
skb_queue_purge(&ndev->rx_q);
skb_queue_purge(&ndev->tx_q);
ndev->ops->close(ndev);
ndev->flags &= BIT(NCI_UNREG);
}
...
}
nci_recv_frame() accepts frames while NCI_INIT is set. rf_conn_info for
conn 0 is created on CORE_INIT_RSP and persists. So nci_add_rx_data_frag()
can store a CONT data fragment that arrives during init.
Suppose a later init step then fails (post_setup, init_complete_req, or a
timeout). dev_up stays false and nfc_dev_down() returns -EALREADY, so
nci_close_device() and this new cleanup never run.
Nothing clears the buffer on the next successful open either. The first
data packet in initiator or target mode would then be reassembled on top
of the stale fragment.
Could the init failure branch flush rx_wq and drop the buffer? Another
option is to drop it once at the start of nci_open_device().
> +
> return 0;
> }
[ ... ]
> diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
> index f5c9a8ab7ec10..3ca1009ecb335 100644
> --- a/net/nfc/nci/ntf.c
> +++ b/net/nfc/nci/ntf.c
> @@ -132,6 +132,10 @@ static int nci_core_conn_intf_error_ntf_packet(struct nci_dev *ndev,
>
> pr_debug("status 0x%x, conn_id %d\n", ntf->status, ntf->conn_id);
>
> + /* drop partial rx data packet */
> + kfree_skb(ndev->rx_data_reassembly);
> + ndev->rx_data_reassembly = NULL;
> +
[Severity: Medium]
Should this drop be limited to the connection that owns the partial
message?
CORE_INTERFACE_ERROR_NTF reports an error on one logical connection,
ntf->conn_id. The reassembly buffer is shared by the static RF connection
and the dynamic HCI/NFCEE connections, which use
nci_hci_data_received_cb() as their data_exchange_cb.
Consider this sequence:
1. The NFCC sends a CONT segment on RF conn 0, which is stored in
rx_data_reassembly.
2. The NFCC sends CORE_INTERFACE_ERROR_NTF for a different HCI/NFCEE
connection, and this code frees the RF partial message.
3. The NFCC sends the LAST segment on conn 0.
nci_add_rx_data_frag() finds no reassembly and treats the tail as a
complete frame.
In target mode, the truncated tail is passed on with no error:
net/nfc/nci/data.c:nci_add_rx_data_frag() {
...
if (ndev->nfc_dev->rf_mode == NFC_RF_TARGET) {
/* Data received in Target mode, forward to nfc core */
err = nfc_tm_data_received(ndev->nfc_dev, skb);
...
}
So LLCP would receive a truncated PDU. In initiator mode, the same
notification also clears NCI_DATA_EXCHANGE, so the tail is mostly
dropped rather than delivered.
nci_rf_deactivate_ntf_packet() can drop the buffer unconditionally
because RF deactivation ends the whole RF interface. This notification
is per connection. Could the drop first check ntf->conn_id, for example
against NCI_STATIC_RF_CONN_ID or ndev->cur_conn_id?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127134029.1813-1-luob87709%40gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v5 5/5] nfc: preserve NCI data status error codes
2026-11-27 13:40 ` [PATCH v5 5/5] nfc: preserve NCI data status error codes Bin Luo (University of Electronic Science and Technology of China)
@ 2026-11-28 14:13 ` netdev-bot+sashiko
0 siblings, 0 replies; 10+ messages in thread
From: netdev-bot+sashiko @ 2026-11-28 14:13 UTC (permalink / raw)
To: luob87709; +Cc: oe-linux-nfc, johan, david, kuba, netdev, stable
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message understates how userspace sees the bug.
- [Low] In nci_nfcc_loopback_cb() (net/nfc/nci/core.c), the `else
nci_req_complete(ndev, NCI_STATUS_FAILED);` branch for err > 0 is dead…
--
nfc: preserve NCI data status error codes
The patch changes the status parameter of nci_add_rx_data_frag() from __u8
to int. Before, the negative errno from nci_to_errno() was truncated into
an unrelated positive value. With the change, the original errno reaches
nci_data_exchange_complete() and the AF_NFC raw socket.
> For userspace AF_NFC raw sockets, this corrupts the reported error: for
> example, an NCI status error mapped to -EBUSY (-16) is truncated to
> 240 and negated to SO_ERROR=-240 instead of reporting EBUSY (16).
[Severity: Low]
Should this paragraph also describe what recv() returns on the raw socket
before this patch? The wrong SO_ERROR value doesn't seem to be the only
symptom userspace sees.
With the old __u8 parameter, -EBUSY arrives as 240 and gets passed down
this path:
nci_add_rx_data_frag()->nci_data_exchange_complete()->
rawsock_data_exchange_complete()->rawsock_report_error()
net/nfc/rawsock.c:rawsock_report_error() {
...
sk->sk_err = -err;
...
}
That stores -240 in sk_err. On the next recv(), sock_error() returns
-xchg(&sk->sk_err, 0), which is +240.
__skb_recv_datagram() only retries on -EAGAIN, so it returns NULL with
*err = 240. rawsock_recvmsg() then returns that value as is:
net/nfc/rawsock.c:rawsock_recvmsg() {
...
skb = skb_recv_datagram(sk, flags, &rc);
if (!skb)
return rc;
...
}
So userspace sees a successful read of 240 bytes with nothing copied into
its buffer, and 240 can be larger than the buffer it passed in. The other
mapped statuses behave the same way: -EBADMSG gives 182, -EPROTO 185,
-ETIMEDOUT 146, -ECOMM 186 and -ENOSYS 218.
The code change fixes this path as well. Could the commit message mention
the phantom read so stable maintainers can see the full impact?
> diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
> index 3bbebb9505545..4a2326a337649 100644
> --- a/net/nfc/nci/data.c
> +++ b/net/nfc/nci/data.c
> @@ -213,13 +213,11 @@ EXPORT_SYMBOL(nci_send_data);
>
> static void nci_add_rx_data_frag(struct nci_dev *ndev,
> struct sk_buff *skb,
> - __u8 pbf, __u8 conn_id, __u8 status)
> + __u8 pbf, __u8 conn_id, int err)
[Severity: Low]
This isn't a bug, but with this change the err > 0 branch in
nci_nfcc_loopback_cb() can no longer run:
net/nfc/nci/core.c:nci_nfcc_loopback_cb() {
...
if (err) {
kfree_skb(skb);
if (err < 0)
nci_req_cancel(ndev, -err);
else
nci_req_complete(ndev, NCI_STATUS_FAILED);
return;
}
...
}
The else branch was added in the earlier commit "net/nfc: fix skb
ownership on data exchange errors". At that point, the truncated status
coming out of this __u8 parameter was the only source of positive err
values.
After this patch, nci_add_rx_data_frag() passes only 0, a negative
nci_to_errno() value, or -ENOMEM. The other callers of
nci_data_exchange_complete() pass -ENODEV, -ETIMEDOUT or -EIO.
Could nci_nfcc_loopback_cb() be simplified to always call
nci_req_cancel(ndev, -err) when err is nonzero? Leaving the positive
branch in suggests that positive NCI status values can still arrive there.
> {
> int reassembly_len;
> - int err = 0;
>
> - if (status) {
> - err = status;
> + if (err) {
> kfree_skb(ndev->rx_data_reassembly);
> ndev->rx_data_reassembly = NULL;
> goto exit;
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127134029.1813-1-luob87709%40gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-11-28 14:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 13:40 [PATCH v5 0/5] net/nfc: fix skb ownership, reassembly cleanup, and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 1/5] net/nfc: fix skb ownership on data exchange errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
2026-11-27 13:40 ` [PATCH v5 2/5] nfc: pn533: clear resp after queueing to avoid double free Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 13:40 ` [PATCH v5 3/5] nfc: digital: complete DEP data exchange on terminal errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
2026-11-27 13:40 ` [PATCH v5 4/5] nfc: nci: drop stale rx_data_reassembly on errors, timeout, and close Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
2026-11-27 13:40 ` [PATCH v5 5/5] nfc: preserve NCI data status error codes Bin Luo (University of Electronic Science and Technology of China)
2026-11-28 14:13 ` netdev-bot+sashiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox