Bug 630032 - SELinux is preventing /bin/rm "remove_name" access on KOr7Iz.
Summary: SELinux is preventing /bin/rm "remove_name" access on KOr7Iz.
Keywords:
Status: CLOSED WONTFIX
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:c1e33303a61...
: 627466 630033 630035 630036 630038 630039 630040 630041 630043 630044 630045 630046 630048 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-03 15:19 UTC by Walter
Modified: 2010-12-03 12:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-03 12:37:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
.png screen shot of error list. (86.37 KB, image/png)
2010-11-03 16:28 UTC, Walter
no flags Details

Description Walter 2010-09-03 15:19:29 UTC
Summary:

SELinux is preventing /bin/rm "remove_name" access on KOr7Iz.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by rm. It is not expected that this access is
required by rm and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:hotplug_t:s0
Target Context                system_u:object_r:tmp_t:s0
Target Objects                KOr7Iz [ dir ]
Source                        rm
Source Path                   /bin/rm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-7.6-11.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-121.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.21-166.fc12.i686 #1
                              SMP Fri Aug 27 06:55:23 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Fri 03 Sep 2010 10:14:31 AM CDT
Last Seen                     Fri 03 Sep 2010 10:14:31 AM CDT
Local ID                      51b97003-8e1a-4e1f-a94a-cb73d039642e
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1283526871.735:21): avc:  denied  { remove_name } for  pid=1556 comm="rm" name="KOr7Iz" dev=dm-0 ino=344066 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1283526871.735:21): avc:  denied  { unlink } for  pid=1556 comm="rm" name="KOr7Iz" dev=dm-0 ino=344066 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1283526871.735:21): arch=40000003 syscall=301 success=yes exit=0 a0=ffffff9c a1=bfdf9ec8 a2=0 a3=2 items=0 ppid=1225 pid=1556 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rm" exe="/bin/rm" subj=system_u:system_r:hotplug_t:s0 key=(null)



Hash String generated from  catchall,rm,hotplug_t,tmp_t,dir,remove_name
audit2allow suggests:

#============= hotplug_t ==============
allow hotplug_t tmp_t:dir remove_name;
allow hotplug_t tmp_t:file unlink;

Comment 1 Daniel Walsh 2010-09-03 19:31:47 UTC
*** Bug 630033 has been marked as a duplicate of this bug. ***

Comment 2 Daniel Walsh 2010-09-03 19:31:56 UTC
*** Bug 630035 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Walsh 2010-09-03 19:32:03 UTC
*** Bug 630036 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2010-09-03 19:32:09 UTC
*** Bug 630038 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Walsh 2010-09-03 19:32:30 UTC
*** Bug 630039 has been marked as a duplicate of this bug. ***

Comment 6 Daniel Walsh 2010-09-03 19:32:38 UTC
*** Bug 630040 has been marked as a duplicate of this bug. ***

Comment 7 Daniel Walsh 2010-09-03 19:32:58 UTC
*** Bug 630041 has been marked as a duplicate of this bug. ***

Comment 8 Daniel Walsh 2010-09-03 19:33:23 UTC
*** Bug 630045 has been marked as a duplicate of this bug. ***

Comment 9 Daniel Walsh 2010-09-03 19:33:40 UTC
*** Bug 630044 has been marked as a duplicate of this bug. ***

Comment 10 Daniel Walsh 2010-09-03 19:33:50 UTC
*** Bug 630043 has been marked as a duplicate of this bug. ***

Comment 11 Daniel Walsh 2010-09-03 19:36:22 UTC
This and all the bugs closed as dups looks like hotplug was executing dhclient.

Miroslav make sure F12 has

optional_policy(`
	sysnet_domtrans_dhcpc(hotplug_t)
	sysnet_signal_dhcpc(hotplug_t)
	sysnet_kill_dhcpc(hotplug_t)
	sysnet_signull_dhcpc(hotplug_t)
	sysnet_sigstop_dhcpc(hotplug_t)
	sysnet_sigchld_dhcpc(hotplug_t)
	sysnet_read_dhcpc_pid(hotplug_t)
	sysnet_rw_dhcp_config(hotplug_t)
	sysnet_domtrans_ifconfig(hotplug_t)
	sysnet_signal_ifconfig(hotplug_t)
')

Nee

Comment 12 Daniel Walsh 2010-09-03 19:36:58 UTC
*** Bug 630046 has been marked as a duplicate of this bug. ***

Comment 13 Daniel Walsh 2010-09-03 19:37:14 UTC
*** Bug 630048 has been marked as a duplicate of this bug. ***

Comment 14 Miroslav Grepl 2010-10-01 06:00:33 UTC
Walter,
could you make sure dhclient is labeled correctly and add your outputs of following commands

# ls -Z /sbin/dhclient

# matchpathcon /sbin/dhclient

# sesearch -A -s hotplug_t -t dhcpc_t -c process -p transition

Comment 15 Miroslav Grepl 2010-10-01 06:03:59 UTC
*** Bug 627466 has been marked as a duplicate of this bug. ***

Comment 16 Walter 2010-10-01 22:04:47 UTC
Here is the information you requested.



# ls -Z /sbin/dhclient

-rwxr-xr-x. root root system_u:object_r:dhcpc_exec_t:s0 /sbin/dhclient



# matchpathcon /sbin/dhclient

/sbin/dhclient	system_u:object_r:dhcpc_exec_t:s0



# sesearch -A -s hotplug_t -t dhcpc_t -c process -p transition

Found 1 semantic av rules:
   allow hotplug_t dhcpc_t : process { transition sigchld sigkill sigstop signull signal } ;

Comment 17 Walter 2010-10-05 21:26:00 UTC
Just did a full manual YUM UPDATE on my system.  For some reason the scheduled update was not running.  After rebooting, all 14 of these errors re-occurred.

is there anything else I need to provide to assist with diagnosis?

Comment 18 Walter 2010-10-06 01:02:23 UTC
Here is the list of all 15 errors I receive after reboot.  

SELinux is preventing /bin/cp "create" access on resolv.conf.save
SELinux is preventing /bin/mktemp "write" access on /tmp
SELinux is preventing /bin/bash "append" access on SHg5dg
SELinux is preventing /bin/bash "gettattr" access on /tmp/SHg5dg
SELinux is preventing /bin/cp "setfscreate" access .
SELinux is preventing /bin/cp "relabelfrom" access on resolv.conf.save
SELinux is preventing /bin/cp "write" access on resolv.conf.save
SELinux is preventing /bin/cp "setattr" access on resolv.conf.save
SELinux is preventing /bin/bash "gettattr" access on  /sbin/setfiles
SELinux is preventing /bin/bash "execute" access on /sbin/setfiles
SELinux is preventing /sbin/setfiles "read open" access on /sbin/setfiles
SELinux is preventing /sbin/setfiles "search" access on /etc/selinux/targeted/contexts
SELinux is preventing /sbin/setfiles "read" access on /etc/selinux/targeted/contexts/files/file_contexts
SELinux is preventing /sbin/setfiles "getattr" access on /etc/selinux/targeted/contexts/files/file_contexts
SELinux is preventing /bin/rm "remove_name" access on SHg5dg

Comment 19 Daniel Walsh 2010-10-06 12:48:03 UTC
Please send me the raw avc messages


ausearch -m avc -ts recent

Comment 20 Walter 2010-10-07 12:25:39 UTC
Here is the information you requested:


# ausearch -m avc -ts recent
----
time->Thu Oct  7 07:20:49 2010
type=SYSCALL msg=audit(1286454049.779:268): arch=40000003 syscall=195 success=yes exit=0 a0=8801058 a1=bfb3a0d8 a2=c37ff4 a3=1 items=0 ppid=22498 pid=22511 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ifdown-ipv6" exe="/bin/bash" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454049.779:268): avc:  denied  { getattr } for  pid=22511 comm="ifdown-ipv6" path="/proc/22511/net/if_inet6" dev=proc ino=4026532293 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:proc_net_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.168:269): arch=40000003 syscall=301 success=yes exit=0 a0=ffffff9c a1=bf84beb9 a2=0 a3=2 items=0 ppid=22498 pid=22585 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rm" exe="/bin/rm" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.168:269): avc:  denied  { unlink } for  pid=22585 comm="rm" name="dhclient-eth0.pid" dev=dm-0 ino=5234828 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:dhcpc_var_run_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.263:270): arch=40000003 syscall=5 success=yes exit=3 a0=9fb83f8 a1=8241 a2=1b6 a3=241 items=0 ppid=22606 pid=22614 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ifdown-post" exe="/bin/bash" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.263:270): avc:  denied  { write } for  pid=22614 comm="ifdown-post" name="resolv.conf" dev=dm-0 ino=5269725 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:net_conf_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.264:271): arch=40000003 syscall=195 success=yes exit=0 a0=9fb57a8 a1=bf89c7fc a2=c37ff4 a3=9fb57a8 items=0 ppid=22498 pid=22606 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ifdown-post" exe="/bin/bash" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.264:271): avc:  denied  { getattr } for  pid=22606 comm="ifdown-post" path="/sbin/setfiles" dev=dm-0 ino=1065112 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.264:272): arch=40000003 syscall=33 success=yes exit=0 a0=9fb57a8 a1=1 a2=c37ff4 a3=9fb57a8 items=0 ppid=22498 pid=22606 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ifdown-post" exe="/bin/bash" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.264:272): avc:  denied  { execute } for  pid=22606 comm="ifdown-post" name="setfiles" dev=dm-0 ino=1065112 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.264:273): arch=40000003 syscall=11 success=yes exit=0 a0=9fb84c0 a1=9fb8550 a2=9fb7f30 a3=9fb8550 items=0 ppid=22606 pid=22615 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="restorecon" exe="/sbin/setfiles" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.264:273): avc:  denied  { execute_no_trans } for  pid=22615 comm="ifdown-post" path="/sbin/setfiles" dev=dm-0 ino=1065112 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file
type=AVC msg=audit(1286454050.264:273): avc:  denied  { read open } for  pid=22615 comm="ifdown-post" name="setfiles" dev=dm-0 ino=1065112 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:setfiles_exec_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.270:274): arch=40000003 syscall=5 success=no exit=-2 a0=23ea7c8 a1=8000 a2=1b6 a3=8a58c0 items=0 ppid=22606 pid=22615 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="restorecon" exe="/sbin/setfiles" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.270:274): avc:  denied  { search } for  pid=22615 comm="restorecon" name="files" dev=dm-0 ino=5268459 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:file_context_t:s0 tclass=dir
type=AVC msg=audit(1286454050.270:274): avc:  denied  { search } for  pid=22615 comm="restorecon" name="contexts" dev=dm-0 ino=5268453 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:default_context_t:s0 tclass=dir
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.270:275): arch=40000003 syscall=5 success=yes exit=4 a0=23ea198 a1=8000 a2=1b6 a3=8a58c0 items=0 ppid=22606 pid=22615 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="restorecon" exe="/sbin/setfiles" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.270:275): avc:  denied  { open } for  pid=22615 comm="restorecon" name="file_contexts" dev=dm-0 ino=5270262 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:file_context_t:s0 tclass=file
type=AVC msg=audit(1286454050.270:275): avc:  denied  { read } for  pid=22615 comm="restorecon" name="file_contexts" dev=dm-0 ino=5270262 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:file_context_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.270:276): arch=40000003 syscall=197 success=yes exit=0 a0=4 a1=bffbfd20 a2=281ff4 a3=23ea198 items=0 ppid=22606 pid=22615 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="restorecon" exe="/sbin/setfiles" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.270:276): avc:  denied  { getattr } for  pid=22615 comm="restorecon" path="/etc/selinux/targeted/contexts/files/file_contexts" dev=dm-0 ino=5270262 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:file_context_t:s0 tclass=file
----
time->Thu Oct  7 07:20:50 2010
type=SYSCALL msg=audit(1286454050.413:277): arch=40000003 syscall=301 success=yes exit=0 a0=ffffff9c a1=bff70ebe a2=0 a3=2 items=0 ppid=22606 pid=22617 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rm" exe="/bin/rm" subj=system_u:system_r:hotplug_t:s0 key=(null)
type=AVC msg=audit(1286454050.413:277): avc:  denied  { unlink } for  pid=22617 comm="rm" name="resolv.conf.save" dev=dm-0 ino=5268751 scontext=system_u:system_r:hotplug_t:s0 tcontext=system_u:object_r:net_conf_t:s0 tclass=file

Comment 21 Daniel Walsh 2010-10-07 12:46:30 UTC
Do you know if hotplug is executing the ifup and ifdown scripts directly, not using dhclient?

Are you using a special tool to bring up the network?

Comment 22 Walter 2010-10-12 16:41:40 UTC
No special tools.  This is a fairly generic Fedora 12 clone with very little change even to the basic configuration.  no changes and no mods and fully updated.

Comment 23 Walter 2010-11-02 13:40:51 UTC
This series of 14 errors is still occurring every time I reboot or just log off and log back on.

Comment 24 Daniel Walsh 2010-11-02 18:56:40 UTC
Could you try 

yum -y reinstall selinux-policy-targeted

And tell me if you see any errors?

Comment 25 Bug Zapper 2010-11-03 10:26:56 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 26 Walter 2010-11-03 16:14:46 UTC
I ran the reinstall and didn;t see any erors during the install.  I will reboot shortly to see if this resolved the issue.


# yum -y reinstall selinux-policy-targeted
Loaded plugins: auto-update-debuginfo, dellsysidplugin2, presto, refresh-
              : packagekit
Setting up Reinstall Process
Found 36 installed debuginfo package(s)
Enabling fedora-debuginfo: Fedora 12 - i386 - Debug
Reading repository metadata in from local files
Enabling rpmfusion-nonfree-debuginfo: RPM Fusion for Fedora 12 - Nonfree - Debug
Reading repository metadata in from local files
Enabling rpmfusion-free-updates-debuginfo: RPM Fusion for Fedora 12 - Free - Updates Debug
Reading repository metadata in from local files
Enabling rpmfusion-free-debuginfo: RPM Fusion for Fedora 12 - Free - Debug
Reading repository metadata in from local files
Enabling updates-debuginfo: Fedora 12 - i386 - Updates - Debug
Reading repository metadata in from local files
Enabling rpmfusion-nonfree-updates-debuginfo: RPM Fusion for Fedora 12 - Nonfree - Updates Debug
Reading repository metadata in from local files
Resolving Dependencies
--> Running transaction check
---> Package selinux-policy-targeted.noarch 0:3.6.32-125.fc12 set to be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch       Version               Repository   Size
================================================================================
Reinstalling:
 selinux-policy-targeted     noarch     3.6.32-125.fc12       updates     2.1 M

Transaction Summary
================================================================================
Reinstall     1 Package(s)

Total download size: 2.1 M
Installed size: 2.4 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta                                      | 275 kB     00:00     
Processing delta metadata
Package(s) data still to download: 2.1 M
selinux-policy-targeted-3.6.32-125.fc12.noarch.rpm       | 2.1 MB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : selinux-policy-targeted-3.6.32-125.fc12.noarch           1/1 

Installed:
  selinux-policy-targeted.noarch 0:3.6.32-125.fc12                              

Complete!

Comment 27 Walter 2010-11-03 16:28:16 UTC
Created attachment 457491 [details]
.png screen shot of error list.

This is a screen shot of the errors I am getting on login.

Comment 28 Fedora Admin XMLRPC Client 2010-11-08 21:47:56 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 29 Daniel Walsh 2010-11-09 13:56:56 UTC
Walter, we believe you, we just don't know why you are the only one seeing this.

Are you planning to update to F13 or F14 soon?  Since F12 is going a way at the end of the month?

Comment 30 Walter 2010-11-09 16:53:34 UTC
I am planning to update but I ned to be sure that my lexmark pro205 is supported before I do.  Last upgrade caused a great deal of 'consternation' as I upgraded from 9 to 12 and lexmark only suported 10 and 11.

Comment 31 Bug Zapper 2010-12-03 12:37:16 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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