summaryrefslogtreecommitdiff
path: root/src/mainboard/google/herobrine
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-08-06 01:01:08 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-08-07 16:39:45 +0000
commite19b5e7acde3990de9f7dc25e1b43f07dc0cb0fa (patch)
treefa0e52e65dea48c759aac930e3c2e8a8d50c1b3d /src/mainboard/google/herobrine
parent5c1a69328b443e442f0176e76f78ceca36592f78 (diff)
soc/amd/common/psp_smi_flash: add buffer overflow checks
Before 'handle_psp_command' calls any of the functions in this file, it make sure that the 'size' field in the command buffer's header doesn't indicate that the command buffer is larger than the SMM memory region reserved for it. The read/write command buffer has a 'num_bytes' field to indicate how many bytes should be read from the SPI flash and put into the data buffer within the command buffer or how many bytes from this buffer should be written to the flash. While we should be able to assume that the PSP won't send us malformed command buffer, we should still better check this just to be sure. Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ib4e8514eedc3ad154a705c8a1e85d367e452dbed Reviewed-on: https://review.coreboot.org/c/coreboot/+/83778 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/herobrine')
0 files changed, 0 insertions, 0 deletions