nfc: pn533: fix OOB read in pn533_acr122_is_rx_frame_valid()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9815c7cf22daceabfb919ddcd6f2c80e049c1fbc · < e72cbedc4596e808d22dd2b9fff666ece76f8dd6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfc: pn533: fix OOB read in pn533_acr122_is_rx_frame_valid()
frame->ccid.datalen is read directly from the USB response frame and used, unchecked, as an index into frame->data[]. A malicious or malfunctioning device can set this field to an arbitrary value, causing the driver to read far outside the received buffer.
Bound ccid.datalen against the maximum possible ACR122 frame size before using it. This replaces the existing datalen == 0 check, since datalen < 2 already covers that case and additionally rejects datalen == 1, which would still underflow the "datalen - 2" offset used below.
From the CVE record · Linux
The Linux kernel's pn533 NFC driver uses an unchecked length from an ACR122 USB response frame to index received data. A malicious or malfunctioning USB device can set that length to make the driver read outside the received buffer.
Engineers running Linux systems that use the pn533 NFC driver should check their kernel versions; affected versions were not specified.