Bug 1697887

Summary: Relabeling of dumpe2fs and e2mmpstatus doesn't happen due to label collision
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 8.0CC: lvrabec, mmalik, plautrba, ssekidde, zpytela
Target Milestone: rc   
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-09 09:56:24 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:

Description Renaud Métrich 2019-04-09 08:55:02 UTC
Description of problem:

The /usr/sbin/dumpe2fs and /usr/sbin/e2mmpstatus are hard links but have different labels, this causes "fixfiles" to not label the files properly:

# fixfiles -F onboot
# reboot

Message shown by fixfiles during relabeling:

/sbin/setfiles: conflicting specifications for /usr/sbin/e2mmpstatus and /usr/sbin/dumpe2fs, using system_u:object_r:fsadm_exec_t:s0.

# restorecon -Frnv /
[...]
Would relabel /usr/sbin/e2mmpstatus from system_u:object_r:fsadm_exec_t:s0 to system_u:object_r:bin_t:s0

# ls -iZ /usr/sbin/dumpe2fs /usr/sbin/e2mmpstatus 
50489879 system_u:object_r:fsadm_exec_t:s0 /usr/sbin/dumpe2fs
50489879 system_u:object_r:fsadm_exec_t:s0 /usr/sbin/e2mmpstatus

# matchpathcon /usr/sbin/dumpe2fs /usr/sbin/e2mmpstatus
/usr/sbin/dumpe2fs	system_u:object_r:fsadm_exec_t:s0
/usr/sbin/e2mmpstatus	system_u:object_r:bin_t:s0


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

selinux-policy-3.14.1-61.el8.noarch


How reproducible:

Always


Steps to Reproduce: See above

Comment 1 Milos Malik 2019-04-09 09:26:17 UTC
I believe this bug is a duplicate of BZ#1658624.

Comment 2 Renaud Métrich 2019-04-09 09:56:24 UTC

*** This bug has been marked as a duplicate of bug 1658624 ***