Description of problem: The tpm_nvinfo, tpm_nvread, and tpm_nvwrite commands are not capable of using NVRAM areas because they always determine the size of the NVRAM area is zero. This bug is also present in Fedora 18. How reproducible: Run the tpm_nvdefine command to create an NVRAM area with nonzero size, then query it with tpm_nvinfo; notice the size returned is zero. Additional info: This is the patch blob that is in error: diff -urp tpm-tools-1.3.8.orig/lib/tpm_tspi.c tpm-tools-1.3.8/lib/tpm_tspi.c --- tpm-tools-1.3.8.orig/lib/tpm_tspi.c 2011-08-17 08:20:35.000000000 -0400 +++ tpm-tools-1.3.8/lib/tpm_tspi.c 2012-06-21 13:07:29.654445942 -0400 @@ -702,14 +702,14 @@ TSS_RESULT unloadNVDataPublic(UINT64 *offset, BYTE *blob, UINT32 blob_len, TPM_NV_DATA_PUBLIC *v) { UINT64 off = *offset; - TSS_RESULT result; - result = Trspi_UnloadBlob_NV_DATA_PUBLIC(&off, blob, NULL); + TSS_RESULT result = TSS_SUCCESS; +/* result = Trspi_UnloadBlob_NV_DATA_PUBLIC(&off, blob, NULL); if (result == TSS_SUCCESS) { if (off > blob_len) return TSS_E_BAD_PARAMETER; result = Trspi_UnloadBlob_NV_DATA_PUBLIC(offset, blob, v); } - tspiResult("Trspi_UnloadBlob_NV_DATA_PUBLIC", result); + tspiResult("Trspi_UnloadBlob_NV_DATA_PUBLIC", result); */ return result; } The structure being unpacked is defined in tss/tpm.h, and the Trspi_UnloadBlob_NV_DATA_PUBLIC is implemented in trousers-0.3.10/src/trspi/trousers.c so there should not be any reason to retain this code removal.
still an issue in f20. tpm is unusable with the package as is.
I dropped tpm-tools-1.3.7-build.patch in Fedora git. I am unable to get a successful Koji build due to a problem with the opencryptoki package.
I just stumbled upon this bug and it took 6h of my time :S $ tpm_nvinfo --version tpm_nvinfo version: 1.3.8 $ tpm_nvinfo NVRAM index : 0x00000004 (4) PCR read selection: PCR write selection: Permissions : 0x00000000 () bReadSTClear : FALSE bWriteSTClear : FALSE bWriteDefine : FALSE Size : 0 (0x0) NVRAM index : 0x00000006 (6) PCR read selection: PCR write selection: Permissions : 0x00000000 () bReadSTClear : FALSE bWriteSTClear : FALSE bWriteDefine : FALSE Size : 0 (0x0) NVRAM index : 0x00000005 (5) PCR read selection: PCR write selection: Permissions : 0x00000000 () bReadSTClear : FALSE bWriteSTClear : FALSE bWriteDefine : FALSE Size : 0 (0x0) I manually compiled tpm-tools from sourceforge (without any patches) and it's working as expected: $ ./tpm_nvinfo NVRAM index : 0x00000004 (4) PCR read selection: Localities : ALL PCR write selection: Localities : ALL Permissions : 0x00040004 (AUTHREAD|AUTHWRITE) bReadSTClear : FALSE bWriteSTClear : FALSE bWriteDefine : FALSE Size : 32 (0x20) NVRAM index : 0x00000006 (6) PCR read selection: Localities : ALL PCR write selection: Localities : ALL Permissions : 0x00040004 (AUTHREAD|AUTHWRITE) bReadSTClear : FALSE bWriteSTClear : FALSE bWriteDefine : FALSE Size : 32 (0x20) NVRAM index : 0x00000005 (5) PCR read selection: Localities : ALL PCR write selection: Localities : ALL Permissions : 0x00040004 (AUTHREAD|AUTHWRITE) bReadSTClear : FALSE bWriteSTClear : FALSE bWriteDefine : FALSE Size : 32 (0x20)
tpm-tools-1.3.8-6.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/tpm-tools-1.3.8-6.fc20
Package tpm-tools-1.3.8-6.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing tpm-tools-1.3.8-6.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-9079/tpm-tools-1.3.8-6.fc20 then log in and leave karma (feedback).
tpm-tools-1.3.8-6.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.