mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Bommarito <michael.bommarito@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, Dan Carpenter <error27@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>, Kees Cook <kees@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] nfc: pn533: bound device-supplied lengths in the receive path
Date: Wed, 17 Jun 2026 22:59:51 -0400	[thread overview]
Message-ID: <20260618025953.1878757-1-michael.bommarito@gmail.com> (raw)

The PN533 receive path trusts several device-supplied length fields and
reads past the received buffer when they exceed it. The receive skb is
sized to the device's USB transfer length, so a malicious or counterfeit
PN53x reader triggers out-of-bounds reads in the standard/ACR122 frame
validators, in Type A target parsing (nfcid_len), and in the autopoll
record walk.

Michael Bommarito (2):
  nfc: pn533: bound device-supplied lengths in the receive path
  nfc: pn533: add KUnit tests for receive-path bounds

 drivers/nfc/pn533/Kconfig |   9 +++
 drivers/nfc/pn533/pn533.c | 125 +++++++++++++++++++++++++++++++++++++-
 drivers/nfc/pn533/pn533.h |   3 +-
 drivers/nfc/pn533/usb.c   |  12 +++-
 4 files changed, 144 insertions(+), 5 deletions(-)

-- 
2.53.0


             reply	other threads:[~2026-06-18  3:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18  2:59 Michael Bommarito [this message]
2026-06-18  2:59 ` [PATCH 1/2] " Michael Bommarito
2026-06-18  2:59 ` [PATCH 2/2] nfc: pn533: add KUnit tests for receive-path bounds Michael Bommarito

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=20260618025953.1878757-1-michael.bommarito@gmail.com \
    --to=michael.bommarito@gmail.com \
    --cc=error27@gmail.com \
    --cc=kees@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®