From: Pengpeng Hou <pengpeng@iscas.ac.cn>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Kees Cook <kees@kernel.org>,
linux-kernel@vger.kernel.org, pengpeng@iscas.ac.cn
Subject: Re: [PATCH] net/nfc: bound SENSF response copy length
Date: Tue, 7 Apr 2026 11:30:03 +0800 [thread overview]
Message-ID: <20260407113003.4-nfc-sensf-reply-pengpeng@iscas.ac.cn> (raw)
In-Reply-To: <20260322031922.57949-1-pengpeng@iscas.ac.cn>
Hi Simon,
Thanks, you're right about the net targeting, the NFC: digital:
prefix, and the missing Fixes tag.
You are also right that a valid full SENSF_RES can be 19 bytes long.
So instead of rejecting resp->len > NFC_SENSF_RES_MAXSIZE, v2 only
rejects payloads larger than struct digital_sensf_res, then clamps the
copy into the 18-byte sensf_res buffer inside struct nfc_target.
That keeps valid 19-byte responses working while still fixing the stack
overwrite in the target copy path. The lower-bound check remains on the
pre-skb_pull() frame length, and v2 only adds the post-pull upper bound
before treating the payload as struct digital_sensf_res.
Thanks,
Pengpeng
prev parent reply other threads:[~2026-04-07 2:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-22 3:19 [PATCH] net/nfc: bound SENSF response copy length Pengpeng Hou
2026-03-23 18:06 ` Simon Horman
2026-04-07 1:57 ` [PATCH net v2] NFC: digital: bound SENSF response copy into nfc_target Pengpeng Hou
2026-04-12 15:35 ` Jakub Kicinski
2026-04-17 3:06 ` Pengpeng Hou
2026-04-07 3:30 ` Pengpeng Hou [this message]
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=20260407113003.4-nfc-sensf-reply-pengpeng@iscas.ac.cn \
--to=pengpeng@iscas.ac.cn \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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