Bug 560205 - SELinux is preventing /usr/sbin/wpa_supplicant access to a leaked /var/log/wicd.log file descriptor.
Summary: SELinux is preventing /usr/sbin/wpa_supplicant access to a leaked /var/log/wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:e37acd2c486...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-30 10:40 UTC by ollie.t.jory
Modified: 2010-02-11 14:41 UTC (History)
2 users (show)

Fixed In Version: 3.6.32-84.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-11 14:41:28 UTC


Attachments (Terms of Use)

Description ollie.t.jory 2010-01-30 10:40:13 UTC
Summary:

SELinux is preventing /usr/sbin/wpa_supplicant access to a leaked
/var/log/wicd.log file descriptor.

Detailed Description:

[wpa_supplicant has a permissive type (NetworkManager_t). This access was not
denied.]

SELinux denied access requested by the wpa_supplicant command. It looks like
this is either a leaked descriptor or wpa_supplicant 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/log/wicd.log. 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:NetworkManager_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log/wicd.log [ file ]
Source                        wpa_supplicant
Source Path                   /usr/sbin/wpa_supplicant
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           wpa_supplicant-0.6.8-8.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-73.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.12-174.2.3.fc12.i686 #1 SMP Mon
                              Jan 18 20:22:46 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Sat 30 Jan 2010 04:27:36 GMT
Last Seen                     Sat 30 Jan 2010 10:33:32 GMT
Local ID                      96ac7f8b-0965-4683-a9e4-9ee554b4180a
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1264847612.835:6): avc:  denied  { write } for  pid=1170 comm="wpa_supplicant" path="/var/log/wicd.log" dev=sda1 ino=3796 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1264847612.835:6): arch=40000003 syscall=11 success=yes exit=0 a0=99e1760 a1=99e1510 a2=99e0738 a3=99e1510 items=0 ppid=1044 pid=1170 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="wpa_supplicant" exe="/usr/sbin/wpa_supplicant" subj=system_u:system_r:NetworkManager_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-73.fc12,leaks,wpa_supplicant,NetworkManager_t,var_log_t,file,write
audit2allow suggests:

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

Comment 1 Daniel Walsh 2010-02-01 16:56:06 UTC
SELinux expected this log file to be in /var/log/wicd which would have been labeled NetworkManager_var_run_t.

If you chcon -t NetworkManager_var_run_t /var/log/wicd.log

This will fix the problem.

Miroslav add the label

/var/log/wicd.* 			gen_context(system_u:object_r:NetworkManager_log_t,s0)

Comment 2 Miroslav Grepl 2010-02-01 16:59:19 UTC
Added to selinux-policy-3.6.32-80.fc12

Comment 3 Fedora Update System 2010-02-03 23:19:57 UTC
selinux-policy-3.6.32-82.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-82.fc12

Comment 4 Fedora Update System 2010-02-05 01:43:56 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 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/F12/FEDORA-2010-1492

Comment 5 Fedora Update System 2010-02-11 14:36:41 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 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.