[PATCH v5 1/3] mm/memfd_luo: validate serialized_data before conversion

Pasha Tatashin pasha.tatashin at soleen.com
Fri Jun 26 17:52:45 PDT 2026


On Tue, 23 Jun 2026 10:51:59 +0000, Tarun Sahu <tarunsahu at google.com> wrote:
> In memfd_luo_finish() and memfd_luo_retrieve(), phys_to_virt() was called
> on args->serialized_data before checking if the physical address is valid.
> Since physical address 0 does not map to virtual NULL (due to direct
> mapping offsets), the subsequent check 'if (!ser)' was ineffective at
> catching a missing serialized_data, leading to unsafe dereferences later.
> 
> Validate that args->serialized_data is non-zero before calling
> phys_to_virt().
> 
> [...]

Reviewed-by: Pasha Tatashin <pasha.tatashin at soleen.com>

-- 
Pasha Tatashin <pasha.tatashin at soleen.com>



More information about the kexec mailing list