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 1458999 - /usr/lib/systemd/systemd-sysctl AVC denied on RHEL-7.4-20170601.0
Summary: /usr/lib/systemd/systemd-sysctl AVC denied on RHEL-7.4-20170601.0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-06 06:01 UTC by Chao Ye
Modified: 2017-08-01 15:28 UTC (History)
11 users (show)

Fixed In Version: selinux-policy-3.13.1-160.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 15:28:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1861 0 normal SHIPPED_LIVE selinux-policy bug fix update 2017-08-01 17:50:24 UTC

Description Chao Ye 2017-06-06 06:01:41 UTC
Description of problem:
Info: Searching AVC errors produced since 1496677607.77 (Mon Jun  5 11:46:47 2017)
Searching logs...
Running '/usr/bin/env LC_ALL=en_US.UTF-8 /sbin/ausearch -m AVC -m USER_AVC -m SELINUX_ERR -ts 06/05/2017 11:46:47 < /dev/null >/mnt/testarea/tmp.rhts-db-submit-result.MAPl5N 2>&1'
----
time->Mon Jun  5 15:46:36 2017
type=PROCTITLE msg=audit(1496691996.800:22): proctitle="/lib/systemd/systemd-sysctl"
type=SYSCALL msg=audit(1496691996.800:22): arch=c000003e syscall=1 success=no exit=-1 a0=4 a1=7f6fa2b17000 a2=2 a3=22 items=0 ppid=702 pid=780 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="systemd-sysctl" exe="/usr/lib/systemd/systemd-sysctl" subj=system_u:system_r:systemd_sysctl_t:s0 key=(null)
type=AVC msg=audit(1496691996.800:22): avc:  denied  { sys_ptrace } for  pid=780 comm="systemd-sysctl" capability=19  scontext=system_u:system_r:systemd_sysctl_t:s0 tcontext=system_u:system_r:systemd_sysctl_t:s0 tclass=capability
----
time->Mon Jun  5 15:46:37 2017
type=PROCTITLE msg=audit(1496691997.116:23): proctitle="/lib/systemd/systemd-sysctl"
type=SYSCALL msg=audit(1496691997.116:23): arch=c000003e syscall=1 success=no exit=-1 a0=4 a1=7f7fe2612000 a2=2 a3=22 items=0 ppid=702 pid=925 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="systemd-sysctl" exe="/usr/lib/systemd/systemd-sysctl" subj=system_u:system_r:systemd_sysctl_t:s0 key=(null)
type=AVC msg=audit(1496691997.116:23): avc:  denied  { sys_ptrace } for  pid=925 comm="systemd-sysctl" capability=19  scontext=system_u:system_r:systemd_sysctl_t:s0 tcontext=system_u:system_r:systemd_sysctl_t:s0 tclass=capability
Fail: AVC messages found.
Checking for errors...
Using stronger AVC checks.
	Define empty RHTS_OPTION_STRONGER_AVC parameter if this causes any problems.
Running 'cat /mnt/testarea/tmp.rhts-db-submit-result.MAPl5N | /sbin/ausearch -m AVC -m SELINUX_ERR'
Fail: AVC messages found.
Running 'cat %s | /sbin/ausearch -m USER_AVC >/mnt/testarea/tmp.rhts-db-submit-result.hdpgcI 2>&1'
Info: No AVC messages found.
/bin/grep 'avc: ' /mnt/testarea/dmesg.log | /bin/grep --invert-match TESTOUT.log
Following messages were found in dmesg:
[    3.754483] type=1400 audit(1496691995.072:4): avc:  denied  { sys_ptrace } for  pid=469 comm="systemd-sysctl" capability=19  scontext=system_u:system_r:systemd_sysctl_t:s0 tcontext=system_u:system_r:systemd_sysctl_t:s0 tclass=capability
Running '/usr/sbin/sestatus'
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
Running 'rpm -q selinux-policy || true'
selinux-policy-3.13.1-154.el7.noarch

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-154.el7.noarch

How reproducible:
Once

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Beaker Job:
https://beaker.engineering.redhat.com/recipes/3912741

Comment 3 Lukas Vrabec 2017-06-06 08:10:26 UTC
We should back port this from Fedora.

Comment 5 Milos Malik 2017-06-06 14:53:52 UTC
Confirmed. Reproducible with kernel-3.10.0-679.el7.

SELinux denial caught in enforcing mode is:
----
type=PROCTITLE msg=audit(06/06/2017 10:51:24.217:75) : proctitle=/usr/lib/systemd/systemd-sysctl 
type=SYSCALL msg=audit(06/06/2017 10:51:24.217:75) : arch=x86_64 syscall=write success=no exit=EPERM(Operation not permitted) a0=0x4 a1=0x7f7b444eb000 a2=0x2 a3=0x22 items=0 ppid=1 pid=10235 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-sysctl exe=/usr/lib/systemd/systemd-sysctl subj=system_u:system_r:systemd_sysctl_t:s0 key=(null) 
type=AVC msg=audit(06/06/2017 10:51:24.217:75) : avc:  denied  { sys_ptrace } for  pid=10235 comm=systemd-sysctl capability=sys_ptrace  scontext=system_u:system_r:systemd_sysctl_t:s0 tcontext=system_u:system_r:systemd_sysctl_t:s0 tclass=capability 
----

SELinux denial caught in permissive mode is:
----
type=PROCTITLE msg=audit(06/06/2017 10:52:06.415:80) : proctitle=/usr/lib/systemd/systemd-sysctl 
type=SYSCALL msg=audit(06/06/2017 10:52:06.415:80) : arch=x86_64 syscall=write success=yes exit=2 a0=0x4 a1=0x7f38a32d9000 a2=0x2 a3=0x22 items=0 ppid=1 pid=10257 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-sysctl exe=/usr/lib/systemd/systemd-sysctl subj=system_u:system_r:systemd_sysctl_t:s0 key=(null) 
type=AVC msg=audit(06/06/2017 10:52:06.415:80) : avc:  denied  { sys_ptrace } for  pid=10257 comm=systemd-sysctl capability=sys_ptrace  scontext=system_u:system_r:systemd_sysctl_t:s0 tcontext=system_u:system_r:systemd_sysctl_t:s0 tclass=capability 
----

# cat /proc/sys/kernel/yama/ptrace_scope 
0
#

Comment 9 errata-xmlrpc 2017-08-01 15:28:52 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://access.redhat.com/errata/RHBA-2017:1861


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