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 2187893

Summary: Incorrect default SELinux labels
Product: Red Hat Enterprise Linux 9 Reporter: Marko Myllynen <myllynen>
Component: selinux-policyAssignee: Nobody <nobody>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.2CC: lvrabec, mmalik, spotrh, than, tpopela, yaneti, zpytela
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-38.1.20-1.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2221573 (view as bug list) Environment:
Last Closed: 2023-11-07 08:52:21 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:
Deadline: 2023-05-30   

Description Marko Myllynen 2023-04-19 05:20:54 UTC
Description of problem:
With firefox when starting the browser for the first time the configuration directory is created with correct SELinux labels:

$ rm -rf ~/.mozilla
$ firefox
$ restorecon -Rv ~/.mozilla
$

But with chromium the files get relabeled:

$ rm -rf ~/.cache/chromium ~/.config/chromium
$ chromium-browser
[7517:7517:0419/080842.293745:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
[7555:7555:0419/080842.322254:ERROR:gpu_init.cc(525)] Passthrough is not supported, GL is egl, ANGLE is 
$ restorecon -Rv ~/.cache/chromium ~/.config/chromium | wc -l
283

It looks like chromium and selinux-policy are not fully in sync on which labels should be used. Thanks.

Version-Release number of selected component (if applicable):
chromium-112.0.5615.121-2.el9.x86_64
selinux-policy-targeted-34.1.43-1.el9_1.2.noarch

Comment 1 Zdenek Pytela 2023-05-11 17:25:28 UTC
I've submitted a PR to address the issue in Fedora:
https://github.com/fedora-selinux/selinux-policy/pull/1679

It will be a part of the next F38 and rawhide builds.

Comment 20 Milos Malik 2023-07-10 07:39:43 UTC
The same issue is reproducible on RHEL-8.9 and was filed as BZ#2221573.

Comment 37 errata-xmlrpc 2023-11-07 08:52:21 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 (selinux-policy 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:6617