Bug 707151

Summary: SELinux is preventing /usr/bin/python "write" access on system-config-firewall.old.
Product: [Fedora] Fedora Reporter: Gerard Ribbink <info>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 13CC: dominick.grift, dwalsh, info, mgrepl, new2009.net
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:0ab36ef283d617526e8b3b16984df172736944dc3dce94c94e752d52cb40f17b
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-30 11:10:56 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 Gerard Ribbink 2011-05-24 08:36:01 UTC
Summary:

SELinux is preventing /usr/bin/python "write" access on
system-config-firewall.old.

Detailed Description:

SELinux denied access requested by system-config-f. It is not expected that this
access is required by system-config-f 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:firewallgui_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:etc_t:s0
Target Objects                system-config-firewall.old [ file ]
Source                        system-config-f
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.6.4-25.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-10.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.33.3-85.fc13.x86_64 #1 SMP Thu May 6 18:09:49
                              UTC 2010 x86_64 x86_64
Alert Count                   3
First Seen                    Tue 24 May 2011 10:24:21 AM EDT
Last Seen                     Tue 24 May 2011 10:29:32 AM EDT
Local ID                      48cab2a2-1370-40f3-8b80-0167b4b38446
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1306247372.485:39): avc:  denied  { write } for  pid=3272 comm="system-config-f" name="system-config-firewall.old" dev=dm-0 ino=91119 scontext=system_u:system_r:firewallgui_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1306247372.485:39): arch=c000003e syscall=2 success=no exit=-13 a0=a16e20 a1=241 a2=1b6 a3=0 items=0 ppid=1 pid=3272 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="system-config-f" exe="/usr/bin/python" subj=system_u:system_r:firewallgui_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,system-config-f,firewallgui_t,etc_t,file,write
audit2allow suggests:

#============= firewallgui_t ==============
allow firewallgui_t etc_t:file write;

Comment 1 Dominick Grift 2011-05-24 08:50:51 UTC
restorecon -v /etc/sysconfig/system-config-firewall.old should reset the type of the file from etc_t to system_conf_t, to which system-config-firewall should be able to write.

Any idea how /etc/sysconfig/system-config-firewall.old may have gotten to be mislabeled in the first place? Have you copied (cp /etc/sysconfig/system-config-firewall /etc/sysconfig/system-config-firewall.old) manually?

What do the following commands return ( sesearch command is part of setools-console package)

sesearch --allow -SC -s firewallgui_t -t etc_t -T | grep system_conf_t
matchpatchcon /etc/sysconfig/system-config-firewall.test

Comment 2 Dominick Grift 2011-05-24 08:51:42 UTC
Err.. i meant: matchpathcon /etc/sysconfig/system-config-firewall.test

Comment 3 Miroslav Grepl 2011-05-24 11:30:16 UTC
Gerard,
have you run system-config-firewall from terminal as root?

Comment 4 Bug Zapper 2011-05-30 10:30:51 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  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 '13'.

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 13'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 13 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 5 Miroslav Grepl 2011-05-30 11:10:56 UTC
(In reply to comment #3)
> Gerard,
> have you run system-config-firewall from terminal as root?

I believe you started it this way and it caused this mislabeled file.