[PATCH] tool: ifwitool: Fix buffer overflow
Simon Glass
sjg at chromium.org
Fri Nov 18 19:47:52 CET 2022
On Fri, 18 Nov 2022 at 05:37, Mikhail Ilin <ilin.mikhail.ol at gmail.com> wrote:
>
> An incorrect 1st parameter is passed to the fix_member()
> function. Should use a pointer to the beginning of the parent structure
> (bpdt or subpart_dir, because are boxed), not to their fields. Otherwise,
> this leads to an overrun of the structure boundary, since in the
> fix_member() function, an 'offset' is made, relative to the 1st argument,
> which itself is an 'offset' from the beginning of the structure.
>
> Signed-off-by: Mikhail Ilin <ilin.mikhail.ol at gmail.com>
> ---
> tools/ifwitool.c | 44 +++++++++++++++++++-------------------------
> 1 file changed, 19 insertions(+), 25 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
Fixes: 56bf4f86307 ("x86: Add ifwitool for Intel Integrated Firmware Image")
More information about the U-Boot
mailing list