Skip to contentSkip to conversation

BMC Secure Boot - dm-verity

DISCUSSION Adriana Kobylak 2 participants 3 messages Feb 7, 2020 – Feb 10, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

We're planning to use dm-verity to verify the rootfs on eMMC, as mentioned in this doc update[1], following what chromeOs[2]/android[3] have done.

The verity root hash value is needed to do the verification, which in chromeos appears to be compiled into the kernel, they don't have an initramfs. For OpenBMC, we're thinking of creating a new binding for the kernel device tree so that an initramfs can read the hash value and do the verification.

Any opinions or suggestions?

[1] https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/28443
[2] https://www.chromium.org/chromium-os/chromiumos-design-docs/verified-boot
[3] https://source.android.com/security/verifiedboot/dm-verity

#1 lore raw
Quoted 7 lines · Adriana Kobylak

The verity root hash value is needed to do the verification, which in chromeos appears to be compiled into the kernel, they don't have an initramfs.
For OpenBMC, we're thinking of creating a new binding for the kernel device tree so that an initramfs can read the hash value and do the verification.

Any opinions or suggestions?

u-boot has commands to manipulate a fdt. Does this weaken the security?

Can we put it into the initramfs itself? I don't know what is easier, rebuilding the kernel or the initramfs.

Signature · 1 line
Patrick Williams
#2 lore raw
Quoted 11 lines · Patrick Williams
Quoted 7 lines · Adriana Kobylak

The verity root hash value is needed to do the verification, which in chromeos appears to be compiled into the kernel, they don't have an initramfs.
For OpenBMC, we're thinking of creating a new binding for the kernel device tree so that an initramfs can read the hash value and do the verification.

Any opinions or suggestions?

u-boot has commands to manipulate a fdt. Does this weaken the security?

I'll have to check if the u-boot verification of the fit image would fail.

Quoted 2 lines

Can we put it into the initramfs itself? I don't know what is easier, rebuilding the kernel or the initramfs.

That's an option. We could have the hash values in one place alongside the additional information that the initramfs needs to call 'dmsetup' and create the devices.