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 1154196 - dhcrelay triggers { setpcap } AVC
Summary: dhcrelay triggers { setpcap } AVC
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-17 20:44 UTC by Milos Malik
Modified: 2015-03-05 10:46 UTC (History)
0 users

Fixed In Version: selinux-policy-3.13.1-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:46:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0458 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2015-03-05 15:17:00 UTC

Description Milos Malik 2014-10-17 20:44:35 UTC
Description of problem:
It's a bit confusing - does not matter if SELinux is enforcing or permissive, following lines appear in the journal always:
Dropped all unnecessary capabilities.
Dropped all capabilities.

Version-Release number of selected component (if applicable):
dhcp-4.2.5-32.el7.x86_64
selinux-policy-3.13.1-6.el7.noarch
selinux-policy-devel-3.13.1-6.el7.noarch
selinux-policy-doc-3.13.1-6.el7.noarch
selinux-policy-minimum-3.13.1-6.el7.noarch
selinux-policy-mls-3.13.1-6.el7.noarch
selinux-policy-sandbox-3.13.1-6.el7.noarch
selinux-policy-targeted-3.13.1-6.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. get a RHEL-7 machine where targeted policy is active
2. service dhcrelay start
3. search for AVCs

Actual results (enforcing mode):
----
type=SYSCALL msg=audit(10/17/2014 22:28:19.451:479) : arch=x86_64 syscall=prctl success=no exit=-1(Operation not permitted) a0=PR_CAPBSET_DROP a1=chown a2=0x0 a3=0x0 items=0 ppid=1 pid=12313 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=dhcrelay exe=/usr/sbin/dhcrelay subj=system_u:system_r:dhcpd_t:s0 key=(null) 
type=AVC msg=audit(10/17/2014 22:28:19.451:479) : avc:  denied  { setpcap } for  pid=12313 comm=dhcrelay capability=setpcap  scontext=system_u:system_r:dhcpd_t:s0 tcontext=system_u:system_r:dhcpd_t:s0 tclass=capability 
----

Actual results (permissive mode):
----
type=SYSCALL msg=audit(10/17/2014 22:22:39.615:444) : arch=x86_64 syscall=prctl success=yes exit=0 a0=PR_CAPBSET_DROP a1=chown a2=0x0 a3=0x0 items=0 ppid=1 pid=7787 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=dhcrelay exe=/usr/sbin/dhcrelay subj=system_u:system_r:dhcpd_t:s0 key=(null) 
type=AVC msg=audit(10/17/2014 22:22:39.615:444) : avc:  denied  { setpcap } for  pid=7787 comm=dhcrelay capability=setpcap  scontext=system_u:system_r:dhcpd_t:s0 tcontext=system_u:system_r:dhcpd_t:s0 tclass=capability 
----

Expected results:
 * no AVCs

Comment 1 Miroslav Grepl 2014-10-20 10:41:42 UTC
Yes, it makes sense to allow it.

Comment 2 Miroslav Grepl 2014-10-21 14:04:12 UTC
commit fcbcc51eacebb57c777eb8a3c203f95486104d6d
Author: Miroslav Grepl <mgrepl>
Date:   Tue Oct 21 16:01:26 2014 +0200

    Allow setpcap capability for dhcpd.

Comment 6 errata-xmlrpc 2015-03-05 10:46:13 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, 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://rhn.redhat.com/errata/RHBA-2015-0458.html


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