Bug 1702434

Summary: foreman-bootloaders-redhat-tftpboot expected file permissions in package don't match runtime permissions
Product: Red Hat Satellite Reporter: Ryan Mullett <rmullett>
Component: PackagingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4.2CC: aruzicka, egolov, inecas, lzap, satellite6-bugs
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: foreman-bootloaders-redhat-202004171200-3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:58:35 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:
Attachments:
Description Flags
Dist git change none

Description Ryan Mullett 2019-04-23 18:54:41 UTC
Description of problem:
File permissions from the rpm do not match the runtime permissions on several files. This results in mode failures on rpm -Va. Most noticed on systems in which DISA STIG is being performed and file permissions should not be less than the rpm provides or it is considered a finding during an audit. Important for government users and contractors who will be performing DISA STIG. 

Version-Release number of selected component (if applicable):
foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install and configure Satellite server
2. rpm -V foreman-bootloaders-redhat-tftpboot

Actual results:
The following files have permissions that are more permissive than the rpm provides:

/var/lib/tftpboot/grub2
/var/lib/tftpboot/grub2/grubia32.0
/var/lib/tftpboot/grub2/grubia32.efi
/var/lib/tftpboot/grub2/grubx64.efi
/var/lib/tftpboot/grub2/shim.efi
/var/lib/tftpboot/grub2/shimx64.efi
/var/lib/tftpboot/grub2/shimx64-redhat.efi

Expected results:
The file permissions provided via rpm should match the final runtime permissions (or they should be less restrictive on the rpm than the runtime permissions, which would not result in a finding).

Additional info:
The following output shows what it "should be" according to the rpm, as well as what it "actually is" after the package has been installed. This could be resolved by using the proper permissions in the spec file, so that rpm -Va will not flag on these files.

From rpm: foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch
/var/lib/tftpboot/grub2
SHOULD BE:  000
ACTUALLY IS:  755
--
From rpm: foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch
/var/lib/tftpboot/grub2/grubia32.0
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch
/var/lib/tftpboot/grub2/grubia32.efi
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch
/var/lib/tftpboot/grub2/grubx64.efi
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch
/var/lib/tftpboot/grub2/shim.efi
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch
/var/lib/tftpboot/grub2/shimx64.efi
SHOULD BE:  000
ACTUALLY IS:  644
--
From rpm: foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch
/var/lib/tftpboot/grub2/shimx64-redhat.efi
SHOULD BE:  000
ACTUALLY IS:  644

Comment 4 Lukas Zapletal 2019-04-24 09:28:58 UTC
Created attachment 1558045 [details]
Dist git change

Comment 9 Lukas Zapletal 2020-05-27 06:45:02 UTC
For the record, I made a patch upstream to sync the change. I forgot that we have upstreamed this some time ago. I, I upstreamed this :-)

Comment 10 Lukas Pramuk 2020-10-06 22:43:11 UTC
VERIFIED.

@Satellite 6.8.0 Snap18
foreman-bootloaders-redhat-tftpboot-202005201200-1.el7sat.noarch

by the following manual reproducer:

# rpm -V foreman-bootloaders-redhat-tftpboot
.....U...  g /var/lib/tftpboot/grub2/shimx64.efi

>>> there are no M (= The file's mode has changed) flags for the files from rpm

Comment 13 errata-xmlrpc 2020-10-27 12:58:35 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 (Important: Satellite 6.8 release), 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/RHSA-2020:4366