Bug 608306 - SELinux is preventing /sbin/ifconfig access to a leaked /var/agns/fifo/agnLogd file descriptor.
SELinux is preventing /sbin/ifconfig access to a leaked /var/agns/fifo/agnLog...
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
13
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:da5f0d2d9aa...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-26 14:39 EDT by yyetim
Modified: 2010-06-29 04:43 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-29 04:43:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description yyetim 2010-06-26 14:39:19 EDT
Summary:

SELinux is preventing /sbin/ifconfig access to a leaked /var/agns/fifo/agnLogd
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
the /var/agns/fifo/agnLogd. 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:ifconfig_t:s0
Target Context                system_u:object_r:var_t:s0
Target Objects                /var/agns/fifo/agnLogd [ fifo_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-28.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.5-124.fc13.i686 #1 SMP
                              Fri Jun 11 09:48:40 UTC 2010 i686 i686
Alert Count                   28
First Seen                    Tue 22 Jun 2010 10:52:20 PM EDT
Last Seen                     Sat 26 Jun 2010 02:37:15 PM EDT
Local ID                      8f977131-1259-4522-aa6a-d8f54267c9b6
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1277577435.372:21556): avc:  denied  { write } for  pid=2339 comm="ifconfig" path="/var/agns/fifo/agnLogd" dev=sda2 ino=268674 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=fifo_file

node=(removed) type=AVC msg=audit(1277577435.372:21556): avc:  denied  { write } for  pid=2339 comm="ifconfig" path="/tmp/ConfigAGN.connect.sh.txt" dev=sda2 ino=156 scontext=system_u:system_r:ifconfig_t:s0 tcontext=unconfined_u:object_r:initrc_tmp_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1277577435.372:21556): avc:  denied  { write } for  pid=2339 comm="ifconfig" path="/tmp/ConfigAGN.connect.sh.txt" dev=sda2 ino=156 scontext=system_u:system_r:ifconfig_t:s0 tcontext=unconfined_u:object_r:initrc_tmp_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1277577435.372:21556): avc:  denied  { read write } for  pid=2339 comm="ifconfig" path="/tmp/NetVPN.txt" dev=sda2 ino=7867 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1277577435.372:21556): arch=40000003 syscall=11 success=yes exit=0 a0=8790a28 a1=87789c0 a2=8780c68 a3=87789c0 items=0 ppid=2338 pid=2339 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ifconfig" exe="/sbin/ifconfig" subj=system_u:system_r:ifconfig_t:s0 key=(null)



Hash String generated from  leaks,ifconfig,ifconfig_t,var_t,fifo_file,write
audit2allow suggests:

#============= ifconfig_t ==============
allow ifconfig_t initrc_tmp_t:file { write read };
allow ifconfig_t var_t:fifo_file write;
Comment 1 Miroslav Grepl 2010-06-28 04:49:38 EDT
Looks like local customization.  What created "/var/agns/fifo/agnLogd"?

Also what is your output of the following command

# ps -eZ | grep initrc
Comment 2 yyetim 2010-06-28 08:01:40 EDT
system_u:system_r:initrc_t:s0    1367 ?        00:00:00 agnLogd
system_u:system_r:initrc_t:s0    1398 ?        00:00:00 agnclientd
Comment 3 Miroslav Grepl 2010-06-28 12:31:01 EDT
Where does agnclientd come from? (and also agnLogd)
Comment 4 yyetim 2010-06-28 13:31:31 EDT
ftp://ftp.attglobal.net/pub/custom/ibm_linux/agnclient-1.0-2.0.1.3003.i386.rpm

they all come from that package. It can't be installed directly on fedora because it requires old libraries. I put the libraries manually and installed with --nodependends. I think that package is meant for RHEL. 

what can i do not to see that alert everytime i login?
Comment 5 Miroslav Grepl 2010-06-29 04:43:19 EDT
You can add your local SELinux policy using 

# grep avc /var/log/audit/audit.log | audit2allow -M myagnclient
# semodule -i myagnclient.pp

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