diff options
| author | Laxman Acharya Padhya <acharyalaxman8848@gmail.com> | 2026-08-01 22:41:51 +0545 |
|---|---|---|
| committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2026-08-03 03:00:21 +0000 |
| commit | a58a57a1076f8c5dae0327e3710899478c3be901 (patch) | |
| tree | 0eaafd6c4323882002edc3457b991e1390e9c99e /include/linux/memory | |
| parent | e31ecda9e3af675bc05039f0791a34a46c27f253 (diff) | |
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: d384d6f43d1e ("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>
Diffstat (limited to 'include/linux/memory')
0 files changed, 0 insertions, 0 deletions
