coreboot/src
Rizwan Qureshi 85ac56b331 UPSTREAM: soc/intel/skylake: fix memory access beyond array bounds
chip.h has a config array PcieRpClkReqNumber which corresponds
to a FSP UPD parameter, the size is currently set to 20.
However the size of PcieRpClkReqNumber UPD in FSP2.0 is 24,
so memcpy (config buffer to UPD buffer) in chip_fsp20.c will read
beyond the bounds of config array.
Hence set the size of PcieRpClkReqNumber array based on the FSP in use.

Found-by: Coverity Scan #1365385, #1365386

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/17292
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I937f68ef33f218cd7f9ba5cf3baaec162bca3fc8
Reviewed-on: https://chromium-review.googlesource.com/410084
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 18:31:36 -08:00
..
acpi
arch UPSTREAM: ACPI S3: Remove HIGH_MEMORY_SAVE where possible 2016-11-10 18:31:17 -08:00
commonlib UPSTREAM: commonlib: move DIV_ROUND macros from nvidia/tegra 2016-09-08 17:57:23 -07:00
console UPSTREAM: Revert "[WIP] console/Kconfig: Calculate COM port base addresses only on x86" 2016-10-18 22:15:27 -07:00
cpu UPSTREAM: amd/cpu: Add details to chip names 2016-11-10 18:31:34 -08:00
device UPSTREAM: Kconfig: Update default hex values to start with 0x 2016-10-04 00:32:40 -07:00
drivers UPSTREAM: google/pyro: Update WACOM touchscreen ACPI _HID 2016-11-10 18:31:08 -08:00
ec UPSTREAM: ec/acpi: Include ec.c unconditionally in romstage 2016-11-10 18:31:06 -08:00
include UPSTREAM: cpu/intel: Add MSR to support enabling turbo frequency 2016-11-10 18:31:24 -08:00
lib UPSTREAM: ACPI S3: Remove HIGH_MEMORY_SAVE where possible 2016-11-10 18:31:17 -08:00
mainboard UPSTREAM: mainboard/roda: Use C89 comments style & remove commented code 2016-11-10 18:31:29 -08:00
northbridge UPSTREAM: nb/amd/amdmct/mct: Remove commented code 2016-11-10 18:31:31 -08:00
soc UPSTREAM: soc/intel/skylake: fix memory access beyond array bounds 2016-11-10 18:31:36 -08:00
southbridge UPSTREAM: southbridge/intel: Set chipset in ifdtool invocations 2016-11-08 23:24:25 -08:00
superio UPSTREAM: winbond/w83627ehg: Remove unnecessary value 2016-10-19 14:06:51 -07:00
vboot UPSTREAM: vboot: Wrap line in comment longer than 80 characters 2016-11-08 23:24:18 -08:00
vendorcode UPSTREAM: vendorcode/google: add common smbios mainboard version support 2016-11-10 18:31:13 -08:00
Kconfig UPSTREAM: ACPI S3: Remove HIGH_MEMORY_SAVE where possible 2016-11-10 18:31:17 -08:00