linux/drivers/greybus
Pengpeng Hou 1214bf2896 greybus: gb-beagleplay: bound bootloader receive buffering
cc1352_bootloader_rx() appends each serdev chunk into the fixed
rx_buffer before parsing bootloader packets. The helper can keep
leftover bytes between callbacks and may receive multiple packets in one
callback, so a single count value is not constrained by one packet
length.

Check that the incoming chunk fits in the remaining receive buffer space
before memcpy(). If it does not, drop the staged data and consume the
bytes instead of overflowing rx_buffer.

Fixes: 0cf7befa3e ("greybus: gb-beagleplay: Add firmware upload API")
Cc: stable <stable@kernel.org>
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260402054016.38587-1-pengpeng@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-02 15:55:09 +02:00
..
Kconfig greybus: gb-beagleplay: Add firmware upload API 2024-09-12 09:04:09 +02:00
Makefile
arpc.h
bundle.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
connection.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
control.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
core.c greybus: Use bus methods for .probe() and .remove() 2026-01-16 16:32:03 +01:00
debugfs.c
es2.c greybus: es2: drop redundant device reference 2026-04-02 15:55:01 +02:00
gb-beagleplay.c greybus: gb-beagleplay: bound bootloader receive buffering 2026-04-02 15:55:09 +02:00
greybus_trace.h
hd.c greybus: Remove usage of the deprecated ida_simple_xx() API 2024-03-07 21:41:38 +00:00
interface.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
manifest.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
module.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
operation.c greybus: add WQ_PERCPU to alloc_workqueue users 2025-11-26 14:40:53 +01:00
svc.c greybus: svc: use kzalloc_flex 2026-04-02 15:55:01 +02:00
svc_watchdog.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00