[coreboot] New Defects reported by Coverity Scan for coreboot
scan-admin at coverity.com
scan-admin at coverity.com
Fri Oct 19 16:31:57 CEST 2018
Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
2 new defect(s) introduced to coreboot found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1396275: (ARRAY_VS_SINGLETON)
/src/soc/mediatek/mt8183/emi.c: 252 in emi_init2()
/src/soc/mediatek/mt8183/emi.c: 253 in emi_init2()
________________________________________________________________________________________________________
*** CID 1396275: (ARRAY_VS_SINGLETON)
/src/soc/mediatek/mt8183/emi.c: 252 in emi_init2()
246 }
247
248 static void emi_init2(const struct sdram_params *params)
249 {
250 emi_esl_setting2();
251
>>> CID 1396275: (ARRAY_VS_SINGLETON)
>>> Using "&emi_mpu->mpu_ctrl_d0" as an array. This might corrupt or misinterpret adjacent memory locations.
252 setbits_le32(&emi_mpu->mpu_ctrl_d0 + 0x4 * 1, 0x1 << 4);
253 setbits_le32(&emi_mpu->mpu_ctrl_d0 + 0x4 * 7, 0x1 << 4);
254
255 write32(&emi_regs->bwct0, 0x0a000705);
256 write32(&emi_regs->bwct0_3rd, 0x0);
257
/src/soc/mediatek/mt8183/emi.c: 253 in emi_init2()
247
248 static void emi_init2(const struct sdram_params *params)
249 {
250 emi_esl_setting2();
251
252 setbits_le32(&emi_mpu->mpu_ctrl_d0 + 0x4 * 1, 0x1 << 4);
>>> CID 1396275: (ARRAY_VS_SINGLETON)
>>> Using "&emi_mpu->mpu_ctrl_d0" as an array. This might corrupt or misinterpret adjacent memory locations.
253 setbits_le32(&emi_mpu->mpu_ctrl_d0 + 0x4 * 7, 0x1 << 4);
254
255 write32(&emi_regs->bwct0, 0x0a000705);
256 write32(&emi_regs->bwct0_3rd, 0x0);
257
258 /* EMI QoS 0.5 */
** CID 1396274: Error handling issues (CHECKED_RETURN)
________________________________________________________________________________________________________
*** CID 1396274: Error handling issues (CHECKED_RETURN)
/src/drivers/tpm/tpm.c: 29 in init_tpm_dev()
23 #endif
24
25 static void init_tpm_dev(void *unused)
26 {
27 #if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
28 int s3resume = acpi_is_wakeup_s3();
>>> CID 1396274: Error handling issues (CHECKED_RETURN)
>>> Calling "tpm_setup(s3resume)" without checking return value. It wraps a library function that may fail and return an error code.
29 tpm_setup(s3resume);
30 #else
31 /* This can lead to PCR reset attacks but currently there
32 is no generic way to detect resume on other platforms. */
33 tpm_setup(false);
34 #endif
35 }
36
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5ashYE7FaGhaMfwnUrkaiqJsj4sFV-2BmIL1J16eiFovPv84E2cJV0CZuFQEpotVXMcEB-2BYdS5nG0-2FJQ-2FuUtpYV-2FQ2W00adcrhxQgNbMYz82wUyzvp6p8X5qk8riCoTGfS3tjGGX-2FkZI4e7O-2FHmznIBRqGgWDlEPcPrAoOFTn-2FPASaTbrK4boSrjBLSKpbwye28I-3D
More information about the coreboot
mailing list