From: "Bin Luo (University of Electronic Science and Technology of China)" <luob87709@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: oe-linux-nfc@lists.linux.dev, johan@kernel.org, david@ixit.cz,
kuba@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v4 1/2] net/nfc: fix skb ownership on data exchange errors
Date: Fri, 27 Nov 2026 21:40:05 +0800 [thread overview]
Message-ID: <20261127134005.1762-1-luob87709@gmail.com> (raw)
In-Reply-To: <179576491145.3135.10392815197154160858@kernel.org>
Hi,
Thank you for the review. All four findings are valid and will be
addressed in v5:
1. nci_nfcc_loopback_cb() and NCI_DATA_EXCHANGE:
Agreed. The old nci_nfcc_loopback_cb() defect on nonzero err with a
NULL skb was reporting NCI_STATUS_OK with a NULL *resp (risking a
NULL pointer dereference in st_nci_loopback()), plus leaking skb
when conn_info lookup fails, rather than leaking skb on the normal
error path. Also agreed that current mainline
nci_data_exchange_complete() requires NCI_DATA_EXCHANGE to be set
(which loopback and NCI-HCI send paths do not currently set). In v5
we update the commit description to accurately state both the NULL
dereference / !conn_info leak and this mainline gating nuance while
keeping the callbacks consistent with the data_exchange_cb_t
contract for stable trees and future fixes.
2. nci_close_device() and stale ndev->rx_data_reassembly:
Agreed. In v5 we free and clear ndev->rx_data_reassembly after
flush_workqueue(ndev->rx_wq) on both close paths in
nci_close_device() (guarded by req_lock and !NCI_UP).
3. nci_core_conn_intf_error_ntf_packet() in target mode:
Agreed. In v5 we move the ndev->rx_data_reassembly drop outside the
test_bit(NCI_DATA_EXCHANGE, &ndev->flags) check, matching
nci_rf_deactivate_ntf_packet().
4. Patch scope, accurate descriptions, and Fixes tags:
In v5 we split the series cleanly so each bug class has its own
patch and accurate Fixes tags:
- Patch 1/5: data_exchange_cb_t contract and callback skb leaks
(explicitly calling out ST21NFCA success-path leaks and the
nci_nfcc_loopback_cb() NULL-dereference / !conn_info leak).
- Patch 2/5: PN533 double-free after queueing resp to dev->resp_q
(in both pn533_data_exchange_complete() and
pn533_tm_get_data_complete()).
- Patch 3/5: Digital DEP missing completion callback on terminal
errors (hang + socket refcount leak).
- Patch 4/5: NCI rx_data_reassembly cleanup on data-status errors,
interface errors (unconditional), timeouts, and device close.
- Patch 5/5: Preserve signed errno in nci_add_rx_data_frag().
I will respin and post v5 as a new thread shortly.
Best regards,
Bin Luo
pw-bot: cr
next prev parent reply other threads:[~2026-11-27 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 6:39 [PATCH v4 0/2] net/nfc: fix skb ownership and NCI status errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-26 6:39 ` [PATCH v4 1/2] net/nfc: fix skb ownership on data exchange errors Bin Luo (University of Electronic Science and Technology of China)
2026-11-27 7:35 ` netdev-bot+sashiko
2026-11-27 13:40 ` Bin Luo (University of Electronic Science and Technology of China) [this message]
2026-11-26 6:39 ` [PATCH v4 2/2] nfc: preserve NCI data status error codes Bin Luo (University of Electronic Science and Technology of China)
2026-11-26 6:42 ` [PATCH v4 0/2] net/nfc: fix skb ownership and NCI status errors netdev-bot+sinfo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127134005.1762-1-luob87709@gmail.com \
--to=luob87709@gmail.com \
--cc=david@ixit.cz \
--cc=johan@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-linux-nfc@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox