[tpm2] Re: "tpm2_import" Integrity Check issue on a Big Endian 32 Bit Platform

Roberts, William C <william.c.roberts at intel.com>
Newsgroups dev.linux.lists.tpm2
Message-ID <SN6PR11MB3437D87EA504B82549DAB241B86A9@SN6PR11MB3437.namprd11.prod.outlook.com>
So these are different?
tpm2-tools 5.2
tpm2-tools 5.2 2021-09-28

I'm confused because tpm2-tools 5.2 release was conducted on 2021-09-28. It would be better to reference the tag or sha hash over the date.

The best way to get the version is from the tool itself. It's built into the binary using the source control version during the build.

tpm2 --version
tool="tpm2" version="5.2" tctis="libtss2-tctildr" tcti-default=tcti-abrmd

Could you provide us with the output of this for the "5.2 2021-09-28" version?

As Andreas showed, you could then bisect between those two while we try to reproduce. If you could point us to the bad patch, that would
help speed this up.

Thanks again!

________________________________
From: Rajkumar K Sivasamy <rajkumar.k.sivasamy(a)gmail.com>
Sent: Thursday, December 2, 2021 11:02 PM
To: Roberts, William C <william.c.roberts(a)intel.com>
Cc: tpm2(a)lists.01.org <tpm2(a)lists.01.org>; Desai, Imran <imran.desai(a)intel.com>
Subject: Re: [tpm2] "tpm2_import" Integrity Check issue on a Big Endian 32 Bit Platform

-   tpm2-tss 3.1.0 and Tpm2-tools 5.2 2021-09-2 8==> tpm2_import fails with error 0x3DF
-   tpm2-tss 3.0.4 and Tpm2-tools 5.2 2021-09-28 ==> tpm2_import fails with error 0x3DF
-   tpm2-tss 3.0.4 and Tpm2-tools 5.2 ==> tpm2_import succeeds

Why are you putting dates on some of the tpm2-tools versions but not tpm2-tss?
[Raj] TPM2 Tools Master has this date code "2021-09-28" at "https://github.com/tpm2-software/tpm2-tools" for the version, hence I have used it to indicate the source code version of tpm2-tools which I downloaded from https://github.com/tpm2-software/tpm2-tools

tpm2-tools 5.2 source was downloaded from link: https://github.com/tpm2-software/tpm2-tools/releases/download/5.2/tpm2-tools-5.2.tar.gz
tpm2-tss 3.1.0 was downloaded from https://github.com/tpm2-software/tpm2-tss
tpm2-tss 3.0.4 was downloaded from https://github.com/tpm2-software/tpm2-tss/releases/download/3.0.4/tpm2-tss-3.0.4.tar.gz

Let me know if you would need any further information.

Regards
Raj

On Fri, Dec 3, 2021 at 3:55 AM Roberts, William C <william.c.roberts(a)intel.com<mailto:william.c.roberts(a)intel.com>> wrote:
> From: Rajkumar K Sivasamy <rajkumar.k.sivasamy(a)gmail.com<mailto:rajkumar.k.sivasamy(a)gmail.com>>
> Sent: Thursday, December 2, 2021 2:41 PM
> To: Roberts, William C <william.c.roberts(a)intel.com<mailto:william.c.roberts(a)intel.com>>
> Cc: tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org> <tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>>; Desai, Imran <imran.desai(a)intel.com<mailto:imran.desai(a)intel.com>>
> Subject: Re: [tpm2] "tpm2_import" Integrity Check issue on a Big Endian 32 Bit Platform

> Hello William

> I am using below versions:
> tpm2-tss 3.1.0
> tpm2-tools 5.2 2021-09-28

> To further narrow down, I replaced tpm2-tss 3.1.0 with tpm2-tss 3.0.4 and tpm2_import still failed with 0x3DF.

> Now along with tpm2-tss- 3.0.4 I used tpm2-tools 5.2 and tpm2_import succeeds; seems to be a problem with tpm2-tools t.2 2021-09-28.

I'm confused. I read both these lines as I used tpm2-tss 3.0.4 and tpm2-tools 5.2 and it succeeds and fails. Why are you putting dates on some of
the tpm2-tools versions but not tpm2-tss?


> Regards
> Raj

>  On Thu, Dec 2, 2021 at 8:44 PM Roberts, William C <william.c.roberts(a)intel.com<mailto:william.c.roberts(a)intel.com>> wrote:
> + Imran

> What version of tools and tss are you running?

> I just noticed that the tools CI doesn't have the multi-arch images enabled. Let me investigate adding this and see if I can reproduce.

> From: Rajkumar K Sivasamy <rajkumar.k.sivasamy(a)gmail.com<mailto:rajkumar.k.sivasamy(a)gmail.com>>
> Sent: Wednesday, December 1, 2021 11:40 PM
> To: tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org> <tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>>
> Subject: [tpm2] "tpm2_import" Integrity Check issue on a Big Endian 32 Bit Platform

> Hello Team

> I am trying to use tpm2_import on a Big Endian 32 Bit platform and running into following error:

> --------------------------------------------------------------------------------------------------------------------------------

> Command:
> openssl genrsa -out private.pem 2048
> tpm2_import -C 0x81000001 -G rsa -i private.pem -u key.pub -r key.priv

> Error:
> ERROR:esys:src/tss2-esys/api/Esys_Import.c:110:Esys_Import() Esys Finish ErrorCode (0x000003df)
> ERROR: Esys_HMAC(0x3DF) - tpm:parameter(3):integrity check failed
> ERROR: Unable to run tpm2_import
> --------------------------------------------------------------------------------------------------------------------------------

> Need pointers to debug this issue.
> Have any of you come across this error with tpm2_import on Big Endian 32 Bit Platform? Do we have a fix Or can you provide inputs on the source where I can look > at for further debugging?

> Thanks
> Raj
attachment.htm (text/html, 9.8 KB)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So these are different?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
tpm2-tools 5.2</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
tpm2-tools 5.2 2021-09-28</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm confused because tpm2-tools 5.2 release was conducted on 2021-09-28. It would be better to reference the tag or sha hash over the date.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The best way to get the version is from the tool itself. It's built into the binary using the source control version during the build.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">tpm2 --version</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
tool=&quot;tpm2&quot; version=&quot;5.2&quot; tctis=&quot;libtss2-tctildr&quot; tcti-default=tcti-abrmd<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Could you provide us with the output of this for the &quot;<span style="background-color:rgb(255, 255, 255);display:inline !important">5.2 2021-09-28&quot; version?</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important">As Andreas showed, you could then bisect between those two while we try to reproduce. If you could point us to the bad patch, that would</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important">help speed this up.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important">Thanks again!</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Rajkumar K Sivasamy &lt;[email protected]&gt;<br>
<b>Sent:</b> Thursday, December 2, 2021 11:02 PM<br>
<b>To:</b> Roberts, William C &lt;[email protected]&gt;<br>
<b>Cc:</b> [email protected] &lt;[email protected]&gt;; Desai, Imran &lt;[email protected]&gt;<br>
<b>Subject:</b> Re: [tpm2] &quot;tpm2_import&quot; Integrity Check issue on a Big Endian 32 Bit Platform</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">
<div>- &nbsp; <span style="font-size:11pt; font-family:&quot;Calibri&quot;,sans-serif">tpm2-tss 3.1.0</span> and
<span style="font-size:11pt; font-family:&quot;Calibri&quot;,sans-serif">Tpm2-tools 5.2 2021-09-2 8</span>==&gt; tpm2_import fails with error 0x3DF<br>
</div>
<div>- &nbsp; tpm2-tss <span style="font-size:11pt; font-family:&quot;Calibri&quot;,sans-serif">
3.0.4</span> and <span style="font-size:11pt; font-family:&quot;Calibri&quot;,sans-serif">Tpm2-tools 5.2 2021-09-28
</span>==&gt; tpm2_import fails with error 0x3DF </div>
<div>- &nbsp; tpm2-tss <span style="font-size:11pt; font-family:&quot;Calibri&quot;,sans-serif">
3.0.4</span> and <span style="font-size:11pt; font-family:&quot;Calibri&quot;,sans-serif">Tpm2-tools 5.2
</span>==&gt; tpm2_import succeeds</div>
<div><br>
</div>
<div>Why are you putting dates on some of the tpm2-tools versions but not tpm2-tss?<span class="x_gmail-im x_gmail-HOEnZb"><br>
</span></div>
<div>[Raj] TPM2 Tools Master has this date code &quot;2021-09-28&quot; at &quot;<a href="https://github.com/tpm2-software/tpm2-tools">https://github.com/tpm2-software/tpm2-tools</a>&quot; for the version, hence I have used it to indicate the source code version of tpm2-tools which
 I downloaded from <a href="https://github.com/tpm2-software/tpm2-tools">https://github.com/tpm2-software/tpm2-tools</a></div>
<div><br>
</div>
<div>tpm2-tools 5.2 source was downloaded from link: <a href="https://github.com/tpm2-software/tpm2-tools/releases/download/5.2/tpm2-tools-5.2.tar.gz">
https://github.com/tpm2-software/tpm2-tools/releases/download/5.2/tpm2-tools-5.2.tar.gz</a></div>
<div>tpm2-tss 3.1.0 was downloaded from <a href="https://github.com/tpm2-software/tpm2-tss">
https://github.com/tpm2-software/tpm2-tss</a></div>
<div>tpm2-tss 3.0.4 was downloaded from <a href="https://github.com/tpm2-software/tpm2-tss/releases/download/3.0.4/tpm2-tss-3.0.4.tar.gz">
https://github.com/tpm2-software/tpm2-tss/releases/download/3.0.4/tpm2-tss-3.0.4.tar.gz</a></div>
<div><br>
</div>
<div>Let me know if you would need any further information.</div>
<div><br>
</div>
<div>Regards<br>
</div>
<div>Raj<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Fri, Dec 3, 2021 at 3:55 AM Roberts, William C &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
&gt; From: Rajkumar K Sivasamy &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<br>
&gt; Sent: Thursday, December 2, 2021 2:41 PM<br>
&gt; To: Roberts, William C &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<br>
&gt; Cc: <a href="mailto:[email protected]" target="_blank">[email protected]</a> &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;; Desai, Imran &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<br>
&gt; Subject: Re: [tpm2] &quot;tpm2_import&quot; Integrity Check issue on a Big Endian 32 Bit Platform
<br>
&nbsp;<br>
&gt; Hello William<br>
<br>
&gt; I am using below versions:<br>
&gt; tpm2-tss 3.1.0<br>
&gt; tpm2-tools 5.2 2021-09-28<br>
<br>
&gt; To further narrow down, I replaced tpm2-tss 3.1.0 with tpm2-tss 3.0.4 and tpm2_import still failed with 0x3DF.<br>
<br>
&gt; Now along with tpm2-tss- 3.0.4 I used tpm2-tools 5.2 and tpm2_import succeeds; seems to be a problem with tpm2-tools t.2 2021-09-28.<br>
<br>
I'm confused. I read both these lines as I used tpm2-tss 3.0.4 and tpm2-tools 5.2 and it succeeds and fails. Why are you putting dates on some of<br>
the tpm2-tools versions but not tpm2-tss?<br>
<br>
<br>
&gt; Regards<br>
&gt; Raj<br>
<br>
&gt;&nbsp; On Thu, Dec 2, 2021 at 8:44 PM Roberts, William C &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt; wrote:<br>
&gt; + Imran<br>
<br>
&gt; What version of tools and tss are you running?<br>
<br>
&gt; I just noticed that the tools CI doesn't have the multi-arch images enabled. Let me investigate adding this and see if I can reproduce.<br>
<br>
&gt; From: Rajkumar K Sivasamy &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<br>
&gt; Sent: Wednesday, December 1, 2021 11:40 PM<br>
&gt; To: <a href="mailto:[email protected]" target="_blank">[email protected]</a> &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<br>
&gt; Subject: [tpm2] &quot;tpm2_import&quot; Integrity Check issue on a Big Endian 32 Bit Platform
<br>
&nbsp;&nbsp;<br>
&gt; Hello Team<br>
<br>
&gt; I am trying to use tpm2_import on a Big Endian 32 Bit platform and running into following error:<br>
<br>
&gt; --------------------------------------------------------------------------------------------------------------------------------<br>
<br>
&gt; Command: <br>
&gt; openssl genrsa -out private.pem 2048<br>
&gt; tpm2_import -C 0x81000001 -G rsa -i private.pem -u key.pub -r key.priv<br>
<br>
&gt; Error:<br>
&gt; ERROR:esys:src/tss2-esys/api/Esys_Import.c:110:Esys_Import() Esys Finish ErrorCode (0x000003df)<br>
&gt; ERROR: Esys_HMAC(0x3DF) - tpm:parameter(3):integrity check failed<br>
&gt; ERROR: Unable to run tpm2_import<br>
&gt; --------------------------------------------------------------------------------------------------------------------------------
<br>
<br>
&gt; Need pointers to debug this issue.<br>
&gt; Have any of you come across this error with tpm2_import on Big Endian 32 Bit Platform? Do we have a fix Or can you provide inputs on the source where I can look &gt; at for further debugging?<br>
<br>
&gt; Thanks<br>
&gt; Raj</blockquote>
</div>
</div>
</body>
</html>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.