linux/drivers/nfc/pn533
Pengpeng Hou 30fe3f5f64 NFC: pn533: bound the UART receive buffer
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.

Fixes: c656aa4c27 ("nfc: pn533: add UART phy driver")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260326142033.82297-1-pengpeng@iscas.ac.cn
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-31 11:04:30 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile nfc: pn533: add UART phy driver 2019-10-29 21:05:26 -07:00
i2c.c nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:28:31 -07:00
pn533.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pn533.h nfc: pn533: Constify pn533_phy_ops 2021-10-07 13:35:10 +01:00
uart.c NFC: pn533: bound the UART receive buffer 2026-03-31 11:04:30 +02:00
usb.c nfc: pn533: properly drop the usb interface reference on disconnect 2026-02-25 18:51:37 -08:00