<p>Nicola Corna has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26601">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sb/intel/{bd82x6x,ibexpeak}: Fix out of bounds access in intel_me_status()<br><br>On Ibex Peak (and maybe also on other platforms), when the AltMeDisable<br>bit is set (-S or -s option of me_cleaner), the ME PCI device disappears<br>from the bus and its configuration space is all ones.<br><br>This causes a freeze in intel_me_status(), as coreboot tries to access<br>an out of bounds array element.<br><br>Change-Id: I957abebe1db15ec2c9a2b439f0103106bfa56b33<br>Signed-off-by: Nicola Corna <nicola@corna.info><br>---<br>M src/southbridge/intel/bd82x6x/me_status.c<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/26601/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/southbridge/intel/bd82x6x/me_status.c b/src/southbridge/intel/bd82x6x/me_status.c</span><br><span>index b202376..4b353c8 100644</span><br><span>--- a/src/southbridge/intel/bd82x6x/me_status.c</span><br><span>+++ b/src/southbridge/intel/bd82x6x/me_status.c</span><br><span>@@ -142,6 +142,15 @@</span><br><span> void intel_me_status(struct me_hfs *hfs, struct me_gmes *gmes)</span><br><span> {</span><br><span> #if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG)</span><br><span style="color: hsl(120, 100%, 40%);">+     /* On Ibex Peak (and maybe also on other platforms), when Intel ME is</span><br><span style="color: hsl(120, 100%, 40%);">+  * disabled by the AltMeDisable bit, the corresponding PCI device disappears</span><br><span style="color: hsl(120, 100%, 40%);">+   * from the bus and its configuration space is all ones.</span><br><span style="color: hsl(120, 100%, 40%);">+       */</span><br><span style="color: hsl(120, 100%, 40%);">+   if (*((u32 *)hfs) == 0xffffffff || *((u32 *)gmes) == 0xffffffff) {</span><br><span style="color: hsl(120, 100%, 40%);">+            printk(BIOS_DEBUG, "Missing Intel ME PCI device.\n");</span><br><span style="color: hsl(120, 100%, 40%);">+               return;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* Check Current States */</span><br><span>   printk(BIOS_DEBUG, "ME: FW Partition Table      : %s\n",</span><br><span>          hfs->fpt_bad ? "BAD" : "OK");</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26601">change 26601</a>. To unsubscribe, or for help writing mail filters, 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/26601"/><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: I957abebe1db15ec2c9a2b439f0103106bfa56b33 </div>
<div style="display:none"> Gerrit-Change-Number: 26601 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nicola Corna <nicola@corna.info> </div>