linux/drivers/firmware/google
Laxman Acharya Padhya a58a57a107 firmware: coreboot: Validate table bounds
The existing coreboot_table_populate() bounds checks limit individual
entries to the mapped length.  However, coreboot_table_probe() replaces
the platform resource length with header and table sizes supplied by
firmware before mapping the full table.

A malformed table can overflow the 32-bit size addition or advertise an
extent beyond the resource, causing the driver to map and parse memory
outside the resource.  A resource shorter than the fixed header is also
mapped as though it contained a complete header.

Reject resources shorter than the fixed header.  After validating the
signature, require a complete header, calculate the advertised extent
with overflow checking, and reject extents beyond the resource before
remapping the table.

Fixes: d384d6f43d ("firmware: google memconsole: Add coreboot support")
Signed-off-by: Laxman Acharya Padhya <acharyalaxman8848@gmail.com>
Link: https://lore.kernel.org/r/20260801165651.42172-1-acharyalaxman8848@gmail.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2026-08-03 03:00:21 +00:00
..
cbmem.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
coreboot_table.c firmware: coreboot: Validate table bounds 2026-08-03 03:00:21 +00:00
coreboot_table.h firmware: google: Export coreboot table entries 2026-02-20 14:38:21 +01:00
framebuffer-coreboot.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
gsmi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffers 2026-02-20 14:38:24 +01:00
Makefile firmware: google: Implement cbmem in sysfs driver 2022-11-10 18:51:56 +01:00
memconsole-coreboot.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
memconsole-x86-legacy.c firmware: google: add missing MODULE_DESCRIPTION() macros 2024-06-11 03:34:05 +00:00
memconsole.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
memconsole.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
vpd_decode.c firmware: google: increment VPD key_len properly 2019-10-11 08:41:34 +02:00
vpd_decode.h firmware: google: check if size is valid when decoding VPD data 2019-09-04 13:31:28 +02:00
vpd.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00