mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
mem_init_flex() allocates the page header index array sized for ADDR_TO_IDX(mem_end) + 1 entries, but never checked that each page record's address falls within [0, mem_end). A crafted LKCD page record with addr >= mem_end writes 8 bytes beyond the allocation. Fix by rejecting any page record whose address is > mem_end - PAGE_SIZE with ERR_EXIT(), immediately after the end-of-dump marker check. Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
8.1 KiB
8.1 KiB