Hi,

Please find the latest report on new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.

Defect Details

** CID 487973:       Memory - corruptions  (ARRAY_VS_SINGLETON)


_____________________________________________________________________________________________
*** CID 487973:         Memory - corruptions  (ARRAY_VS_SINGLETON)
/plat/xilinx/versal_net/bl31_versal_net_setup.c: 167             in bl31_early_platform_setup2()
161     		xbl_ret = xbl_handover(&bl32_image_ep_info, &bl33_image_ep_info,
162     				       tfa_handoff_addr);
163     		if (xbl_ret == XBL_HANDOFF_SUCCESS) {
164     			goto success;
165     		}
166     #if DEBUG
>>>     CID 487973:         Memory - corruptions  (ARRAY_VS_SINGLETON)
>>>     Passing "&boot_mode" to function "get_boot_mode" which uses it as an array. This might corrupt or misinterpret adjacent memory locations.
167     		get_boot_mode(&boot_mode);
168     		if ((xbl_ret != XBL_HANDOFF_SUCCESS) && (boot_mode == JTAG_MODE)) {
169     			bl31_set_default_config();
170     			goto success;
171     		}
172     #endif

** CID 487972:       Memory - corruptions  (OVERRUN)


_____________________________________________________________________________________________
*** CID 487972:         Memory - corruptions  (OVERRUN)
/plat/xilinx/versal_net/bl31_versal_net_setup.c: 167             in bl31_early_platform_setup2()
161     		xbl_ret = xbl_handover(&bl32_image_ep_info, &bl33_image_ep_info,
162     				       tfa_handoff_addr);
163     		if (xbl_ret == XBL_HANDOFF_SUCCESS) {
164     			goto success;
165     		}
166     #if DEBUG
>>>     CID 487972:         Memory - corruptions  (OVERRUN)
>>>     Overrunning buffer pointed to by "&boot_mode" of 1 4-byte elements by passing it to a function which accesses it at element index 5 (byte offset 23).
167     		get_boot_mode(&boot_mode);
168     		if ((xbl_ret != XBL_HANDOFF_SUCCESS) && (boot_mode == JTAG_MODE)) {
169     			bl31_set_default_config();
170     			goto success;
171     		}
172     #endif

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team