Re: [PATCH] NFC: pn533: bound the UART receive buffer

From: Paolo Abeni

Date: Thu Mar 26 2026 - 07:01:51 EST


On 3/23/26 8:24 AM, Pengpeng Hou wrote:
> pn532_receive_buf() appends every incoming byte to dev->recv_skb and
> only resets the buffer after pn532_uart_rx_is_frame() recognizes a
> complete frame. A continuous stream of bytes without a valid PN532 frame
> header therefore keeps growing the skb until skb_put_u8() hits the tail
> limit.
>
> Drop the accumulated partial frame once the fixed receive buffer is full
> so malformed UART traffic cannot grow the skb past
> PN532_UART_SKB_BUFF_LEN.
>
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>

This looks line 'net' material. Could you please provide a suitable
Fixes tag?

Thanks,

Paolo