Skip to content
Snippets Groups Projects
Commit 8c4037a0 authored by Utkarsh Gupta's avatar Utkarsh Gupta Committed by Stefano Babic
Browse files

imx: hab: Ensure the IVT DCD pointer is Null prior to calling HAB authenticate function.


DCD commands should only be present in the initial boot image loaded by
the SoC ROM. DCD should not be present in images that will be verified
by software using HAB RVT authentication APIs. Newer versions of HAB
will generate an error if a DCD pointer is present in an image being
authenticated by calling the HAB RVT API. Older versions of HAB will
process and run DCD if it is present, and this could lead to an incorrect
authentication boot flow.

It is highly recommended this check is in place to ensure additional HAB
verified images do not include a DCD table.

Signed-off-by: default avatarUtkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: default avatarBreno Lima <breno.lima@nxp.com>
Reviewed-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
parent 669f2d18
No related branches found
No related tags found
No related merge requests found
......@@ -516,6 +516,12 @@ int imx_hab_authenticate_image(uint32_t ddr_start, uint32_t image_size,
goto hab_authentication_exit;
}
/* Verify if IVT DCD pointer is NULL */
if (ivt->dcd) {
puts("Error: DCD pointer must be NULL\n");
goto hab_authentication_exit;
}
start = ddr_start;
bytes = image_size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment