[coreboot] New Defects reported by Coverity Scan for coreboot

scan-admin at coverity.com scan-admin at coverity.com
Fri Oct 6 16:51:06 CEST 2017


Hi,

Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.

3 new defect(s) introduced to coreboot found with Coverity Scan.
4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)


** CID 1381621:  Code maintainability issues  (UNUSED_VALUE)
/src/soc/intel/common/block/smm/smitraphandler.c: 110 in smihandler_southbridge_monitor()


________________________________________________________________________________________________________
*** CID 1381621:  Code maintainability issues  (UNUSED_VALUE)
/src/soc/intel/common/block/smm/smitraphandler.c: 110 in smihandler_southbridge_monitor()
104     	/* IOTRAP(0) SMIC */
105     	if (IOTRAP(0)) {
106     		if (!(trap_cycle & (1 << 24))) { /* It's a write */
107     			printk(BIOS_DEBUG, "SMI1 command\n");
108     			/* Trapped write data */
109     			data = pcr_read32(PID_PSTH, PCR_PSTH_TRPD);
>>>     CID 1381621:  Code maintainability issues  (UNUSED_VALUE)
>>>     Assigning value from "data & mask" to "data" here, but that stored value is overwritten before it can be used.
110     			data &= mask;
111     		}
112     	}
113     
114     	printk(BIOS_DEBUG, "  trapped io address = 0x%x\n",
115     		trap_cycle & 0xfffc);

** CID 1379849:  Null pointer dereferences  (FORWARD_NULL)
/src/soc/intel/skylake/pmutil.c: 220 in soc_get_gpe_configs()


________________________________________________________________________________________________________
*** CID 1379849:  Null pointer dereferences  (FORWARD_NULL)
/src/soc/intel/skylake/pmutil.c: 220 in soc_get_gpe_configs()
214     
215     	/* Look up the device in devicetree */
216     	DEVTREE_CONST struct device *dev = dev_find_slot(0, PCH_DEVFN_PMC);
217     	if (!dev || !dev->chip_info) {
218     		printk(BIOS_ERR, "BUG! Could not find SOC devicetree config\n");
219     	}
>>>     CID 1379849:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "dev".
220     	config = dev->chip_info;
221     
222     	/* Assign to out variable */
223     	*dw0 = config->gpe0_dw0;
224     	*dw1 = config->gpe0_dw1;
225     	*dw2 = config->gpe0_dw2;

** CID 1379848:  Null pointer dereferences  (FORWARD_NULL)
/src/soc/intel/skylake/pmutil.c: 223 in soc_get_gpe_configs()


________________________________________________________________________________________________________
*** CID 1379848:  Null pointer dereferences  (FORWARD_NULL)
/src/soc/intel/skylake/pmutil.c: 223 in soc_get_gpe_configs()
217     	if (!dev || !dev->chip_info) {
218     		printk(BIOS_ERR, "BUG! Could not find SOC devicetree config\n");
219     	}
220     	config = dev->chip_info;
221     
222     	/* Assign to out variable */
>>>     CID 1379848:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "config".
223     	*dw0 = config->gpe0_dw0;
224     	*dw1 = config->gpe0_dw1;
225     	*dw2 = config->gpe0_dw2;
226     }
227     
228     int rtc_failure(void)


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5bfXyD-2F5LnyrkgxWM10z3CjIgn2JbYM0so0xOTNJvpud-2Fi2W-2F-2FXxD62gTxHrHUz9rL6PYe6PAVds-2BZ90pUboXW1GEq8-2FvzFT1oBg7fmjS7hu8x77cZundvhnqXNgj4y8izFoKVY5zPWJW1AqKo2CS5lCyracH55Ze9MeRdztwYnNkb7ctp7bIrc-2F-2FPH3cQuaIQ-3D

To manage Coverity Scan email notifications for "coreboot at coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4e-2BpBzwOa5gzBZa9dWpDbzfofODnVj1enK2UkK0-2BgCCqfkfgGF5ECMwHI0-2FVznrU953Dvw3Ddjop950pccFQ-2Br0qaXkQSgAjbZsF6g7Yem3Y-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5bfXyD-2F5LnyrkgxWM10z3CjlpDgPljymy-2FCp9Li-2FwuKSMyNWyxbbXSicd1GmQPcLiSGXvtAXoLykSbwfpQlixlMtkspaGQHmnNj4mpD2jbLAmEBJzs9bxaxa-2F8Zb-2BDCQxFIereB2AFNXMRmeX0eE-2FFyb2rtaN1P4n8i6UdMiT6AE6yUQHELSvxWtgkqUvtLqqs-3D




More information about the coreboot mailing list