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 1924038 - SELinux policy for FreeRADIUS blocks DHCP server, DHCP client, VMPS and BDF roles
Summary: SELinux policy for FreeRADIUS blocks DHCP server, DHCP client, VMPS and BDF r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.6
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-02 13:15 UTC by Terry Burton
Modified: 2023-09-15 01:32 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.14.3-83.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 15:14:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1854650 1 None None None 2023-04-11 13:37:40 UTC
Red Hat Product Errata RHBA-2022:1995 0 None None None 2022-05-10 15:15:33 UTC

Description Terry Burton 2021-02-02 13:15:00 UTC
FreeRADIUS, in addition to being a RADIUS server, is also a DHCP server, DHCP client, VMPS server and can perform BDF.

These features are currently blocked by the existing SELinux policy.

Changes to support these features have already been included in the Fedora selinux-policy repo:

https://github.com/fedora-selinux/selinux-policy/commit/b8f44f35a3f25ad7d38643d82be140c9595e4bbf
https://github.com/fedora-selinux/selinux-policy/commit/f55e089c5cf192dbe3130e9f76948a3f0eb8d275
https://github.com/fedora-selinux/selinux-policy/commit/ed7247572070a774f805424367e62559ea623171
https://github.com/fedora-selinux/selinux-policy/commit/75bfd3d56530c8050fd41636c5494e1e6ca80407
https://github.com/fedora-selinux/selinux-policy/commit/013b50ce4b85e6079478eaa4d3eb5754e07b3dd2

The most significant of these commits is the first. There is expected to be more awareness of the use of FreeRADIUS as a DHCP server in the near future.

It would be useful if these could be cherry-picked into supported RHEL releases.

All versions of RHEL affected.

Comment 1 Milos Malik 2021-07-02 13:10:00 UTC
I would like to reproduce the SELinux denials which appear when FreeRADIUS acts as DHCP server, DHCP client, VMPS server etc.
Is there an easy way how to do that?

Comment 2 Terry Burton 2021-07-06 11:16:56 UTC
I shall reproduce what I can. ETA: next week.

The priority here is to support FR acting as a DHCP server since this is a common situation that is being actively promoted. The remaining scenarios are less common for users of RHEL packages, as most of these users will be using more-recent upstream packages.

Part of the intent here is to reduce attrition for users of more recent upstream (and consequently current and future RHEL packages) going forward where these non-RADIUS protocols will be well used. Upstream prefer to work to improve the existing distro SELinux policy than to advise a package-specific policy at this time.

Comment 4 Zdenek Pytela 2021-10-01 10:15:04 UTC
(In reply to Terry Burton from comment #2)
> I shall reproduce what I can. ETA: next week.
> 
> The priority here is to support FR acting as a DHCP server since this is a
> common situation that is being actively promoted. The remaining scenarios
> are less common for users of RHEL packages, as most of these users will be
> using more-recent upstream packages.
> 
> Part of the intent here is to reduce attrition for users of more recent
> upstream (and consequently current and future RHEL packages) going forward
> where these non-RADIUS protocols will be well used. Upstream prefer to work
> to improve the existing distro SELinux policy than to advise a
> package-specific policy at this time.

Terry,

Have you managed to find the scenarios to reproduce the known problems? Can you share them with us so that we can ensure the fix is complete?

Comment 7 Zdenek Pytela 2021-11-09 19:47:33 UTC
Terry,

I've cherry-picked and modified the PRs to get them to RHEL 8 and there will be a build soon. The request to reproduce the problems and verify the features work as expected in the new build is still valid.

Comment 8 Milos Malik 2021-11-11 09:30:32 UTC
I managed to enable the VMPS feauture and the following SELinux denial appeared in enforcing mode:
----
type=PROCTITLE msg=audit(11/11/2021 04:28:31.452:325) : proctitle=/usr/sbin/radiusd -d /etc/raddb 
type=SYSCALL msg=audit(11/11/2021 04:28:31.452:325) : arch=x86_64 syscall=setsockopt success=no exit=EPERM(Operation not permitted) a0=0x10 a1=SOL_SOCKET a2=SO_BINDTODEVICE a3=0x7ffecf5e5130 items=0 ppid=6451 pid=6454 auid=unset uid=root gid=radiusd euid=root suid=root fsuid=root egid=radiusd sgid=radiusd fsgid=radiusd tty=(none) ses=unset comm=radiusd exe=/usr/sbin/radiusd subj=system_u:system_r:radiusd_t:s0 key=(null) 
type=AVC msg=audit(11/11/2021 04:28:31.452:325) : avc:  denied  { net_raw } for  pid=6454 comm=radiusd capability=net_raw  scontext=system_u:system_r:radiusd_t:s0 tcontext=system_u:system_r:radiusd_t:s0 tclass=capability permissive=0 
----

The following SELinux denial appeared in permissive mode:
----
type=PROCTITLE msg=audit(11/11/2021 04:29:52.013:329) : proctitle=/usr/sbin/radiusd -d /etc/raddb 
type=SYSCALL msg=audit(11/11/2021 04:29:52.013:329) : arch=x86_64 syscall=setsockopt success=yes exit=0 a0=0x10 a1=SOL_SOCKET a2=SO_BINDTODEVICE a3=0x7ffeead17b80 items=0 ppid=6488 pid=6490 auid=unset uid=root gid=radiusd euid=root suid=root fsuid=root egid=radiusd sgid=radiusd fsgid=radiusd tty=(none) ses=unset comm=radiusd exe=/usr/sbin/radiusd subj=system_u:system_r:radiusd_t:s0 key=(null) 
type=AVC msg=audit(11/11/2021 04:29:52.013:329) : avc:  denied  { net_raw } for  pid=6490 comm=radiusd capability=net_raw  scontext=system_u:system_r:radiusd_t:s0 tcontext=system_u:system_r:radiusd_t:s0 tclass=capability permissive=1 
----

Comment 16 errata-xmlrpc 2022-05-10 15:14:58 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-2022:1995

Comment 17 Red Hat Bugzilla 2023-09-15 01:32:37 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


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