u-boot/common/spl
Vignesh Raghavendra c1335e2ca5 spl: ymodem: Fix buffer overflow during Image copy
ymodem_read_fit() driver will end copying up to BUF_SIZE boundary even
when requested size of copy operation is less than that.
For example, if offset = 0, size = 1440B, ymodem_read_fit() ends up
copying 2KB from offset = 0, to destination buffer addr

This causes data corruption when malloc'd buffer is passed during UART
boot since commit 03f1f78a9b ("spl: fit: Prefer a malloc()'d buffer
for loading images")

With this, UART boot works again on K3 (AM654, J7, AM64) family of
devices.

Fixes: 03f1f78a9b ("spl: fit: Prefer a malloc()'d buffer for loading images")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-02-03 12:15:33 -05:00
..
Kconfig spl: Convert SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to Kconfig 2022-01-21 14:01:35 -05:00
Makefile lib: optee: remove the duplicate CONFIG_OPTEE 2021-10-05 08:44:48 -04:00
spl.c spl: add support for custom boot method names 2022-01-28 17:58:41 -05:00
spl_atf.c spl: atf: add support for LOAD_IMAGE_V2 2020-12-04 16:09:06 -05:00
spl_bootrom.c spl: pass args to board_return_to_bootrom 2019-10-08 16:35:16 +02:00
spl_dfu.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
spl_ext.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_fat.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_fit.c tools: Pass the key blob around 2022-01-26 08:50:44 -07:00
spl_legacy.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_mmc.c spl: Convert SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to Kconfig 2022-01-21 14:01:35 -05:00
spl_nand.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_net.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_nor.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_onenand.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_opensbi.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
spl_optee.S Rockchip-focused changes for v2018.11-rc2: 2018-10-05 13:40:42 -04:00
spl_ram.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_sata.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_sdp.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_spi.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_ubi.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_usb.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_xip.c SPL: Add struct spl_boot_device parameter into spl_parse_board_header() 2022-01-20 11:35:29 +01:00
spl_ymodem.c spl: ymodem: Fix buffer overflow during Image copy 2022-02-03 12:15:33 -05:00