u-boot-brain/arch/arm
Utkarsh Gupta fe8acf556c imx: HAB: Validate IVT before authenticating image
Calling csf_is_valid() with an un-signed image may lead to data abort
as the CSF pointer could be pointing to a garbage address when accessed
in HAB_HDR_LEN(*(const struct hab_hdr *)(ulong)ivt_initial->csf).

Authenticate image from DDR location 0x80800000...
Check CSF for Write Data command before authenticating image
data abort
pc : [<fff5494c>]          lr : [<fff54910>]
reloc pc : [<8780294c>]    lr : [<87802910>]
sp : fdf45dc8  ip : 00000214     fp : 00000000
r10: fffb6170  r9 : fdf4fec0     r8 : 00722020
r7 : 80f20000  r6 : 80800000     r5 : 80800000  r4 : 00720000
r3 : 17a5aca3  r2 : 00000000     r1 : 80f2201f  r0 : 00000019
Flags: NzcV  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...

To avoid such errors during authentication process, validate IVT structure
by calling validate_ivt function which checks the following values in an IVT:

IVT_HEADER = 0x4X2000D1
ENTRY != 0x0
RES1 = 0x0
DCD = 0x0       /* Recommended */
SELF != 0x0     /* Absoulute address of IVT */
CSF != 0x0
RES2 = 0x0

This commit also checks if Image's start address is 4 byte aligned.

commit "0088d127 MLK-14945 HAB: Check if IVT valid before authenticating image"
removed as this patch addresses the issue.

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08 09:18:29 +02:00
..
cpu mmc: fsl_esdhc: add pulse width detection workaround 2021-04-06 18:36:04 +08:00
dts imx8mn: Add LPDDR4 EVK board support 2021-04-08 09:18:29 +02:00
include imx: HAB: Update hab codes to support ARM64 and i.MX8M 2021-04-08 09:18:29 +02:00
lib arm: cp15: remove weak function arm_init_domains 2021-03-02 15:53:37 -05:00
mach-aspeed common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mach-at91 First set of u-boot-atmel features for 2021.07 cycle 2021-03-30 11:24:09 -04:00
mach-bcm283x reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-bcmstb
mach-cortina
mach-davinci reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-exynos reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-highbank common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
mach-imx imx: HAB: Validate IVT before authenticating image 2021-04-08 09:18:29 +02:00
mach-integrator
mach-ipq40xx dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
mach-k3 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-keystone reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-kirkwood reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-lpc32xx reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-mediatek board: mt7629: enable compression of u-boot to reduce the size of final image 2021-03-20 16:24:27 -04:00
mach-meson arm: meson: remove static ethernet link setup 2021-04-06 11:10:29 +02:00
mach-mvebu Prepare v2021.04-rc4 2021-03-15 12:15:38 -04:00
mach-nexell s5p4418_nanopi2: Drop dead code 2021-03-02 15:53:37 -05:00
mach-octeontx reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-octeontx2 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-omap2 Prepare v2021.04-rc4 2021-03-15 12:15:38 -04:00
mach-orion5x reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-owl reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-qemu qemu: arm: Initialise virtio devices in board_late_init 2020-12-31 14:41:31 +01:00
mach-rmobile board: silinux: Enable recovery SPL for EK874 board 2021-03-16 20:09:30 +01:00
mach-rockchip rockchip: rk3368: move STACK_R_ADDR address and into Kconfig 2021-03-30 16:53:00 +08:00
mach-s5pc1xx
mach-snapdragon common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mach-socfpga Prepare v2021.04-rc5 2021-03-29 18:00:21 -04:00
mach-sti
mach-stm32 treewide: Update email address Patrick Delaunay and Patrice Chotard 2020-12-09 10:57:50 +01:00
mach-stm32mp Prepare v2021.04-rc4 2021-03-15 12:15:38 -04:00
mach-sunxi - convert sunxi_display to DM_VIDEO 2021-03-04 14:36:40 -05:00
mach-tegra reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-u8500 common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
mach-uniphier reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-versal common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mach-versatile
mach-zynq reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-zynqmp Xilinx changes for v2021.04-rc3 2021-02-23 10:45:55 -05:00
mach-zynqmp-r5 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
thumb1/include/asm/proc-armv
config.mk Makefile: Rename ALL-y to INPUTS-y 2020-07-28 19:30:39 -06:00
Kconfig arm: socfpga: Move Stratix10 and Agilex to use TARGET_SOCFPGA_SOC64 2021-03-08 10:59:10 +08:00
Kconfig.debug
Makefile arm: octeontx2: Add support for OcteonTX2 SoC platforms 2020-08-25 08:01:16 +02:00