coreboot-kgpe-d16/src/soc/intel/broadwell
Jacob Garber bcdb893778 soc/intel/{broad,cannon,sky}: Fix possible out-of-bounds reads
There will be a possible out of bounds array access if
power_limit_1_time == ARRAY_SIZE(power_limit_time_sec_to_msr), so
prevent that in the index check. This issue was fixed for other cpus in
commit 5cfef13f8d (cpu/intel: Fix out-of-bounds read due to off-by-one
in condition). Based on the discussion for that commit, also remove the
magic constant 28 in favour of the index of the last array element.

Change-Id: Ic3f8735b23a368f8a9395757bd52c2c40088afa1
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1229673
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34498
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-07-30 09:56:02 +00:00
..
acpi cpu/intel/common: Use a common acpi/cpu.asl file 2018-11-30 22:02:35 +00:00
bootblock soc/intel/broadwell: Enable LPC/SIO setup in bootblock 2019-05-15 17:57:33 +00:00
include/soc soc/intel: Guard remaining SA_DEV_ROOT definition 2019-07-25 16:43:13 +00:00
romstage soc/intel: Use config_of() 2019-07-18 15:25:35 +00:00
acpi.c soc/intel: Use config_of_path(SA_DEVFN_ROOT) 2019-07-18 15:23:13 +00:00
adsp.c soc/intel: Use config_of() 2019-07-18 15:25:35 +00:00
chip.c {northbridge, soc, southbridge}/intel: Make use of pci_dev_set_subsystem() 2019-03-21 16:18:05 +00:00
chip.h src: Add missing include <stdint.h> 2018-11-01 11:25:07 +00:00
cpu.c soc/intel/{broad,cannon,sky}: Fix possible out-of-bounds reads 2019-07-30 09:56:02 +00:00
cpu_info.c src: Remove unneeded include <console/console.h> 2018-11-16 09:50:29 +00:00
ehci.c src: Use include <delay.h> when appropriate 2019-04-06 16:09:12 +00:00
elog.c soc/intel/broadwell: use common Intel ACPI hardware definitions 2016-07-15 08:32:49 +02:00
finalize.c soc/intel: Expand SA_DEV_ROOT for ramstage 2019-07-21 18:58:01 +00:00
gpio.c src: Use 'include <string.h>' when appropriate 2019-03-20 20:27:51 +00:00
hda.c src: Use include <delay.h> when appropriate 2019-04-06 16:09:12 +00:00
igd.c soc/intel: Use config_of() 2019-07-18 15:25:35 +00:00
iobp.c arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
Kconfig arch/x86: Flip HAVE_MONOTONIC_TIMER default 2019-07-09 13:36:18 +00:00
lpc.c soc/intel: Expand SA_DEV_ROOT for ramstage 2019-07-21 18:58:01 +00:00
Makefile.inc soc/{baytrail/braswell/broadwell}: fix flashconsole on platform 2019-05-22 10:06:50 +00:00
me.c soc/intel: Use config_of() 2019-07-18 15:25:35 +00:00
me_status.c arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
memmap.c soc/intel/broadwell: Fix case of SA_DEV_ROOT 2019-07-25 16:42:26 +00:00
minihd.c soc/intel/broadwell: Change variable back to u32 2019-07-22 20:36:56 +00:00
monotonic_timer.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
pch.c src: Use include <delay.h> when appropriate 2019-04-06 16:09:12 +00:00
pcie.c soc/intel: Use config_of() 2019-07-18 15:25:35 +00:00
pei_data.c soc/intel/broadwell: Fix use of CONFIG_USBDEBUG 2019-03-22 20:26:44 +00:00
pmutil.c device/pci: Fix PCI accessor headers 2019-03-01 20:32:15 +00:00
ramstage.c Klocwork: Fix the Null pointer derefernce found by klocwork 2019-04-23 09:56:37 +00:00
refcode.c src: Get rid of duplicated includes 2018-11-16 09:50:03 +00:00
sata.c soc/intel: Use config_of() 2019-07-18 15:25:35 +00:00
serialio.c soc/intel: Use config_of() 2019-07-18 15:25:35 +00:00
smbus.c soc/{amd,intel}: Remove needless '&' on function pointers 2019-01-23 14:42:59 +00:00
smbus_common.c soc: Remove useless include <device/pci_ids.h> 2018-12-19 05:20:49 +00:00
smi.c src: Use 'include <string.h>' when appropriate 2019-03-20 20:27:51 +00:00
smihandler.c coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
smmrelocate.c soc/intel: Expand SA_DEV_ROOT for ramstage 2019-07-21 18:58:01 +00:00
spi.c src: Use 'include <string.h>' when appropriate 2019-03-20 20:27:51 +00:00
stage_cache.c src/soc: Capitalize CPU, ACPI, RAM and ROM 2016-07-31 19:27:53 +02:00
systemagent.c soc/intel: Expand SA_DEV_ROOT for ramstage 2019-07-21 18:58:01 +00:00
tsc_freq.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
usb_debug.c arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
xhci.c device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00