summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorTitouan Ameline de Cadeville <titouan.ameline@gmail.com>2026-04-26 23:47:39 +0200
committerTzung-Bi Shih <tzungbi@kernel.org>2026-04-28 02:30:10 +0000
commit7b1a1af4556a4f95ef273e91435fe804cbfcd223 (patch)
tree1d1fee8419db775468293aff6dbe8f8ecd6044ad /scripts/Makefile.thinlto
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
firmware: google: Add bounds checks in coreboot_table_populate()
coreboot_table_populate() iterates over firmware-provided table entries with no validation that the entries stay within the mapped memory region. A corrupt table with a large `entry->size` advances `ptr_entry` past the mapped region, causing an out-of-bounds read on the next iteration. Add a check before dereferencing `ptr_entry` to ensure the entry header is readable, and a second check after reading `entry->size` to ensure the full entry stays within the mapped region. Pass `len` from coreboot_table_probe() into coreboot_table_populate() to make the mapped region size available for validation. Signed-off-by: Titouan Ameline de Cadeville <titouan.ameline@gmail.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Link: https://lore.kernel.org/r/20260426214739.117131-1-titouan.ameline@gmail.com Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions