Bug 560122 - SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked unix_stream_socket file descriptor.
Summary: SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked unix_str...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:341c3e9eca4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-29 22:29 UTC by Sam
Modified: 2010-02-11 14:41 UTC (History)
2 users (show)

Fixed In Version: 3.6.32-84.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-11 14:41:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sam 2010-01-29 22:29:28 UTC
Summary:

SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked
unix_stream_socket file descriptor.

Detailed Description:

[sendmail has a permissive type (system_mail_t). This access was not denied.]

SELinux denied access requested by the sendmail command. It looks like this is
either a leaked descriptor or sendmail 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 unix_stream_socket. 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                system_u:system_r:system_mail_t:s0
Target Context                system_u:system_r:fail2ban_t:s0
Target Objects                unix_stream_socket [ unix_stream_socket ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.3-8.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-73.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31.12-174.2.3_1.cubbi_tuxonice.fc12.x86_64 #1
                              SMP Tue Jan 26 16:55:45 EST 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Fri 29 Jan 2010 05:25:11 PM EST
Last Seen                     Fri 29 Jan 2010 05:25:11 PM EST
Local ID                      1b0c0ec0-40d3-49ad-a01b-cd654f3a520e
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1264803911.849:7): avc:  denied  { read write } for  pid=1332 comm="sendmail" path="socket:[11848]" dev=sockfs ino=11848 scontext=system_u:system_r:system_mail_t:s0 tcontext=system_u:system_r:fail2ban_t:s0 tclass=unix_stream_socket

node=(removed) type=AVC msg=audit(1264803911.849:7): avc:  denied  { read write } for  pid=1332 comm="sendmail" path="socket:[11856]" dev=sockfs ino=11856 scontext=system_u:system_r:system_mail_t:s0 tcontext=system_u:system_r:fail2ban_t:s0 tclass=unix_dgram_socket

node=(removed) type=SYSCALL msg=audit(1264803911.849:7): arch=c000003e syscall=59 success=yes exit=0 a0=12f7510 a1=12f7a00 a2=12f7810 a3=28 items=0 ppid=1329 pid=1332 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=489 sgid=489 fsgid=489 tty=(none) ses=4294967295 comm="sendmail" exe="/usr/sbin/sendmail.sendmail" subj=system_u:system_r:system_mail_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-73.fc12,leaks,sendmail,system_mail_t,fail2ban_t,unix_stream_socket,read,write
audit2allow suggests:

#============= system_mail_t ==============
allow system_mail_t fail2ban_t:unix_dgram_socket { read write };
allow system_mail_t fail2ban_t:unix_stream_socket { read write };

Comment 1 Sam 2010-01-29 22:38:34 UTC
This alert was waiting for me when I logged in after bootup. Let me know if I can provide more information or do some testing.

Comment 2 Miroslav Grepl 2010-02-01 09:58:24 UTC
Dan,
I think we should add 

optional_policy(`
    fail2ban_dontaudit_leaks(system_mail_t)
')

Comment 3 Daniel Walsh 2010-02-01 20:49:37 UTC
Agreed.

Comment 4 Miroslav Grepl 2010-02-02 09:43:45 UTC
Fixed in selinux-policy-3.6.32-81.fc12

Comment 5 Fedora Update System 2010-02-03 23:19:48 UTC
selinux-policy-3.6.32-82.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-82.fc12

Comment 6 Fedora Update System 2010-02-05 01:43:47 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 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/F12/FEDORA-2010-1492

Comment 7 Fedora Update System 2010-02-11 14:36:29 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 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.