Bug 593708

Summary: ncftool fails when selinux is set to enforce
Product: Red Hat Enterprise Linux 6 Reporter: Laine Stump <laine>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: jscotka, mgrepl, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-25.el6.noarch Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 14:57:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ausearch output
none
relevant part of audit.log none

Description Laine Stump 2010-05-19 14:37:16 UTC
Description of problem:

/usr/bin/ncftool (from netcf package) fails to run if selinux is set to enforce.

Version-Release number of selected component (if applicable):

selinux-policy-3.7.19-15.el6
netcf

How reproducible: 100%


Steps to Reproduce:

With selinux in enforcing mode, su to root and attempt to execute "ncftool"

  
Actual results:

root@vlap13 /home/laine>ncftool
Failed to initialize netcf
error: File operation failed
error: Stylesheet /usr/share/netcf/xml/initscripts-get.xsl does not exist or is not readable


Expected results:

if operating normally, you would get a prompt:

   ncftool>

Additional info:

Here's the full message from the selinux alert tool. Note that several files are denied, but I didn't want to clutter up the report with all of them.


Summary:

SELinux is preventing /usr/bin/ncftool "read" access on
/usr/share/netcf/xml/interface.rng.

Detailed Description:

SELinux denied access requested by ncftool. It is not expected that this access
is required by ncftool and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c102
                              3
Target Context                system_u:object_r:usr_t:s0
Target Objects                /usr/share/netcf/xml/interface.rng [ file ]
Source                        ncftool
Source Path                   /usr/bin/ncftool
Port                          <Unknown>
Host                          vlap13.laine.org
Source RPM Packages           netcf-0.1.6-1.fc13
Target RPM Packages           netcf-libs-0.1.6-1.fc13
Policy RPM                    selinux-policy-3.7.19-15.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     vlap13.laine.org
Platform                      Linux vlap13.laine.org 2.6.33.3-85.fc13.x86_64 #1
                              SMP Thu May 6 18:09:49 UTC 2010 x86_64 x86_64
Alert Count                   9
First Seen                    Wed 19 May 2010 09:48:29 AM EDT
Last Seen                     Wed 19 May 2010 10:33:49 AM EDT
Local ID                      43e5992e-94f7-4f4b-829a-fc14718c83bb
Line Numbers                  

Raw Audit Messages            

node=vlap13.laine.org type=AVC msg=audit(1274279629.164:44054): avc:  denied  { read } for  pid=30103 comm="ncftool" name="interface.rng" dev=dm-1 ino=2113591 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file

node=vlap13.laine.org type=SYSCALL msg=audit(1274279629.164:44054): arch=c000003e syscall=21 success=no exit=-13 a0=14a40d0 a1=4 a2=0 a3=722e656361667265 items=0 ppid=23678 pid=30103 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=1 comm="ncftool" exe="/usr/bin/ncftool" subj=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 key=(null)

Comment 2 Daniel Walsh 2010-05-19 17:45:37 UTC
Fixed in selinux-policy-3.7.19-18.el6.noarch

Comment 3 RHEL Program Management 2010-05-19 17:55:59 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 9 Milos Malik 2010-06-09 07:44:09 UTC
Created attachment 422461 [details]
ausearch output

Comment 10 Milos Malik 2010-06-09 07:50:09 UTC
Created attachment 422464 [details]
relevant part of audit.log

Comment 18 Laine Stump 2010-06-16 10:06:47 UTC
*** Bug 604573 has been marked as a duplicate of this bug. ***

Comment 19 Miroslav Grepl 2010-06-16 11:27:37 UTC
Fixed in selinux-policy-3.7.19-25.el6.noarch

Comment 21 releng-rhel@redhat.com 2010-11-11 14:57:36 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.