Closed mlazarou-git closed 1 year ago
Hello @mlazarou-git,
STM32MP15XX-DK2 boards do not integrate an eMMC device hence no RPMB partition. With this config, the RPMB is likely emulated in userland tee-supplicant RAM (RPMB_EMU=y
or BR2_PACKAGE_OPTEE_CLIENT_EXT_RPMB_EMU=y
). With this config, RPMB is not persistent and you need to set CFG_RPMB_WRITE_KEY=y
and use any key you want.
To use fTPM measurements only from linux (no measument before tee-supplicant is started), we you should use the REE_FS (CFG_REE_FS=y CFG_RPMB_FS=n
) but without effective rollback protection.
For effective roolback protection thanks to RPMB (including measurements before Linux boots), you need an stm32mp15XX-EV1 board, they integrate an eMMC device when you can set CFG_RPMB_FS=y
in optee_os and RPMB_EMU=n
in optee_client.
When enabling RPMB, tee-supplicant needs specific privileges (blk group, etc...) worked around when run as root, but that part higly depends on the distro your using.
I'll test again fTPM with the prepared 3.20.0-rc1 and give you some feedback.
(edited)
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.
@etienne-lms thank you for your useful information, i tested the firmware TPM with the Evaluation board and it seems to work as expected. I will continue my implementation and check if the IMA measurements can be extended into PCRs early on boot to later perform remote attestation requests.
Hello, I am trying Microsoft's fTPM TA in OPTEE and Firmware TPM Driver as part of my thesis implementation for remote attestation mechanism in embedded devices. The main idea is to extend IMA measurements digest in PCRs and with the help of the tpm2 tools demostrate an Remote Attestation procedure. Currently, i am using STM32MP157C-DK2 board, initially flashed with its starter package (TF-A, OPTEE, U-Boot, OpenSTLinux), then:
I tried manually (before the initramfs modification) to enable tee-supplicant and modprobe fTPM kernel driver and as expected /dev/tpmX devices appeared and tpm-tools were working. My next assumption is to have a functional fTPM early on boot for IMA module to take advantage or even for a measured boot procedure leveraging PCRs and Event log.
My current implementation is fTPM as Early TA and tee-supplicant starts by the initramfs like how it is mentioned in #5347:
The fTPM now seems trying to start as soon as the tee-supplicant is ready by initramfs
Problem 1: fTPM seems to start making some secure storage object and then stops in 3 of 5 blocks, tee-supplicant stops and the boot continues.
Problem 2: When boot is done fTPM kernel module seems to be enabled and used but there is no /dev/tpmX device so tpm-tools can't be used.
Problem 3: After tee-supplicant has been started and stopped by initramfs, tee-supplicant service (or daemon) can't be started again throwing errors.
Also some more things that maybe be useful:
Since the dracut modification with tee-supplicant.service some issues that i haven't solve yet happened.
Any feedback for the problems, the git issue or my implementation approach would be really appreciated. Thank you in advance.