Bug 607451 - SELinux is preventing /sbin/ifconfig access to a leaked /var/cfengine/outputs/cf_lap0048_210307_asenjo_nx_2010-06-23--23-20-22_1277328022 file descriptor.
Summary: SELinux is preventing /sbin/ifconfig access to a leaked /var/cfengine/outputs...
Status: CLOSED DUPLICATE of bug 505549
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy   
(Show other bugs)
Version: 13
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:b5a9621d548...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-24 06:25 UTC by Natxo Asenjo
Modified: 2010-06-28 12:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-28 12:39:36 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Natxo Asenjo 2010-06-24 06:25:40 UTC

SELinux is preventing /sbin/ifconfig access to a leaked
file descriptor.

Detailed Description:

[ifconfig has a permissive type (ifconfig_t). This access was not denied.]

SELinux denied access requested by the ifconfig command. It looks like this is
either a leaked descriptor or ifconfig 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
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

Additional Information:

Source Context                unconfined_u:system_r:ifconfig_t:s0
Target Context                unconfined_u:object_r:var_log_t:s0
Target Objects                /var/cfengine/outputs/cf_lap0048_210307_asenjo_nx_
                              2010-06-23--23-20-22_1277328022 [ file ]
Source                        ifconfig
Source Path                   /sbin/ifconfig
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           net-tools-1.60-102.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-23.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) #1
                              SMP Thu May 6 18:09:49 UTC 2010 x86_64 x86_64
Alert Count                   8
First Seen                    Wed 23 Jun 2010 09:00:19 PM CEST
Last Seen                     Wed 23 Jun 2010 11:20:23 PM CEST
Local ID                      e2c34be1-c7f0-4eb3-979d-be51b05ed7f7
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1277328023.40:66): avc:  denied  { write } for  pid=6772 comm="ifconfig" path="/var/cfengine/outputs/cf_lap0048_210307_asenjo_nx_2010-06-23--23-20-22_1277328022" dev=dm-0 ino=525630 scontext=unconfined_u:system_r:ifconfig_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1277328023.40:66): arch=c000003e syscall=59 success=yes exit=0 a0=7009a0 a1=24ccba0 a2=7fff236af080 a3=7fff236adc70 items=0 ppid=6714 pid=6772 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="ifconfig" exe="/sbin/ifconfig" subj=unconfined_u:system_r:ifconfig_t:s0 key=(null)

Hash String generated from  leaks,ifconfig,ifconfig_t,var_log_t,file,write
audit2allow suggests:

#============= ifconfig_t ==============
allow ifconfig_t var_log_t:file write;

Comment 1 Natxo Asenjo 2010-06-24 06:55:16 UTC
this happens when I install cfengine 2.10 from the fedora 13 repos on a workstation. This version of cfengine is on maintenance mode because cfengine3 is already out, so I do not think that backporting stuff like selinux will be possible.

How do I get rid of the warnings withouth turning selinux off?

Comment 2 Miroslav Grepl 2010-06-24 08:17:29 UTC
You can add a dontaudit policy to stop these avc's from happening

# grep ifconfig_t /var/log/audit/audit.log | audit2allow -D -M mycfengine
# semodule -i mycfengine.pp

We need a policy for cfengine.

Comment 3 Natxo Asenjo 2010-06-24 17:45:46 UTC
this has indeed stopped the messages. Can I apply this mycfengine.pp to any redhat based linux installation? Is there a way to verify that this has been applied? I ask this because I would like to apply it with (yes) cfengine, so I want to check if this is policy exists and if it does not, apply it.

Comment 4 Natxo Asenjo 2010-06-24 17:48:43 UTC
Forget my question, yes I now have read the fine manual and see that semodule -l gets me everything I need, I just need to filter its output to see mycfengine.


Comment 5 Daniel Walsh 2010-06-25 18:43:43 UTC
Miroslav, cfengine and puppet need pretty much the same access.  (Everything).

Comment 6 Miroslav Grepl 2010-06-28 12:39:36 UTC

*** This bug has been marked as a duplicate of bug 505549 ***

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