Bug 680637

Summary: SELinux is preventing /sbin/mii-tool from read, write access on the file /var/lock/lmt-invoc.lock.
Product: [Fedora] Fedora Reporter: my_linux
Component: wireless-toolsAssignee: Dan Williams <dcbw>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: dcbw, dwalsh, linville, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:c67c447f3d77a525e01bb848a04e151c02f47c9ecd22cc15c02d57ce3ec4a081
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 16:45:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description my_linux 2011-02-26 15:50:45 UTC
SELinux is preventing /sbin/mii-tool from read, write access on the file /var/lock/lmt-invoc.lock.

*****  Plugin catchall (50.5 confidence) suggests  ***************************

If you believe that mii-tool should be allowed read write access on the lmt-invoc.lock file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep mii-tool /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

*****  Plugin leaks (50.5 confidence) suggests  ******************************

If you want to ignore mii-tool trying to read write access the lmt-invoc.lock file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /sbin/mii-tool /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:ifconfig_t:s0
Target Context                system_u:object_r:var_lock_t:s0
Target Objects                /var/lock/lmt-invoc.lock [ file ]
Source                        mii-tool
Source Path                   /sbin/mii-tool
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           wireless-tools-29-5.1.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.x86_64 #1 SMP
                              Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64
Alert Count                   7
First Seen                    Sat 26 Feb 2011 15:48:38 GMT
Last Seen                     Sat 26 Feb 2011 15:48:41 GMT
Local ID                      8f0a90eb-82b2-4a8f-bc93-6acb87729503

Raw Audit Messages
type=AVC msg=audit(1298735321.210:18): avc:  denied  { read write } for  pid=2114 comm="iwconfig" path="/var/lock/lmt-invoc.lock" dev=sda2 ino=5565 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file


type=SYSCALL msg=audit(1298735321.210:18): arch=x86_64 syscall=execve success=yes exit=0 a0=fec440 a1=fec770 a2=1011d70 a3=8 items=0 ppid=2113 pid=2114 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=iwconfig exe=/sbin/iwconfig subj=system_u:system_r:ifconfig_t:s0 key=(null)

Hash: mii-tool,ifconfig_t,var_lock_t,file,read,write

audit2allow

#============= ifconfig_t ==============
allow ifconfig_t var_lock_t:file { read write };

audit2allow -R

#============= ifconfig_t ==============
allow ifconfig_t var_lock_t:file { read write };

Comment 1 Miroslav Grepl 2011-02-27 22:40:07 UTC
You can dontaudit this by building custom policy.

# grep ifconfig_t /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp


mii-tool should close all open file descriptors on exec

fcntl(fd, F_SETFD, FD_CLOEXEC)

Comment 2 Fedora End Of Life 2012-08-16 16:45:47 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached 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, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

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