Skip to content

nfc: pn533: bound device-supplied lengths in the receive path

Michael Bommarito lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nfc: pn533: bound device-supplied lengths in the receive pathdrivers/nfc/pn533/pn533.c drivers/nfc/pn533/pn533.h drivers/nfc/pn533/usb.c+42 -50 replies
2/2nfc: pn533: add KUnit tests for receive-path boundsdrivers/nfc/pn533/Kconfig drivers/nfc/pn533/pn533.c+102 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] nfc: pn533: bound device-supplied lengths in the receive path

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(-)
Signature · 1 line
2.53.0