<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22619">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">enable_imc_thermal_zone: fix out of bounds read<br><br>southbridge/amd/pi/hudson/imc.c procedure enable_imc_thermal_zone was<br>identified by coverity as having out of bounds access. Copies of the<br>procedure are present in southbridge/amd/agesa/hudson/imc.c and in<br>soc/amd/stoneyridge/imc.c. Fix the procedure in all 3 files.<br><br>Fixes coverity CID 1260807: Out-of-bounds read.<br><br>BUG=b:69835834<br>TEST=Build and platform boot to OS<br><br>Change-Id: Ic16edc607358b9a688151735e6fcb3393d3bce80<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/soc/amd/stoneyridge/imc.c<br>M src/southbridge/amd/agesa/hudson/imc.c<br>M src/southbridge/amd/pi/hudson/imc.c<br>3 files changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/22619/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/stoneyridge/imc.c b/src/soc/amd/stoneyridge/imc.c<br>index 4c505df..1586997 100644<br>--- a/src/soc/amd/stoneyridge/imc.c<br>+++ b/src/soc/amd/stoneyridge/imc.c<br>@@ -50,7 +50,7 @@<br> {<br>         AMD_CONFIG_PARAMS StdHeader;<br>  UINT8 FunNum;<br>-        UINT8 regs[9];<br>+       UINT8 regs[10];<br>       int i;<br> <br>     regs[0] = 0;<br>diff --git a/src/southbridge/amd/agesa/hudson/imc.c b/src/southbridge/amd/agesa/hudson/imc.c<br>index 799cc32..3a27d17 100644<br>--- a/src/southbridge/amd/agesa/hudson/imc.c<br>+++ b/src/southbridge/amd/agesa/hudson/imc.c<br>@@ -60,7 +60,7 @@<br> {<br>  AMD_CONFIG_PARAMS StdHeader;<br>  UINT8 FunNum;<br>-        UINT8 regs[9];<br>+       UINT8 regs[10];<br>       int i;<br> <br>     regs[0] = 0;<br>diff --git a/src/southbridge/amd/pi/hudson/imc.c b/src/southbridge/amd/pi/hudson/imc.c<br>index 53e97fb..6a40013 100644<br>--- a/src/southbridge/amd/pi/hudson/imc.c<br>+++ b/src/southbridge/amd/pi/hudson/imc.c<br>@@ -56,7 +56,7 @@<br> {<br>      AMD_CONFIG_PARAMS StdHeader;<br>  UINT8 FunNum;<br>-        UINT8 regs[9];<br>+       UINT8 regs[10];<br>       int i;<br> <br>     regs[0] = 0;<br></pre><p>To view, visit <a href="https://review.coreboot.org/22619">change 22619</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22619"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic16edc607358b9a688151735e6fcb3393d3bce80 </div>
<div style="display:none"> Gerrit-Change-Number: 22619 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>