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 2157836 - rpm-plugin-ima tried to add IMA signature to non-existing files
Summary: rpm-plugin-ima tried to add IMA signature to non-existing files
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2023-06-19
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rpm
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: Jan Blazek
Mariya Pershina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-03 07:31 UTC by Coiby
Modified: 2023-11-07 11:24 UTC (History)
4 users (show)

Fixed In Version: rpm-4.16.1.3-23.el9
Doc Type: Bug Fix
Doc Text:
.Installing packages with IMA signatures on file systems without extended file attributes no longer fails Previously, RPM tried to apply IMA signatures to files even if they did not support these signatures. As a consequence, package installation failed. With this update, RPM skips applying IMA signatures. As a result, package installation no longer fails.
Clone Of:
Environment:
Last Closed: 2023-11-07 08:52:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-143522 0 None None None 2023-01-03 07:34:02 UTC
Red Hat Product Errata RHBA-2023:6623 0 None None None 2023-11-07 08:52:59 UTC

Description Coiby 2023-01-03 07:31:42 UTC
Description of problem:

rpm-plugin-ima tried to add IMA signatures to non-existing files for grub2-efi and shim,

    $ dnf reinstall grub2-efi shim -y
    error: ima: could not apply signature on '/boot/efi/EFI/BOOT/BOOTX64.EFI;63b3d90d': Operation not supported
    error: Plugin ima: hook fsm_file_prepare failed
    
    Error unpacking rpm package shim-x64-15.6-1.el9.x86_64
      Reinstalling     : grub2-efi-x64-1:2.06-46.el9.x86_64                                                                                                                                  2/4 
    error: unpacking of archive failed on file /boot/efi/EFI/BOOT/BOOTX64.EFI;63b3d90d: cpio: (error 0x2)
    error: shim-x64-15.6-1.el9.x86_64: install failed
    error: ima: could not apply signature on '/boot/efi/EFI/redhat/grubx64.efi;63b3d90d': Operation not supported
    error: Plugin ima: hook fsm_file_prepare failed

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

rpm-plugin-ima-4.16.1.3-22.el9

How reproducible:

always

Steps to Reproduce:
1. Install RHEL9 or use cloud image e.g. rhel-guest-image-9.2-20221205.2.x86_64.qcow2
2. dnf install rpm-plugin-ima -y
2. dnf reinstall grub2-efi shim -y

Actual results:

grub2-efi and shim failed to be reinstalled.

Expected results:

grub2-efi and shim can be reinstalled and IMA signatures are successfully added to the package files.

Additional info:

Comment 1 Florian Festi 2023-01-09 15:09:44 UTC
This looks like a duplicate of or at least very similar to #2157835. https://github.com/rpm-software-management/rpm/commit/7db2efa95d859cebda2b095ffdffac42812bd6d9 should also fix this.

Comment 3 Coiby 2023-01-25 07:33:29 UTC
(In reply to Florian Festi from comment #1)
> This looks like a duplicate of or at least very similar to #2157835.
> https://github.com/rpm-software-management/rpm/commit/
> 7db2efa95d859cebda2b095ffdffac42812bd6d9 should also fix this.

The reasons I think this is a different bug are as follows,
a) there are strange trailing characters ";63b3d90d" in the path e.g. "/boot/efi/EFI/BOOT/BOOTX64.EFI;63b3d90d"  
b) a different error "error: unpacking of archive failed on file /boot/efi/EFI/BOOT/BOOTX64.EFI;63b3d90d: cpio: (error 0x2)" is seen.

Comment 4 Florian Festi 2023-01-25 12:35:18 UTC
These "trailing characters" is the temporary name the files gets while being un-packed. The file attributes are set there before the file is moved to it's actual position/name. It's the same issue happeningh at a slightly different place - leading to a slightly different error message. But the cause is the same: The efi file system doesn't support extended file attributes and the IMA plugin errors out because of that.

We could probably even close this as an duplicate.

Another question is whether these files/packages should have IMA signatures at all if the live in a place that doesn't support them. But I am not sure if the current IMA infrastructure supports omitting such signatures.

Comment 14 errata-xmlrpc 2023-11-07 08:52:54 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-2023:6623


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