This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 491612 - SELinux is preventing iptables (iptables_t) "read write" unconfined_t.
SELinux is preventing iptables (iptables_t) "read write" unconfined_t.
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: ettercap (Show other bugs)
10
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-23 06:38 EDT by Digvijay Patankar
Modified: 2009-12-18 04:05 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-18 04:05:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Digvijay Patankar 2009-03-23 06:38:57 EDT
Description of problem:

Summary:

SELinux is preventing iptables (iptables_t) "read write" unconfined_t.

Detailed Description:

SELinux denied access requested by iptables. It is not expected that this access
is required by iptables 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://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                socket [ packet_socket ]
Source                        iptables
Source Path                   /sbin/iptables
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           iptables-1.4.1.1-2.fc10
Target RPM Packages           
Policy RPM                    selinux-policy-3.5.13-48.fc10
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain
                              2.6.27.19-170.2.35.fc10.i686 #1 SMP Mon Feb 23
                              13:21:22 EST 2009 i686 i686
Alert Count                   45
First Seen                    Mon 23 Mar 2009 01:15:05 PM IST
Last Seen                     Mon 23 Mar 2009 03:59:27 PM IST
Local ID                      a080941c-d107-4b4b-bb3d-c4b5d6700843
Line Numbers                  

Raw Audit Messages            

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39106]" dev=sockfs ino=39106 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=packet_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39107]" dev=sockfs ino=39107 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=rawip_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39109]" dev=sockfs ino=39109 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=packet_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39114]" dev=sockfs ino=39114 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39119]" dev=sockfs ino=39119 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39121]" dev=sockfs ino=39121 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39125]" dev=sockfs ino=39125 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39129]" dev=sockfs ino=39129 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39131]" dev=sockfs ino=39131 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39133]" dev=sockfs ino=39133 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39135]" dev=sockfs ino=39135 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=AVC msg=audit(1237804167.839:158): avc:  denied  { read write } for  pid=4962 comm="iptables" path="socket:[39137]" dev=sockfs ino=39137 scontext=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=localhost.localdomain type=SYSCALL msg=audit(1237804167.839:158): arch=40000003 syscall=11 success=yes exit=0 a0=bfa262d2 a1=9a608a8 a2=bfa26590 a3=bfa28c17 items=0 ppid=4948 pid=4962 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1 comm="iptables" exe="/sbin/iptables" subj=unconfined_u:unconfined_r:iptables_t:s0-s0:c0.c1023 key=(null)


Version-Release number of selected component (if applicable): 2.0.12


How reproducible: Dont know


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Daniel Walsh 2009-03-23 13:27:09 EDT
The tools that you are executing iptables under, is leaking file descriptors.

What tool are you running?  This tool needs the bug report.

You can ignore these avcs, as they will cause no harm, but should be cleaned up.
Comment 2 Digvijay Patankar 2009-03-24 02:03:27 EDT
I was using Ettercap NG 0.7.3

I removed the hashes from Linux part in "redir_command_on/off" section of file /etc/etter.conf

Now when I run the program ettercap it gives me this error.
Comment 3 Daniel Walsh 2009-03-24 10:31:38 EDT
ettercap should close all open file descriptors on exec

fcntl(fd, F_SETFD, FD_CLOEXEC)
Comment 4 Gwyn Ciesla 2009-03-24 10:50:30 EDT
I see two fctnl calls, one to get flags, one to set them.  Just add the two above to the setting call?
Comment 5 Gwyn Ciesla 2009-03-31 09:14:29 EDT
Ping? Daniel?
Comment 6 Daniel Walsh 2009-03-31 09:44:13 EDT
Yes.  I would figure that is all you need,  Whenever you open a descriptor you need to close on exec or the subprocess will inherit it.
Comment 7 Fedora Update System 2009-03-31 11:36:58 EDT
ettercap-0.7.3-32.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/ettercap-0.7.3-32.fc10
Comment 8 Gwyn Ciesla 2009-03-31 11:37:26 EDT
Please test the above build.
Comment 9 Digvijay Patankar 2009-03-31 14:09:15 EDT
Still the problem is unchanged. I still get the same error!
Comment 10 Gwyn Ciesla 2009-04-01 08:39:52 EDT
Daniel, suggestions?  Did I misform my patch?
Comment 11 Daniel Walsh 2009-04-01 15:14:12 EDT
Jon did you execute the fcntl on all sockets?
Comment 12 Gwyn Ciesla 2009-04-01 15:18:44 EDT
No, I simply altered one of the two existing fcntl calls, as in #4.
Comment 13 Fedora Update System 2009-04-02 13:21:49 EDT
ettercap-0.7.3-32.fc10 has been pushed to the Fedora 10 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 ettercap'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-3286
Comment 14 Gwyn Ciesla 2009-04-13 14:06:25 EDT
Any suggestions?
Comment 15 Gwyn Ciesla 2009-04-21 09:44:37 EDT
Daniel?
Comment 16 Daniel Walsh 2009-04-21 10:13:32 EDT
Jon, I don't understand the question.  Is ettercap still leaking descriptors?
Comment 17 Gwyn Ciesla 2009-04-21 10:24:48 EDT
The question is, if all I had to do to correct Digvijay's problem was to add the F_SETFD and FD_CLOEXEC flags to any fcntl calls, there were two, only one set attributes, so I added them there, and Digvijay still reports the problem, <takes breath> where do I look next?  Do I need to add the flags to the other fcntl call as well?
Comment 18 Daniel Walsh 2009-04-21 10:36:27 EDT
Any where you open a file descriptor that is still open at the time of the exec. This includes open call and the socket call.
Comment 19 Gwyn Ciesla 2009-04-21 10:52:00 EDT
So just both fctnl calls, or all fopen and it's ilk as well?
Comment 20 Daniel Walsh 2009-04-21 13:28:02 EDT
All fopen and socket calls.  If you don't call fclose before the exec of course.
Comment 21 Bug Zapper 2009-11-18 06:35:06 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  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 '10'.

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 10'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 10 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 23 Bug Zapper 2009-12-18 04:05:26 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 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.