在 Ubuntu 中设置 TPM2:tpm2-abrmd 错误 "insufficient buffer to get handle"

Setting up TPM2 in Ubuntu: tpm2-abrmd error "insufficient buffer to get handle"

我正在尝试在 Ubuntu 服务器 18.04 的新安装上使用 NUC7i5 上的 TPM2.0 模块设置加密驱动器。

我从源代码编译并安装了 tpm2-tss (1.3.0)、tpm2-abrmd (1.2.0) 和 tpm2-tools (3.0.2),并且我测试了一些 tpm2_* 实用程序,它们似乎上班。我还安装了 clevis v10.

我使用 tpm2_getrandom 32 -o secret.key 生成了一个秘密,然后尝试使用以下命令使用 TPM 加密该秘密:

cat secret.key | sudo clevis encrypt tpm2 '{"pcr_ids":"7","pcr_bank":"sha256"}' > secret.jwe

但是,当我这样做时,出现以下错误:

ERROR:
CreatePrimary Failed ! ErrorCode: 0x9a2

ERROR: Unable to run tpm2_createprimary
Creating TPM2 primary key failed!

检查 tpm2-abrmd 服务 (systemctl status tpm2-abrmd.service) 的状态时,我收到此错误:

tpm2-abrmd[1308]: tpm2_response_get_handle: insufficient buffer to get handle

我为 U 形夹加密尝试了不同的选项,尝试了不同的方式来生成秘密,但我仍然无法弄清楚问题是什么。

TPM 模块是 Infineon Technologies 的 SLB9665。

我尝试过使用和不使用 TPM 的所有权,并且每次都有一个清晰的 TPM。

有人 运行 解决过这个问题吗?

所以,显然问题是我不应该取得 TPM 的所有权。 重置 TPM 后,clevis 命令有效。