Bug 603387 - SELinux is preventing /sbin/iptables-multi access to a leaked /var/log/psad/psad.iptout file descriptor.
Summary: SELinux is preventing /sbin/iptables-multi access to a leaked /var/log/psad/p...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:121a723ceda...
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-12 19:46 UTC by Optional
Modified: 2010-11-06 06:49 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-07-06 17:08:36 UTC


Attachments (Terms of Use)

Description Optional 2010-06-12 19:46:41 UTC
Summary:

SELinux is preventing /sbin/iptables-multi access to a leaked
/var/log/psad/psad.iptout file descriptor.

Detailed Description:

[iptables has a permissive type (iptables_t). This access was not denied.]

SELinux denied access requested by the iptables command. It looks like this is
either a leaked descriptor or iptables output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
the /var/log/psad/psad.iptout. You should generate a bugzilla on selinux-policy,
and it will get routed to the appropriate package. You can safely ignore this
avc.

Allowing Access:

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

Additional Information:

Source Context                unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:object_r:psad_var_log_t:s0
Target Objects                /var/log/psad/psad.iptout [ file ]
Source                        iptables
Source Path                   /sbin/iptables-multi
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iptables-1.4.7-2.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-23.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux notebook-norm 2.6.33.5-112.fc13.i686.PAE #1
                              SMP Thu May 27 02:56:20 UTC 2010 i686 i686
Alert Count                   6
First Seen                    Sat 12 Jun 2010 12:32:56 PM PDT
Last Seen                     Sat 12 Jun 2010 12:32:56 PM PDT
Local ID                      80270f16-2636-4389-89a7-2ca21ea48936
Line Numbers                  

Raw Audit Messages            

node=notebook-norm type=AVC msg=audit(1276371176.494:83): avc:  denied  { write } for  pid=4825 comm="iptables" path="/var/log/psad/psad.iptout" dev=dm-0 ino=786566 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:psad_var_log_t:s0 tclass=file

node=notebook-norm type=AVC msg=audit(1276371176.494:83): avc:  denied  { write } for  pid=4825 comm="iptables" path="/var/log/psad/psad.ipterr" dev=dm-0 ino=790714 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:psad_var_log_t:s0 tclass=file

node=notebook-norm type=SYSCALL msg=audit(1276371176.494:83): arch=40000003 syscall=11 success=yes exit=0 a0=86dbf40 a1=86dc1c8 a2=86dab48 a3=86dc1c8 items=0 ppid=4824 pid=4825 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="iptables" exe="/sbin/iptables-multi" subj=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  leaks,iptables,iptables_t,psad_var_log_t,file,write
audit2allow suggests:

#============= iptables_t ==============
allow iptables_t psad_var_log_t:file write;

Comment 1 Daniel Walsh 2010-06-16 17:13:07 UTC
Miroslav add

	psad_write_log(iptables_t)
########################################
## <summary>
##	Allow the specified domain to write to psad's log files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
## <rolecap/>
#
interface(`psad_write_log',`
	gen_require(`
		type psad_var_log_t;
	')

	logging_search_logs($1)
	write_files_pattern($1, psad_var_log_t, psad_var_log_t)
')

Comment 2 Miroslav Grepl 2010-06-16 20:26:16 UTC
Fixed in selinux-policy-3.7.19-30.fc13

Comment 3 Fedora Update System 2010-06-30 19:54:17 UTC
selinux-policy-3.7.19-33.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 4 Fedora Update System 2010-07-01 18:48:07 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 5 Fedora Update System 2010-07-06 17:06:34 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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