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 1255047 - xinetd cannot execute commands in MLS policy
Summary: xinetd cannot execute commands in MLS policy
Keywords:
Status: CLOSED NOTABUG
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: Jiri Jaburek
URL:
Whiteboard:
Depends On:
Blocks: 1218420
TreeView+ depends on / blocked
 
Reported: 2015-08-19 13:36 UTC by Jiri Jaburek
Modified: 2015-08-19 14:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-19 14:58:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
avc log, in enforcing (connection reset) (1.28 KB, text/plain)
2015-08-19 13:36 UTC, Jiri Jaburek
no flags Details
avc log, in permissive (server binary executed) (1.15 KB, text/plain)
2015-08-19 13:38 UTC, Jiri Jaburek
no flags Details

Description Jiri Jaburek 2015-08-19 13:36:13 UTC
Description of problem:

Like bug 1255030 and bug 1254698, xinetd cannot read /etc it seems:

type=SYSCALL msg=audit(08/19/2015 15:30:11.596:924) : arch=x86_64 syscall=open success=no exit=-13(Permission denied) a0=0x7f57c3e5dab2 a1=O_RDONLY|O_CLOEXEC a2=0x1 a3=0x7f57c40543a8 items=0 ppid=1055 pid=3147 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=xinetd exe=/usr/sbin/xinetd subj=system_u:system_r:inetd_t:s0-s15:c0.c1023 key=(null) 
type=AVC msg=audit(08/19/2015 15:30:11.596:924) : avc:  denied  { search } for  pid=3147 comm=xinetd name=etc dev="dm-0" ino=133 scontext=system_u:system_r:inetd_t:s0-s15:c0.c1023 tcontext=system_u:object_r:etc_t:s15:c0.c1023 tclass=dir 


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

How reproducible:
always

Steps to Reproduce:
1. set up a simple service in /etc/xinetd.d (see examples there)
2. try to invoke it using ie. netcat
3. get connection reset, observe AVCs

Comment 1 Jiri Jaburek 2015-08-19 13:36:54 UTC
Created attachment 1064868 [details]
avc log, in enforcing (connection reset)

Comment 2 Jiri Jaburek 2015-08-19 13:38:04 UTC
Created attachment 1064869 [details]
avc log, in permissive (server binary executed)

Note that there are no AVCs related to xinetd, the only visible one is from the actual command executed by xinetd.

Comment 3 Jiri Jaburek 2015-08-19 14:58:15 UTC
The issue was incorrect /etc context,

restorecon reset /etc context system_u:object_r:etc_t:s15:c0.c1023->system_u:object_r:etc_t:s0

and while it's still unclear what gave it c0.c1023 (SystemHigh) instead of s0 (SystemLow), the issues reported in comment #0 are a result/symptom of this change, not its cause.


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