Bug 195838 - selinux-policy-targeted stops wpa_supplicant from reading certificates
selinux-policy-targeted stops wpa_supplicant from reading certificates
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-18 10:48 EDT by James
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-21 20:56:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description James 2006-06-18 10:48:54 EDT
Description of problem:
selinux-policy-targeted seems to prevent wpa_supplicant from accessing SSL
certificate files from somewhere in /etc/pki or in a user's $HOME. This prevents
association with EAP-TLS. See the log excerpt below.

Version-Release number of selected component (if applicable):
NetworkManager-0.6.2-2.fc5
selinux-policy-targeted-2.2.43-4.fc5
wpa_supplicant-0.4.8-10.fc5

How reproducible:
Always.

Steps to Reproduce:
1. Set SELinux enforcing.
2. [Re]Start NetworkManager.
3. Attempt to associate.
  
Actual results:
From the logs:

Jun 18 15:29:13 harmony kernel: audit(1150640953.494:107): avc:  denied  {
search } for  pid=4741 comm="wpa_supplicant" name="home" dev=dm-0 ino=4611265
scontext=user_u:system_r:NetworkManager_t:s0
tcontext=system_u:object_r:home_root_t:s0 tclass=dir
Jun 18 15:29:13 harmony kernel: audit(1150640953.494:108): avc:  denied  {
search } for  pid=4741 comm="wpa_supplicant" name="home" dev=dm-0 ino=4611265
scontext=user_u:system_r:NetworkManager_t:s0
tcontext=system_u:object_r:home_root_t:s0 tclass=dir

Expected results:
wpa_supplicant is allowed to read the certificates.
Comment 1 James 2006-06-18 10:50:48 EDT
I forgot to add that I see this when wpa_supplicant is launched by
NetworkManager, and NetworkManager is started as a service via the /etc/init.d
mechanism. If I run /usr/sbin/NetworkManager --no-daemon (with SELinux enforcing
enabled), everything works fine.
Comment 2 Daniel Walsh 2006-06-18 11:56:27 EDT
This indicates that wpa-supplicant is trying to read the homedirectory?

IE It is being denied a search of /home 
Comment 3 James 2006-06-18 12:03:42 EDT
The certificates are in $HOME/pki/. I get something similar if I put them
"system-wide", e.g. in /etc/pki/wireless/; in that case, name="home" is replaced
with name="pki". Since each user may configure different certificates with
nm-applet, I would think that wpa_supplicant should be able to read these areas.
Comment 4 Daniel Walsh 2006-06-19 10:21:29 EDT
You mean cert correct?  If you put them in /etc/pki/wireless, they should be
labeled cert_t and I will change NetworkManager policy to be able to read cert_t
files,

You can do this yourself by executing the following.
put the cert files in /etc/pki/wireless

restorecon -R -v /etc/pki

Run network manager to generate avc messages

grep cert_t /var/log/message | audit2allow -M wpa

semodule -i wpa.pp

This should update the policy to allow NetworkManager to read certificate files.
Comment 5 James 2006-06-19 13:32:26 EDT
Thanks, that worked.

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