]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
USB: serial: io_ti: reject oversized boot-mode firmware
authorPengpeng Hou <pengpeng@iscas.ac.cn>
Mon, 20 Jul 2026 11:48:17 +0000 (19:48 +0800)
committerJohan Hovold <johan@kernel.org>
Mon, 20 Jul 2026 14:35:40 +0000 (16:35 +0200)
commit6fcd91ce2a0787cd4bdf6a0b3cd4884566a3cdba
tree71bd3696857bcd99198f90f84a94ab491439d24d
parent52beeed5e5d257e1da3e2d2f2fb25bc1e3cdb6d2
USB: serial: io_ti: reject oversized boot-mode firmware

do_boot_mode() copies the firmware payload, excluding its four-byte prefix,
into a fixed 15.5 KiB staging buffer. check_fw_sanity() already proves that
the image contains its seven-byte header and validates the declared image
length and checksum, but it does not impose this boot-mode destination
limit.

Reject images whose payload does not fit before allocating and filling the
staging buffer.

Fixes: d12b219a228e ("edgeport-ti: use request_firmware()")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/io_ti.c