diff options
| author | Doruk Tan Ozturk <doruk@0sec.ai> | 2026-07-11 14:36:51 +0200 |
|---|---|---|
| committer | David Heidelberg <david@ixit.cz> | 2026-08-17 19:27:51 +0200 |
| commit | 5c0f3a8d40f8a68a7d3f768c1f7a4cd111ff4879 (patch) | |
| tree | 294a2df701cdb2954c6a492d19ed56f94d37369a /scripts/objdiff | |
| parent | 9c9f84fc4a0d9d815a6d851369e5a748a2eacdbe (diff) | |
| download | linux-next-5c0f3a8d40f8a68a7d3f768c1f7a4cd111ff4879.tar.gz linux-next-5c0f3a8d40f8a68a7d3f768c1f7a4cd111ff4879.zip | |
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.
Fixes: 562d4d59b8a1 ("NFC: Sony Port-100 Series driver")
Cc: stable@vger.kernel.org
Assisted-by: 0sec:claude-opus-4-8
Signed-off-by: Doruk Tan Ozturk <doruk@0sec.ai>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260711123651.32595-1-doruk@0sec.ai
Signed-off-by: David Heidelberg <david@ixit.cz>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
