Librem 14 firmware security

I’m not sure if this is the right place to discuss this. But since Librem 14 is supposed to be the most secure laptop, while I found that it may lack some common firmware security features, I think it may be worth mentioning these issues so that users know to mitigate these risks. And eventually, I hope the issues will get fixed or improved.

First I think Pureboot does a good job at detecting tampering against the operating system. But attacks against the firmware may render its protection useless. The following is based on my understanding of how things work. Please correct me if I am wrong.

  1. Unimplemented SPI write protection:
    Based on how EC and Pureboot are updated, it’s possible to modify the firmware from the operating system. As a result, malwares in operating system can infect the firmware. Measured boot can also be bypassed because the code for measured boot resides on SPI flash too.

  2. Some firmware security feature is not enabled
    For example, Early Boot DMA Protection is available from coreboot but is not enabled. There’s an option to enable this in Dasharo. I think it’s worth mentioning the users what features are enabled.

  3. Documents on security features and security tests:
    Without these documents, users are not aware of what is not protected and the risks. For example, based on 1), booting a malicious operating system bears the risk of infecting the firmware with malwares. It would be greate if Purism can also provide test results from security testing tools, for example Chipsec.

4 Likes

In short, Pureboot is as secure as the root account in the operating system. Once malware gains root access, it can get higher privilege and persistency by infecting the Pureboot firmware.

1 Like

Even malware with root privileges can’t infect the Pureboot firmware if you flip the BIOS and EC write protection switch on the motherboard.

Edit: apparently this switch doesn’t work, and needs to be implemented in the firmware? Ouch.

2 Likes

At the moment, PureBoot is used for tamper protection. It is assumed that you already have formulated a plan if there is a successful sophisticated attack against it.

Love this laptop, but Purism promised and implemented an EC/BIOS write protection switch explicitly to protect against this kind of attack. I don’t think it’s too much to ask that they follow through with making the switch work!

4 Likes

@jonathon.hall

What do you think about these points?

2 Likes

Does the scope of that tamper detection include the detection of tampering with the firmware?

1 Like

Yes, see these resources for further details:

Note that I assume your definition of firmware in this case refers to Coreboot + Heads, which is the two-step boot firmware.

1 Like

Looks like you do need a librem key for this though right?

1 Like

Yes, at least in PureBoot’s current implementation, as it indicates firmware tampering using either a green or red LED from the Librem Key. Alternatively, a six digit pin can also be displayed using TOTP, but PureBoot does not utilize it.

1 Like

Can Heads be used instead?

1 Like

PureBoot is based off Heads, with various changes made by Purism.

1 Like

@jonathon.hall

Some explanations from the Heads developer in a similar topic on the Qubes forum:

Further posts there are also worth reading.

My favorite quote:

1 Like

I read the entire quote, but do not see how it addresses the issues raised in this topic.

The developer is explaining weaknesses and advantages of Heads and addresses the comparison with proprietary Bootguad in this and following posts. I can’t say I understand it all but it seems relevant, although not necessarily directly replying to this topic.

1 Like

Hey all, sorry I am a bit behind on my forum mentions due to various competing priorities. (Full disclosure, due to being pressed for time today I have not read the full quote above recently, though I believe I read this previously, and have certainly discussed it with the Heads maintainer many times.)

I have discussed this issue with the Heads maintainer recently. We’re looking at using the flash R/W switch to write-protect the bootblock in coreboot, which performs the initial measurement of itself and romstage. This means that physical tampering would be required to tamper the bootblock, which of course requires physical countermeasures as always. Updating the firmware is still possible in this scheme (creates evidence of tampering, as desired). This doesn’t require moving the R/W switch since the bootblock will be preserved, so you can use good physical tampering countermeasures without having to redo them for every update.

coreboot already has some tooling to reuse an existing bootblock, so we would continue using the bootblock from the initial firmware release throughout the life of the product. But we need a fair amount of tooling to configure the R/O regions in the flash chip, apply updates correctly when the bootblock is read-only, etc.

This should all be solvable. It also should still be possible to update the bootblock if major changes occur in coreboot (unlikely, but still requires scoping) - such an update would require moving the switch back to writable.

Unlike Boot Guard, this would not require trusting a vendor key as your ultimate root of trust (or fusing your own key permanently into the SoC that can’t be rotated). It also doesn’t require the Intel ACM binary blobs.

2 Likes

The purism_next branch is the default branch, not the main branch. Here is the current configuration file for PureBoot on the Librem 14:

ENABLE_EARLY_DMA_PROTECTION is not referenced in the configuration file.

@jonathon.hall, is this Coreboot option and IOMMU supported by PureOS, and is PureBoot aware of the DMA protection?