[PATCH v1 3/8] kho: validate preservation metadata in kho_restore_vmalloc()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sun Oct 18 19:18:51 PDT 2026


> kho_restore_vmalloc() currently dereferences preservation before
> checking for NULL, does not reject unknown KHO vmalloc flags in
> kho_flags_to_vmalloc(), and does not validate preservation->first.phys,
> preservation->total_pages, preservation->order, or potential size
> overflow before allocating the pages array and shifting by order.
> 
> Introduce kho_vmalloc_validate() in kexec_handover_internal.h to
> validate the struct kho_vmalloc header and convert its flags before
> restoring the vmalloc area.
> 
> Signed-off-by: Pasha Tatashin <pasha.tatashin at soleen.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261019021111.990394-1-pasha.tatashin@soleen.com?part=3




More information about the kexec mailing list