linux/drivers/nfc
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
..
fdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-22 18:40:38 -07:00
microread Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nfcmrvl Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nxp-nci NFC: nxp-nci: allow GPIOs to sleep 2026-03-18 17:20:51 -07:00
pn533 NFC: pn533: bound the UART receive buffer 2026-03-31 11:04:30 +02:00
pn544 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
s3fwrn5 nfc: s3fwrn5: Use SHA-1 library instead of crypto_shash 2025-08-18 17:29:08 -07:00
st-nci treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
st21nfca Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
st95hf nfc: st95hf: drop driver owner assignment 2024-03-29 12:32:51 -07:00
Kconfig nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
Makefile nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
mei_phy.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mei_phy.h NFC: mei_phy: fix kernel-doc warnings 2025-11-17 19:32:32 -08:00
nfcsim.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
port100.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
trf7970a.c NFC: trf7970a: Create device-tree parameter for RX gain reduction 2025-06-27 15:08:57 -07:00
virtual_ncidev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00