RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1654985 - [RHEL7.6]Some garbled codes are shown on terminal when execute tpm_version
Summary: [RHEL7.6]Some garbled codes are shown on terminal when execute tpm_version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tpm-tools
Version: 7.7
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 7.7
Assignee: Jerry Snitselaar
QA Contact: Vilém Maršík
URL:
Whiteboard:
Depends On:
Blocks: 1586275 1602778 1656539 1669892 1707454
TreeView+ depends on / blocked
 
Reported: 2018-11-30 09:31 UTC by dhsia
Modified: 2019-08-06 12:48 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1669892 (view as bug list)
Environment:
Last Closed: 2019-08-06 12:48:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screen for HTTP boot (4.80 MB, image/jpeg)
2018-11-30 09:31 UTC, dhsia
no flags Details
tpm_version output to file (3.55 MB, image/jpeg)
2018-12-03 02:55 UTC, dhsia
no flags Details
sosreport (8.71 MB, application/x-xz)
2018-12-03 02:56 UTC, dhsia
no flags Details
Screen for RHEL8 (1.88 MB, image/jpeg)
2018-12-06 16:22 UTC, dhsia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2109 0 None None None 2019-08-06 12:48:14 UTC

Description dhsia 2018-11-30 09:31:39 UTC
Created attachment 1510090 [details]
Screen for HTTP boot

Description of problem:
When we run tpm_version to show the tpm information, there are some gerbled code show on the screen.

Version-Release number of selected component (if applicable):
1.3.9-2

How reproducible:
Run the command tpm_version

Steps to Reproduce:
1.Install tpm 1.2 releated service and package. 
2.Run command "tpm_version" 
3.

Actual results:
The result in the attachment file

Expected results:

  TPM 1.2 Version Info:
  Chip Version:        1.2.5.81
  Spec Level:          2
  Errata Revision:     3
  TPM Vendor ID:       WEC 
  Vendor Specific data: 0201
  TPM Version:         01010000
  Manufacturer Info:   57454300

Additional info:
This issue does not see on THEL7.3 tpm-tools 1.3.8

Comment 2 dhsia 2018-11-30 09:36:36 UTC
This is no TPM encrypt function impact. This is display issue.

Comment 3 Joseph Kachuck 2018-11-30 18:40:15 UTC
Hello,
Please attach a sosreport from a system directly after seeing this issue.

Also I am not seeing any garbled in the screenshot. Please attach a screenshot that shows this issue.


Thank You
Joe Kachuck

Comment 4 dhsia 2018-12-03 02:55:31 UTC
Created attachment 1510781 [details]
tpm_version output  to file

Hi Joseph
I apologias the wrong description in the last attachment file. 

The garbled code might not so easy to see. I marked red rectangle. 
The code is before "TPM 1.2 Version info". Something like "Xh w ".

Comment 5 dhsia 2018-12-03 02:56:33 UTC
Created attachment 1510782 [details]
sosreport

Comment 6 Joseph Kachuck 2018-12-03 16:08:38 UTC
Hello Lenovo,
I have lowered this to a medium low BZ as I do see it as a bug. I am not sure what kind of issues this would cause. If see this different. Please provide a justification on how this would cause an issue in the field.

Thank You
Joe Kachuck

Comment 7 dhsia 2018-12-06 16:22:34 UTC
Created attachment 1512193 [details]
Screen for RHEL8

Comment 8 dhsia 2018-12-06 17:55:16 UTC
Hi Joseph, 
This seems some stderr from tpm_version. 
"tpm_version 2>/dev/null" and "tpm_version -l debug 2>/dev/null" can workaround this issue. The garbled code is gone.  

And I upload the result in RHEL8 snapshot1 
It is print out something like "127.0.0.1 localhost". 

I looked into the source 1.3.9 from TrouSerS  
The command tried to capture data written to stderr and redirect stderr to tempfile then restore output to stderr. Then it reads data from the temporary file again and prints it to the original stderr. 
The result is that Some undefined data was printed to stderr 

Please help to investigation.

Many Thanks.

Comment 9 dhsia 2018-12-06 18:08:25 UTC
(In reply to dhsia from comment #8)
> Hi Joseph, 
> This seems some stderr from tpm_version. 
> "tpm_version 2>/dev/null" and "tpm_version -l debug 2>/dev/null" can
> workaround this issue. The garbled code is gone.  
> 
> And I upload the result in RHEL8 snapshot1 
> It is print out something like "127.0.0.1 localhost". 
> 
> I looked into the source 1.3.9 from TrouSerS  
> The command tried to capture data written to stderr and redirect stderr to
> tempfile then restore output to stderr. Then it reads data from the
> temporary file again and prints it to the original stderr. 
> The result is that Some undefined data was printed to stderr 
> 
> Please help to investigation.
> 
> Many Thanks.

This stderr code added from 1.3.9 and does not in 1.3.8 which was used in RHEL7.6.

Comment 10 dhsia 2018-12-06 18:15:42 UTC
(In reply to dhsia from comment #9)
> (In reply to dhsia from comment #8)
> > Hi Joseph, 
> > This seems some stderr from tpm_version. 
> > "tpm_version 2>/dev/null" and "tpm_version -l debug 2>/dev/null" can
> > workaround this issue. The garbled code is gone.  
> > 
> > And I upload the result in RHEL8 snapshot1 
> > It is print out something like "127.0.0.1 localhost". 
> > 
> > I looked into the source 1.3.9 from TrouSerS  
> > The command tried to capture data written to stderr and redirect stderr to
> > tempfile then restore output to stderr. Then it reads data from the
> > temporary file again and prints it to the original stderr. 
> > The result is that Some undefined data was printed to stderr 
> > 
> > Please help to investigation.
> > 
> > Many Thanks.
> 
> This stderr code added from 1.3.9 and does not in 1.3.8 which was used in
> RHEL7.6.

Sorry for typo 1.3 8 was used in RHEL 7.3

Comment 11 Joseph Kachuck 2019-01-16 14:50:11 UTC
Hello Lenovo,
I am confused on this issue. 

Is this a RHEL 7 or RHEL 8 bug?

If RHEL 7. Does this issue effect RHEL 7.6? Comment 10 states RHEL 7.3. 

What is "tpm_version"? What is this included with?

Does this issue effect a std out?

Did this work differently in any RHEL 7 release if so which one?

How would a client see this issue in the field?

Thank You
Joe Kachuck

Comment 12 Jerry Snitselaar 2019-01-16 18:25:22 UTC
A separate bz should be opened for rhel8. Is this adversely impacting Lenovo? If not, I'd say it can go into rhel8.1. I have a fix prepared for rhel7.7.

Comment 13 Jerry Snitselaar 2019-01-16 18:27:23 UTC
Joe, tpm_version is a part of the tpm-tools package which contains commands for using tpm1.2 devices.

Comment 14 Joseph Kachuck 2019-01-16 18:44:04 UTC
Hello,
If this issue is needed for RHEL 8. It is most likely to late for RHEL 8.0. It would need to be requested for RHEL 8.1, or RHEL 8.0 AppStream.

Lenovo if this is need for RHEL 8. Please open a new Bugzilla to request this fixed in RHEL 8.

Thank You
Joe Kachuck

Comment 15 dhsia 2019-01-21 05:10:57 UTC
Hi Joseph, 
The root cause is found and no functional impact. if it is late for RHEL8.0. I agree to fixed it on RHEL8.1. 
(In reply to Joseph Kachuck from comment #11)
> Hello Lenovo,
> I am confused on this issue. 
> 
> Is this a RHEL 7 or RHEL 8 bug?
> 
> If RHEL 7. Does this issue effect RHEL 7.6? Comment 10 states RHEL 7.3. 
> 
> What is "tpm_version"? What is this included with?
> 
> Does this issue effect a std out?
> 
> Did this work differently in any RHEL 7 release if so which one?
> 
> How would a client see this issue in the field?
> 
> Thank You
> Joe Kachuck

Hi Joe
Please check the screen for RHEL7 and RHEL8. In the RHEL7 screen shot, There are several garbled codes before "TPM 1.2 Version Info:" on the screen. 
And There is a "127.0.0.1" and "localhost" before the "TPM 1.2 Version Info:"
This issue affect RHEL7.4-7.6, all implement tpm_tools version after 1.3.9.  RHEL7.3 is normal with tpm_tools 1.3.8.

Comment 16 dhsia 2019-01-21 09:20:48 UTC
(In reply to Jerry Snitselaar from comment #12)
> A separate bz should be opened for rhel8. Is this adversely impacting
> Lenovo? If not, I'd say it can go into rhel8.1. I have a fix prepared for
> rhel7.7.

Hi Jerry, 
I think this issue is no functional impact. It just stderr handling issue   if it is late for RHEL8.0. I agree to fixed it on RHEL8.1.

Comment 17 Vilém Maršík 2019-01-24 15:40:41 UTC
Lenovo, are you going to do OtherQA testin on your HW? I am not sure if we can reproduce this on our local HW.

Comment 18 dhsia 2019-01-25 02:48:54 UTC
(In reply to Vilém Maršík from comment #17)
> Lenovo, are you going to do OtherQA testin on your HW? I am not sure if we
> can reproduce this on our local HW.

Sure, 
I can verify, please provide download site for new code.
Thanks

Comment 19 dhsia 2019-01-25 03:27:51 UTC
So, the target is RHEL7.7 and RHEL 8.1, right?

Comment 20 Vilém Maršík 2019-01-25 10:29:25 UTC
Thanks.
Setting OtherQA

(In reply to dhsia from comment #18)
> Sure, 
> I can verify, please provide download site for new code.
> Thanks

Comment 21 Jerry Snitselaar 2019-01-27 18:06:28 UTC
Yes I will be fixing in RHEL7.7 with this bz, and I cloned a bz, 1669892, to track it for RHEL8.1.

Comment 22 Jerry Snitselaar 2019-01-27 18:28:11 UTC
[root@dell-per515-01 ~]# tpm_version
�wd�  TPM 1.2 Version Info:
  Chip Version:        1.2.8.8
  Spec Level:          2
  Errata Revision:     2
  TPM Vendor ID:       STM 
  TPM Version:         01010000
  Manufacturer Info:   53544d20
[root@dell-per515-01 ~]# rpm -q tpm-tools
tpm-tools-1.3.9-2.el7.x86_64

[root@dell-per515-01 ~]# yum update tpm-tools-1.3.9-3.el7.x86_64.rpm 
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining tpm-tools-1.3.9-3.el7.x86_64.rpm: tpm-tools-1.3.9-3.el7.x86_64
Marking tpm-tools-1.3.9-3.el7.x86_64.rpm as an update to tpm-tools-1.3.9-2.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package tpm-tools.x86_64 0:1.3.9-2.el7 will be updated
---> Package tpm-tools.x86_64 0:1.3.9-3.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================
 Package                                                      Arch                                                      Version                                                         Repository                                                                        Size
===============================================================================================================================================================================================================================================================================
Updating:
 tpm-tools                                                    x86_64                                                    1.3.9-3.el7                                                     /tpm-tools-1.3.9-3.el7.x86_64                                                    778 k

Transaction Summary
===============================================================================================================================================================================================================================================================================
Upgrade  1 Package

Total size: 778 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : tpm-tools-1.3.9-3.el7.x86_64                                                                                                                                                                                                                                1/2 
  Cleanup    : tpm-tools-1.3.9-2.el7.x86_64                                                                                                                                                                                                                                2/2 
  Verifying  : tpm-tools-1.3.9-3.el7.x86_64                                                                                                                                                                                                                                1/2 
  Verifying  : tpm-tools-1.3.9-2.el7.x86_64                                                                                                                                                                                                                                2/2 

Updated:
  tpm-tools.x86_64 0:1.3.9-3.el7                                                                                                                                                                                                                                               

Complete!
[root@dell-per515-01 ~]# tpm_version
  TPM 1.2 Version Info:
  Chip Version:        1.2.8.8
  Spec Level:          2
  Errata Revision:     2
  TPM Vendor ID:       STM 
  TPM Version:         01010000
  Manufacturer Info:   53544d20

Comment 24 dhsia 2019-02-11 02:47:08 UTC
Thank Jerry.

Comment 25 dhsia 2019-03-20 03:29:32 UTC
Hi Jerry, 
I verified tpm-1.3.9-5 in RHEL7.7 and issue is solved, thanks.

Comment 26 Vilém Maršík 2019-06-07 17:25:30 UTC
Partner verified. There are two related patches in tpm-tools.git - fc5e5d48871ca7dbd3debe9600ea06b41f8827e0 and 024e385381621bf6625ec4e7ae3cc10df148364e.
Setting verified.

Comment 28 errata-xmlrpc 2019-08-06 12:48:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2109


Note You need to log in before you can comment on or make changes to this bug.