nfc: port100: reject frames whose declared length exceeds the received data
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 562d4d59b8a1d5f3ca75115d6ac10c7b7bc68c06 · < 14b1467cfc6630583650f33538174c5a1ec685ab| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfc: port100: reject frames whose declared length exceeds the received data
port100_recv_response() passes the URB transfer buffer to port100_rx_frame_is_valid(), which checksums le16_to_cpu(frame->datalen) bytes of frame->data. datalen is a 16-bit field supplied by the device and is never checked against the number of bytes actually received (urb->actual_length), so a device reporting a datalen larger than the received frame makes port100_data_checksum() read out of bounds past the transfer buffer.
Reject a response whose declared frame size does not fit the received length before validating it.
Found by 0sec (https://0sec.ai) using automated source analysis; the missing bound is evident from source. Compile-tested.
From the CVE record · Linux
The Linux kernel’s NFC port100 driver does not check a device-supplied frame length against the data actually received. A device that reports an oversized length can cause an out-of-bounds read while the driver validates the response. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with the NFC port100 driver should check their kernel versions; affected versions are not specified.