Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/22619
Change subject: enable_imc_thermal_zone: fix out of bounds read ......................................................................
enable_imc_thermal_zone: fix out of bounds read
southbridge/amd/pi/hudson/imc.c procedure enable_imc_thermal_zone was identified by coverity as having out of bounds access. Copies of the procedure are present in southbridge/amd/agesa/hudson/imc.c and in soc/amd/stoneyridge/imc.c. Fix the procedure in all 3 files.
Fixes coverity CID 1260807: Out-of-bounds read.
BUG=b:69835834 TEST=Build and platform boot to OS
Change-Id: Ic16edc607358b9a688151735e6fcb3393d3bce80 Signed-off-by: Richard Spiegel richard.spiegel@silverbackltd.com --- M src/soc/amd/stoneyridge/imc.c M src/southbridge/amd/agesa/hudson/imc.c M src/southbridge/amd/pi/hudson/imc.c 3 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/22619/1
diff --git a/src/soc/amd/stoneyridge/imc.c b/src/soc/amd/stoneyridge/imc.c index 4c505df..1586997 100644 --- a/src/soc/amd/stoneyridge/imc.c +++ b/src/soc/amd/stoneyridge/imc.c @@ -50,7 +50,7 @@ { AMD_CONFIG_PARAMS StdHeader; UINT8 FunNum; - UINT8 regs[9]; + UINT8 regs[10]; int i;
regs[0] = 0; diff --git a/src/southbridge/amd/agesa/hudson/imc.c b/src/southbridge/amd/agesa/hudson/imc.c index 799cc32..3a27d17 100644 --- a/src/southbridge/amd/agesa/hudson/imc.c +++ b/src/southbridge/amd/agesa/hudson/imc.c @@ -60,7 +60,7 @@ { AMD_CONFIG_PARAMS StdHeader; UINT8 FunNum; - UINT8 regs[9]; + UINT8 regs[10]; int i;
regs[0] = 0; diff --git a/src/southbridge/amd/pi/hudson/imc.c b/src/southbridge/amd/pi/hudson/imc.c index 53e97fb..6a40013 100644 --- a/src/southbridge/amd/pi/hudson/imc.c +++ b/src/southbridge/amd/pi/hudson/imc.c @@ -56,7 +56,7 @@ { AMD_CONFIG_PARAMS StdHeader; UINT8 FunNum; - UINT8 regs[9]; + UINT8 regs[10]; int i;
regs[0] = 0;