Bug 244925

Summary: SELinux is preventing ifup-eth (udev_t) "write" to dhclient-eth1.conf (dhcp_etc_t).
Product: [Fedora] Fedora Reporter: Matthew Saltzman <mjs>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: notting
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-22 14:09:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Saltzman 2007-06-19 21:17:13 UTC
Description of problem:
Removing and reloading the ipw2200 kernel module with modprobe ipw2200 produces
SELinux troubleshooting reports similar to the summary, but involving various
actions (write, create, getattr, append, unlink) on dhclient-eth1.conf*. 

Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.6.4-14.fc7

How reproducible:
Always

Steps to Reproduce:
1. Configure wireless using NetworkManager, then stop NetworkManager.
2. rmmod ipw2200
3. insmod ipw2200
  
Actual results:
Troubleshooter pops up with the above message. 

Expected results:
No SELinux violations

Additional info:
The related raw audit messages are:

avc: denied { write } for comm="ifup-eth" dev=dm-0 egid=0 euid=0 exe="/bin/bash"
exit=0 fsgid=0 fsuid=0 gid=0 items=0 name="dhclient-eth1.conf" pid=11417
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:udev_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:dhcp_etc_t:s0 tty=(none) uid=0 

avc: denied { getattr } for comm="ifup-eth" dev=dm-0 egid=0 euid=0
exe="/bin/bash" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="dhclient-eth1.conf"
path="/etc/dhclient-eth1.conf" pid=16456
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:udev_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:dhcp_etc_t:s0 tty=(none) uid=0 

avc: denied { append } for comm="ifup-eth" dev=dm-0 egid=0 euid=0
exe="/bin/bash" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="dhclient-eth1.conf"
pid=16456 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:udev_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:dhcp_etc_t:s0 tty=(none) uid=0 

avc: denied { create } for comm="ifup-eth" dev=dm-0 egid=0 euid=0
exe="/bin/bash" exit=3 fsgid=0 fsuid=0 gid=0 items=0
name="dhclient-eth1.conf.ifupnew" pid=11468
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:udev_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:etc_t:s0 tty=(none) uid=0 

avc: denied { read } for comm="grep" dev=dm-0 egid=0 euid=0 exe="/bin/grep"
exit=3 fsgid=0 fsuid=0 gid=0 items=0 name="dhclient-eth1.conf" pid=11468
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:udev_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:dhcp_etc_t:s0 tty=(none) uid=0 

avc: denied { unlink } for comm="rm" dev=dm-0 egid=0 euid=0 exe="/bin/rm" exit=0
fsgid=0 fsuid=0 gid=0 items=0 name="dhclient-eth1.conf.ifupnew" pid=11470
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:udev_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:etc_t:s0 tty=(none) uid=0

Comment 1 Daniel Walsh 2007-06-20 12:02:20 UTC
Any idea why ifuo config scripts would be trying to rewrite these files?

Comment 2 Matthew Saltzman 2007-06-20 12:28:20 UTC
(In reply to comment #1)
> Any idea why ifuo config scripts would be trying to rewrite these files?

No, but the contents of the file are:

   send host-name "localhost.localdomain";  # temporary RHL ifup addition

The relevant section is in /etc/sysconfig/ifup-eth starting around line 147.


Comment 3 Bill Nottingham 2007-06-20 16:52:43 UTC
Exactly - it sets dhcp parameters that way.

Comment 4 Daniel Walsh 2007-06-22 16:01:05 UTC
Fixed in selinux-policy-2.6.4-22

Comment 5 Daniel Walsh 2007-08-22 14:09:34 UTC
Closing as fixes are in the current release