Bug 623619 - SELinux is preventing /usr/sbin/rndc access to a leaked /root file descriptor.
Summary: SELinux is preventing /usr/sbin/rndc access to a leaked /root file descriptor.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:aab8377b8a4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-12 10:32 UTC by Wolfgang Rupprecht
Modified: 2010-08-17 05:39 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-47.fc13
Clone Of:
Environment:
Last Closed: 2010-08-17 05:39:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Wolfgang Rupprecht 2010-08-12 10:32:29 UTC
Summary:

SELinux is preventing /usr/sbin/rndc access to a leaked /root file descriptor.

Detailed Description:

[rndc has a permissive type (ndc_t). This access was not denied.]

SELinux denied access requested by the rndc command. It looks like this is
either a leaked descriptor or rndc output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
the /root. You should generate a bugzilla on selinux-policy, and it will get
routed to the appropriate package. You can safely ignore this avc.

Allowing Access:

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

Additional Information:

Source Context                system_u:system_r:ndc_t:s0
Target Context                system_u:object_r:admin_home_t:s0
Target Objects                /root [ dir ]
Source                        rndc
Source Path                   /usr/sbin/rndc
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bind-9.7.1-2.P2.fc13
Target RPM Packages           filesystem-2.4.31-1.fc13
Policy RPM                    selinux-policy-3.7.19-44.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.6-147.2.4.fc13.x86_64
                              #1 SMP Fri Jul 23 17:14:44 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 12 Aug 2010 03:30:17 AM PDT
Last Seen                     Thu 12 Aug 2010 03:30:17 AM PDT
Local ID                      9d3ed27c-a05f-4d01-a399-f29125337c7d
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1281609017.624:38391): avc:  denied  { read } for  pid=14496 comm="rndc" path="/root" dev=dm-3 ino=81921 scontext=system_u:system_r:ndc_t:s0 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1281609017.624:38391): arch=c000003e syscall=59 success=yes exit=0 a0=e503b0 a1=e50010 a2=e50680 a3=18 items=0 ppid=14493 pid=14496 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=29 comm="rndc" exe="/usr/sbin/rndc" subj=system_u:system_r:ndc_t:s0 key=(null)



Hash String generated from  leaks,rndc,ndc_t,admin_home_t,dir,read
audit2allow suggests:

#============= ndc_t ==============
allow ndc_t admin_home_t:dir read;

Comment 1 Wolfgang Rupprecht 2010-08-12 10:43:09 UTC
I believe this was the result of locally generated shell script run from cron.daily that ran a make(1) which among other things executed these commands:

install (list of files into /var/named/...)
rndc freeze
service named stop
service named start

bind version installed:

Name        : bind
Arch        : x86_64
Epoch       : 32
Version     : 9.7.1
Release     : 2.P2.fc13

Comment 2 Miroslav Grepl 2010-08-12 12:05:51 UTC
You can dont' audit it for now using

# grep ndc_t /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Comment 3 Miroslav Grepl 2010-08-13 06:00:25 UTC
Fixed in selinux-policy-3.7.19-47.fc13

Comment 4 Fedora Update System 2010-08-13 14:19:06 UTC
selinux-policy-3.7.19-47.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-47.fc13

Comment 5 Fedora Update System 2010-08-13 21:07:32 UTC
selinux-policy-3.7.19-47.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-47.fc13

Comment 6 Fedora Update System 2010-08-17 05:38:20 UTC
selinux-policy-3.7.19-47.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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