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 2213605 - SELinux labels RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas process as zebra_t
Summary: SELinux labels RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas process as zebra_t
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.2
Hardware: x86_64
OS: Linux
urgent
medium
Target Milestone: beta
: 9.3
Assignee: Nobody
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 2229992
TreeView+ depends on / blocked
 
Reported: 2023-06-08 17:04 UTC by Robert Scheck
Modified: 2023-11-07 11:23 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-38.1.18-1.el9
Doc Type: Bug Fix
Doc Text:
Cause: The policy contained the /usr/sbin/rip.* regex which was too broad and matched also binaries from other components, which leads to mislabeling of ripe-atlas Consequence: SELinux labels RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas process as zebra_t Fix: Label only /usr/sbin/ripd and ripngd with zebra_exec_t Result: Other binaries are not labeled as zebra_t
Clone Of:
: 2229992 (view as bug list)
Environment:
Last Closed: 2023-11-07 08:52:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2213604 0 medium CLOSED SELinux labels RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas process as zebra_t 2023-06-29 16:44:04 UTC
Red Hat Issue Tracker RHELPLAN-159322 0 None None None 2023-06-08 17:06:58 UTC
Red Hat Product Errata RHBA-2023:6617 0 None None None 2023-11-07 08:52:45 UTC

Description Robert Scheck 2023-06-08 17:04:20 UTC
Description of problem:
While trying to package RIPE Atlas Probe/Anchor for Fedora and EPEL, I had to learn that SELinux labels RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas process as zebra_t, which makes RIPE Atlas Probe/Anchor unusable as the SELinux Zebra policy forbids many things RIPE Atlas Probe/Anchor needs to work.

Fortunately, this seems to be an unintended side effect in the SELinux policy as shipped in Fedora and RHEL:

$ grep /usr/sbin/rip /etc/selinux/targeted/contexts/files/file_contexts
/usr/sbin/rip.* --      system_u:object_r:zebra_exec_t:s0
$ 

For the Zebra/FRR component 'rip' (Routing Information Protocol) a wildcard was placed which likely impacts all software starting with '/usr/sbin/rip', even if it's not related to Zebra/FRR at all. Thus I propose the following simple fix, that does not impact Zebra/FRR's 'rip' but unbreaks RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas (and I explicitly added a wildcard to cover possible future sub-components as well):

/usr/sbin/ripe-atlas.* -- system_u:object_r:bin_t:s0

Version-Release number of selected component (if applicable):
selinux-policy-targeted-38.1.11-2.0.1.el9_2.noarch

Actual Results:  
SELinux labels RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas process as zebra_t when started via ripe-atlas.service

Expected Results:  
SELinux labels RIPE Atlas Probe/Anchor's /usr/sbin/ripe-atlas process as unconfined_t when started via ripe-atlas.service

Additional info:
Clone of bug #2213604 from Fedora for RHEL 9.

Comment 2 Zdenek Pytela 2023-06-28 20:23:18 UTC
Commit to backport:
b91d9a5b6 (HEAD -> rawhide, upstream/rawhide) Label only /usr/sbin/ripd and ripngd with zebra_exec_t

Comment 4 Robert Scheck 2023-06-29 21:06:51 UTC
Zdenek, is there a realistic chance for a backport to RHEL 9.2.z, if I file a RHBZ and a case via CEE/GSS?

Comment 6 Zdenek Pytela 2023-07-13 19:11:21 UTC
(In reply to Robert Scheck from comment #4)
> Zdenek, is there a realistic chance for a backport to RHEL 9.2.z, if I file
> a RHBZ and a case via CEE/GSS?

There needs to be justification for accepting such a request.

Comment 7 Robert Scheck 2023-07-18 11:10:03 UTC
I opened case 03565036 at the Red Hat customer portal and provided a justification there. In the end, we need the fix in RHEL 9.3 GA and RHEL 9.2.z. Please let me know if something else is needed.

Comment 9 Zdenek Pytela 2023-07-19 13:57:02 UTC
Dmitri,

Please follow your organization workflow to request a z-stream backport, it's not done manually.

Comment 21 errata-xmlrpc 2023-11-07 08:52:30 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


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