<div dir="ltr"><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, May 1, 2017 at 7:22 PM, <a href="mailto:Taiidan@gmx.com">Taiidan@gmx.com</a> <span dir="ltr"><<a href="mailto:Taiidan@gmx.com" target="_blank">Taiidan@gmx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On 05/01/2017 06:44 PM, ron minnich wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Mon, May 1, 2017 at 1:17 PM Rene Shuster <<a href="mailto:rene.shuster@bcsemail.org" target="_blank">rene.shuster@bcsemail.org</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Yes Puri.sm has been debunked.<br>
<br>
</blockquote>
I disagree. I've seen the systems. From what I can see, Puri.sm has made a<br>
good faith effort to go as far possible *with modern x86 chipsets* toward<br>
getting rid of the blobs. They can't get to 100%, but they're trying to get<br>
as close as possible.<br>
<br>
ron<br>
</blockquote></div></div>
Name one thing that they have done themselves?<br>
<br>
<a href="https://www.reddit.com/r/linux/comments/3anjgm/on_the_librem_laptop_purism_doesnt_believe_in/" rel="noreferrer" target="_blank">https://www.reddit.com/r/linux<wbr>/comments/3anjgm/on_the_librem<wbr>_laptop_purism_doesnt_believe_<wbr>in/</a> (yeah its leah but shes right about the coreboot community being corrupted)<br>
<br>
Everything they "do" is someone elses code, and their "coreboot" has zero actual init code it is entirely blobbed.<br>
<br>
Their marketing is the only thing that is good.<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
-- <br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org" target="_blank">coreboot@coreboot.org</a><br>
<a href="https://mail.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">https://mail.coreboot.org/mail<wbr>man/listinfo/coreboot</a><br>
</div></div></blockquote></div><br></div><div class="gmail_extra">Without entering into a flamewar, you're asking "name one thing that they have done themselves" and I will answer that.<div>Full disclaimer: I am working for Purism, and I have been a paid contractor working since last December (part time initially, full time since March) on bringing coreboot and the ME-disablement effort to the Librem line of laptops (more precisely Librem 13 v1, and now working on the Librem 13 v2 hardware which is set to be released/shipped next month).</div><div><br></div><div>First, here's a timeline of the coreboot work explained here : <a href="https://puri.sm/coreboot/timeline/">https://puri.sm/coreboot/timeline/</a> </div><div>That timeline mentions for example that the original port was made by coreboot developers (which seems to be a huge scandal for some reason) after Purism donated 4 laptops for that work.<br></div><div>You can also read my blog posts on what exactly I have done (in great detail) in order to bring coreboot to the Librem (from the "I'm a total n00b" to the "I'm still a n00b but slightly less") : </div><div><a href="https://puri.sm/posts/diving-back-into-coreboot-development/">https://puri.sm/posts/diving-back-into-coreboot-development/</a><br></div><div><a href="https://puri.sm/posts/librem-13-coreboot-report-january-12-2017/">https://puri.sm/posts/librem-13-coreboot-report-january-12-2017/</a><br></div><div><a href="https://puri.sm/posts/librem-13-coreboot-report-february-3rd-2017/">https://puri.sm/posts/librem-13-coreboot-report-february-3rd-2017/</a><br></div><div><a href="https://puri.sm/posts/librem-13-coreboot-report-february-25th-2017/">https://puri.sm/posts/librem-13-coreboot-report-february-25th-2017/</a><br></div><div><a href="https://puri.sm/posts/preventing-interference-from-the-old-bios-while-flashing-coreboot/">https://puri.sm/posts/preventing-interference-from-the-old-bios-while-flashing-coreboot/</a><br></div><div>There's also a pretty big article about NVMe issues that I'm (currently) fixing, which is half-written and which I'd be happy to send you the link to once it's published.</div><div><br></div><div>Ron couldn't be more right when he says that you can't appreciate how much work it is to go from a "it works" to a "it's tested/verified and made into a *product* for actual users". It took me 6 months of work to finish the 4 days of work that Duncan Laurie did (I believe it took him 4 days to do the initial port, feel free to correct me if I'm mistaken, and yes of course, I am totally new to the coreboot world, so a lot/most of that time was spent on the learning curve).</div><div><br></div><div>You can also see my actual contributions to coreboot (and one unmerged to SeaBIOS) here : <a href="https://review.coreboot.org/#/q/owner:%22Alaoui%22">https://review.coreboot.org/#/q/owner:%22Alaoui%22</a></div><div>I have also contributed in the past couple of weeks to flashrom by reviewing and commenting in Nico Huber's branch which adds Skylake support to flashrom : <a href="https://review.coreboot.org/#/q/topic:intel_chipset_support">https://review.coreboot.org/#/q/topic:intel_chipset_support</a><br></div><div><br></div><div>Now that was the coreboot work that was done, here is the ME work that was done : </div><div>While the me_cleaner was tested and verified to work on the Librem (see here: <a href="https://puri.sm/posts/neutralizing-intel-management-engine-on-librem-laptops/">https://puri.sm/posts/neutralizing-intel-management-engine-on-librem-laptops/</a>), the actual work of me_cleaner was done by someone else, but the testing and verification was still done by us, I think that counts for something. Also note that an advantage of the librems here is that they come unfused which is what allows me_cleaner to work on them (see <a href="https://puri.sm/learn/intel-me/">https://puri.sm/learn/intel-me/</a>). Any laptop with the boot guard fuse enabled will shut down immediatly if the ME is cleaned with me_cleaner.<br></div><div><br></div><div>For actual ME-related work that wasn't done by someone else, I will point you to this file : <a href="https://github.com/kakaroto/purism-playground/blob/master/me_re/romp.c">https://github.com/kakaroto/purism-playground/blob/master/me_re/romp.c</a></div><div>That is a full C re-implementation of the ROMP module (the smallest of the two modules that me_cleaner does not remove). </div><div>This is the RAPI header it uses : <a href="https://github.com/kakaroto/purism-playground/blob/master/me_re/rapi.h">https://github.com/kakaroto/purism-playground/blob/master/me_re/rapi.h</a><br></div><div>That code is a C reimplementation with every instruction accounted for. It has not been compiled (it serves more as a proof of concept/pseudocode, although it should probably compile), and it's not meant to generate a binary-compatible file (that could be a long term goal to generate binary compatible images from C source with official intel-provided images).</div><div>Note that I have done the entire Assembly->C conversion myself, but I do want to give credit to Igor Skochinsky for his help (which saved me weeks/months of work) as he shared his notes of his ME reverse engineering efforts (memory layouts, RAPI structures and address->function_name mappings, etc..) </div><div>This ROMP work and details about that work are also part of the pending article that I mentioned earlier, so you'll get to read about it too if you ever decide to read about my adventures dealing with NVMe.</div><div><br></div><div>Now this is what I, personally, have done as a contractor working for Purism, since last December, and I'm not going to mention anything else done by anyone else on the team. After all, you only asked for someone to "name one thing".</div><div>I hope that answers your question Taiidan.</div><div><br></div><div>Now back to the ME exploit subject of this thread.</div><div>Something to take note of in that ROMP module (note that the binary is just under 1KB of code), it has a bug where it passes the 'partition size' directly as argument to the rom_lock_mem_range function, instead of passing (size << 2) as argument. This causes 3/4th of the memory region not to be locked (the partition size in the header is for some reason in 32-bits units) and the module hashes are contained within that unlocked 3/4th region, and this happens after the signature is verified. So yes, that *could* be a really nice exploit to give us unsigned code execution, if we were to modify some code and its corresponding hash in the unlocked memory after signatures are checked and before the code is executed. Unfortunately according to Igor, it can't be exploited, because this happens before the DRAM is initialized, so it probably only happens in the internal RAM of the ARC Core to which the main CPU doesn't have access anyways (maybe it can be exploited differently, if the copy-to-dram also copies the region-locking boundaries... remains to be seen when more is reversed/understood).</div><div><br></div><div>The really interesting part is that ROMP was one of the smallest modules with less than 1KB of code, I wasn't expecting to find a bug/exploit in it, but I just wanted to reverse it to get my feet wet, so to speak, since it wast the smallest of the two that me_cleaner keeps. But ROMP already has this bug, so what other bugs could we find in the 1.6MB of binaries that the ME holds (or worse, in the 10MB version of the ME). I'm not at all surprised that there was an exploit for all these years, the quality of their code is probably not very high, I'm just surprised that it wasn't released sooner.</div><div>After I'm done with my coreboot work (for the v2 hardware), I'll continue reverse engineering the ME, and maybe something nice will come out of it. Ultimately I hope we can get full unsigned code execution running, and full auditable C code equivalent of any binary code that gets executed between power-on and the exploit/custom code being executed.</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>