Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1874062

Summary: removal RPM signature fails - rpmReadSignature failed: signature region 62: tag number mismatch
Product: Red Hat Enterprise Linux 8 Reporter: James Hartsock <hartsjc>
Component: rpmAssignee: Florian Festi <ffesti>
Status: CLOSED ERRATA QA Contact: Radek Bíba <rbiba>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: ffesti, mdomonko, pmatilai
Target Milestone: rcKeywords: AutoVerified
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rpm-4.14.3-5.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1851508 Environment:
Last Closed: 2021-05-18 14:49:53 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:    
Bug Blocks: 1894575    

Description James Hartsock 2020-08-31 13:25:58 UTC
Description of problem:
rpmsign --delsign fails to remove Signature on certain 3rd party RPMs

Version-Release number of selected component (if applicable):
rpm-sign-4.14.2-37.el8.x86_64

How reproducible:
With proper RPM very

Steps to Reproduce:
1. Download RPM with known issue, like IBM's GPFS or MSFT teams.  Teams is publicly available at:
   https://www.microsoft.com/en-us/microsoft-365/microsoft-teams/download-app#desktopAppDownloadregion

2. Attempt to remove signature

3. Observe return-code, possible error message, or verify signature was removed


Actual RHEL 7 results:

  $ rpmsign --delsign teams-1.3.00.16851-1.x86_64.rpm 
  teams-1.3.00.16851-1.x86_64.rpm:

  $ echo $?
  255


Actual RHEL 8 results:

  $ rpm -qp --info gpfs.msg.en_US-5.0.5-1.noarch.rpm 2>/dev/null | grep ^Signature
  Signature   : RSA/SHA256, Thu 09 Jul 2020 02:25:57 PM CDT, Key ID bdbe75c3efeb6eeb

  $ rpmsign --delsign gpfs.msg.en_US-5.0.5-1.noarch.rpm 
  gpfs.msg.en_US-5.0.5-1.noarch.rpm:
  error: gpfs.msg.en_US-5.0.5-1.noarch.rpm: rpmReadSignature failed: signature region 62: tag number mismatch il 12 ril 7 dl 1279 rdl 16

  $ rpm -qp --info gpfs.msg.en_US-5.0.5-1.noarch.rpm 2>/dev/null | grep ^Signature
  Signature   : RSA/SHA256, Thu 09 Jul 2020 02:25:57 PM CDT, Key ID bdbe75c3efeb6eeb



Expected results, using a previous version of the 3rd party GPFS RPM:

  $ rpm -qp --info ./gpfs.msg.en_US-5.0.3-0.noarch.rpm 2>/dev/null | grep ^Signature
  Signature   : RSA/SHA1, Tue 30 Apr 2019 04:44:05 PM CDT, Key ID 89cc8c5a5c9e89bc

  $ rpmsign --delsign gpfs.msg.en_US-5.0.3-0.noarch.rpm 
  gpfs.msg.en_US-5.0.3-0.noarch.rpm:

  $ rpm -qp --info ./gpfs.msg.en_US-5.0.3-0.noarch.rpm 2>/dev/null | grep ^Signature
  Signature   : (none)


Additional info:

Comment 14 errata-xmlrpc 2021-05-18 14:49:53 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 (rpm bug fix and enhancement update), 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-2021:1606