Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1669892

Summary: Some garbled codes are shown on terminal when execute tpm_version
Product: Red Hat Enterprise Linux 8 Reporter: Jerry Snitselaar <jsnitsel>
Component: tpm-toolsAssignee: Jerry Snitselaar <jsnitsel>
Status: CLOSED ERRATA QA Contact: Vilém Maršík <vmarsik>
Severity: low Docs Contact:
Priority: medium    
Version: 8.1CC: dhsia, jkachuck, rvr, tyu1
Target Milestone: rcKeywords: OtherQA
Target Release: 8.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1654985 Environment:
Last Closed: 2019-11-05 22:31:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1654985    
Bug Blocks: 1654309, 1660905, 1666894, 1671421, 1710589    

Comment 1 Jerry Snitselaar 2019-05-22 19:46:04 UTC
[jsnitsel@localhost ~]$ sudo dnf install tpm-tools-1.3.9-4.el8.x86_64.rpm
Updating Subscription Management repositories.
Last metadata expiration check: 0:05:00 ago on Wed 22 May 2019 03:36:34 PM EDT.
Dependencies resolved.
==========================================================================================================================================
 Package                         Arch                         Version                            Repository                          Size
==========================================================================================================================================
Installing:
 tpm-tools                       x86_64                       1.3.9-4.el8                        @commandline                       195 k

Transaction Summary
==========================================================================================================================================
Install  1 Package

Total size: 195 k
Installed size: 892 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                  1/1 
  Installing       : tpm-tools-1.3.9-4.el8.x86_64                                                                                     1/1 
  Running scriptlet: tpm-tools-1.3.9-4.el8.x86_64                                                                                     1/1 
  Verifying        : tpm-tools-1.3.9-4.el8.x86_64                                                                                     1/1 
Installed products updated.

Installed:
  tpm-tools-1.3.9-4.el8.x86_64                                                                                                            

Complete!
[jsnitsel@localhost ~]$ tpm_version
host6 localhost6.localdoA�  TPM 1.2 Version Info:
  Chip Version:        1.2.13.12
  Spec Level:          2
  Errata Revision:     3
  TPM Vendor ID:       STM 
  Vendor Specific data: 50
  TPM Version:         01010000
  Manufacturer Info:   53544d20
[jsnitsel@localhost ~]$ sudo dnf upgrade tpm-tools-1.3.9-5.el8.x86_64.rpm
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:17 ago on Wed 22 May 2019 03:43:02 PM EDT.
Dependencies resolved.
==========================================================================================================================================
 Package                         Arch                         Version                            Repository                          Size
==========================================================================================================================================
Upgrading:
 tpm-tools                       x86_64                       1.3.9-5.el8                        @commandline                       198 k

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

Total size: 198 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                  1/1 
  Upgrading        : tpm-tools-1.3.9-5.el8.x86_64                                                                                     1/2 
  Running scriptlet: tpm-tools-1.3.9-5.el8.x86_64                                                                                     1/2 
  Cleanup          : tpm-tools-1.3.9-4.el8.x86_64                                                                                     2/2 
  Running scriptlet: tpm-tools-1.3.9-4.el8.x86_64                                                                                     2/2 
  Verifying        : tpm-tools-1.3.9-5.el8.x86_64                                                                                     1/2 
  Verifying        : tpm-tools-1.3.9-4.el8.x86_64                                                                                     2/2 
Installed products updated.

Upgraded:
  tpm-tools-1.3.9-5.el8.x86_64                                                                                                            

Complete!
[jsnitsel@localhost ~]$ tpm_version
  TPM 1.2 Version Info:
  Chip Version:        1.2.13.12
  Spec Level:          2
  Errata Revision:     3
  TPM Vendor ID:       STM 
  Vendor Specific data: 50
  TPM Version:         01010000
  Manufacturer Info:   53544d20

Comment 4 Vilém Maršík 2019-08-15 10:34:41 UTC
Jerry, do you know how to reproduce this? My tpm-tools-1.3.9-2.el7.x86_64 work just fine:
# rpm -q tpm-tools
tpm-tools-1.3.9-2.el7.x86_64
# tpm_version
  TPM 1.2 Version Info:
  Chip Version:        1.2.13.12
  Spec Level:          2
  Errata Revision:     3
  TPM Vendor ID:       STM
  Vendor Specific data: 50
  TPM Version:         01010000
  Manufacturer Info:   53544d20

Comment 5 Jerry Snitselaar 2019-08-15 21:18:56 UTC
It could possibly only happen with certain chips? I didn't do anything in particular to make it happen. I believe that reproduction I did was on my Lenovo D30 here. I'll verify and post an update. That is a rhel7 package though in your comment (Not that it should change anything, it was there as well).

Comment 6 Jerry Snitselaar 2019-08-15 21:24:18 UTC
Yeah, I can reproduce it here on my D30:

Last login: Wed Jul 24 13:57:05 2019 from 192.168.1.8
[jsnitsel@localhost ~]$ rpm -qi tpm-tools
Name        : tpm-tools
Version     : 1.3.9
Release     : 7.el8
Architecture: x86_64
Install Date: Wed 12 Jun 2019 05:48:33 PM MST
Group       : Unspecified
Size        : 1137687
License     : CPL
Signature   : (none)
Source RPM  : tpm-tools-1.3.9-7.el8.src.rpm
Build Date  : Wed 12 Jun 2019 05:33:38 PM MST
Build Host  : x86-vm-01.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://trousers.sourceforge.net
Summary     : Management tools for the TPM hardware
Description :
tpm-tools is a group of tools to manage and utilize the Trusted Computing
Group's TPM hardware. TPM hardware can create, store and use RSA keys
securely (without ever being exposed in memory), verify a platform's
software state using cryptographic hashes and more.
[jsnitsel@localhost ~]$ rpm -e tpm-tools
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
[jsnitsel@localhost ~]$ sudo rpm -e tpm-tools
[sudo] password for jsnitsel: 
[jsnitsel@localhost ~]$ sudo dnf install tpm-tools
Updating Subscription Management repositories.
Last metadata expiration check: 0:54:08 ago on Thu 15 Aug 2019 01:25:32 PM MST.
Dependencies resolved.
====================================================================================================================================================================================
 Package                               Arch                               Version                                   Repository                                                 Size
====================================================================================================================================================================================
Installing:
 tpm-tools                             x86_64                             1.3.9-4.el8                               rhel-8-for-x86_64-baseos-rpms                             196 k

Transaction Summary
====================================================================================================================================================================================
Install  1 Package

Total download size: 196 k
Installed size: 892 k
Is this ok [y/N]: y
Downloading Packages:
tpm-tools-1.3.9-4.el8.x86_64.rpm                                                                                                                    111 kB/s | 196 kB     00:01    
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                               111 kB/s | 196 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                            1/1 
  Installing       : tpm-tools-1.3.9-4.el8.x86_64                                                                                                                               1/1 
  Running scriptlet: tpm-tools-1.3.9-4.el8.x86_64                                                                                                                               1/1 
  Verifying        : tpm-tools-1.3.9-4.el8.x86_64                                                                                                                               1/1 
Installed products updated.

Installed:
  tpm-tools-1.3.9-4.el8.x86_64                                                                                                                                                      

Complete!
[jsnitsel@localhost ~]$ tpm_version 
host6 localhost6.localdo��  TPM 1.2 Version Info:
  Chip Version:        1.2.13.12
  Spec Level:          2
  Errata Revision:     3
  TPM Vendor ID:       STM 
  Vendor Specific data: 50
  TPM Version:         01010000
  Manufacturer Info:   53544d20


It looks like the same chip, so no idea why it shows up with some and not others.

Comment 7 Vilém Maršík 2019-08-30 16:15:45 UTC
Lenovo, could you please verify that the bug is fixed?

Comment 8 dhsia 2019-09-02 06:01:27 UTC
(In reply to Vilém Maršík from comment #7)
> Lenovo, could you please verify that the bug is fixed?

Hi Vilém, 
I verified the tpm-tools-1.3.9-7 on Lenovo SR860. I don't see the garbled codes.

Comment 9 Vilém Maršík 2019-09-13 15:45:07 UTC
(In reply to dhsia from comment #8)
> (In reply to Vilém Maršík from comment #7)
> > Lenovo, could you please verify that the bug is fixed?
> 
> Hi Vilém, 
> I verified the tpm-tools-1.3.9-7 on Lenovo SR860. I don't see the garbled
> codes.

Thanks Lenovo.

Partner verified the fix. Related code confirmed in rhel-8.1.0 branch of tpm-tools.git as commits  8212fb9cc9bff8e4f483f999c6c346faaf378bb7 and 57251799b8843820708c329f146a1d5cde680079 . Setting verified.

Comment 11 errata-xmlrpc 2019-11-05 22:31:49 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:3638