summaryrefslogtreecommitdiff
path: root/include/configs/imx8qm_mek.h
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarsh.gupta@nxp.com>2018-04-02 19:41:16 -0500
committerYe Li <ye.li@nxp.com>2018-05-23 04:15:35 -0700
commitb4bda0ae3c5c5be0524148c1bcdfea908da859d6 (patch)
treee4e4de5a0e5a0fa2ba39d0ba7a207da82f5dba20 /include/configs/imx8qm_mek.h
parent49ae851ccd00a027d122338d7b39402135041ad8 (diff)
MLK-17935: 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> (cherry picked from commit dabffd1b04df3b0393ef6a9a35b5fd816edd8c63) Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'include/configs/imx8qm_mek.h')
0 files changed, 0 insertions, 0 deletions