Bug 456085 - Denials after switching to Postfix
Denials after switching to Postfix
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-21 09:58 EDT by Adam Huffman
Modified: 2009-06-10 06:41 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-10 06:41:32 EDT
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 Adam Huffman 2008-07-21 09:58:05 EDT
Description of problem:
Recently I have switched to Postfix from Sendmail on a particular machine.  Now
I see denials whenever there are incoming messages:


Summary:

SELinux is preventing sendmail (sendmail_t) "read" to ./postdrop
(postfix_postdrop_exec_t).

Detailed Description:

SELinux denied access requested by sendmail. It is not expected that this access
is required by sendmail 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:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for ./postdrop,

restorecon -v './postdrop'

If this does not work, there is currently no automatic way to allow this access.
Instead, 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                system_u:system_r:sendmail_t
Target Context                system_u:object_r:postfix_postdrop_exec_t
Target Objects                ./postdrop [ file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.postfix
Port                          <Unknown>
Host                          saintloup.smith.man.ac.uk
Source RPM Packages           postfix-2.5.1-2.fc9
Target RPM Packages           
Policy RPM                    selinux-policy-3.3.1-78.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall_file
Host Name                     saintloup.smith.man.ac.uk
Platform                      Linux saintloup.smith.man.ac.uk
                              2.6.25.10-86.fc9.x86_64 #1 SMP Mon Jul 7 20:23:46
                              EDT 2008 x86_64 x86_64
Alert Count                   23
First Seen                    Thu 17 Jul 2008 10:35:29 BST
Last Seen                     Mon 21 Jul 2008 14:51:51 BST
Local ID                      d68c7277-2e77-4809-9ea3-d86e0aafd81a
Line Numbers                  

Raw Audit Messages            

host=saintloup.smith.man.ac.uk type=AVC msg=audit(1216648311.207:8947859): avc:
 denied  { read } for  pid=29140 comm="sendmail" name="postdrop" dev=dm-4
ino=1114546 scontext=system_u:system_r:sendmail_t:s0
tcontext=system_u:object_r:postfix_postdrop_exec_t:s0 tclass=file

host=saintloup.smith.man.ac.uk type=SYSCALL msg=audit(1216648311.207:8947859):
arch=c000003e syscall=59 success=no exit=-13 a0=7fd192d21420 a1=7fd192d20bb0
a2=7fd192d20b30 a3=7fff99cac1c0 items=0 ppid=29136 pid=29140 auid=4294967295
uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500
tty=(none) ses=4294967295 comm="sendmail" exe="/usr/sbin/sendmail.postfix"
subj=system_u:system_r:sendmail_t:s0 key=(null)

I did generate my own module to fix this with audit2allow, but perhaps it needs
to be fixed properly?

There is also another denial happening at the same time:


Summary:

SELinux is preventing sendmail (sendmail_t) "read write" to anon_inode
(anon_inodefs_t).

Detailed Description:

SELinux denied access requested by sendmail. It is not expected that this access
is required by sendmail 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:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for anon_inode,

restorecon -v 'anon_inode'

If this does not work, there is currently no automatic way to allow this access.
Instead, 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                system_u:system_r:sendmail_t
Target Context                system_u:object_r:anon_inodefs_t
Target Objects                anon_inode [ file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.postfix
Port                          <Unknown>
Host                          saintloup.smith.man.ac.uk
Source RPM Packages           postfix-2.5.1-2.fc9
Target RPM Packages           
Policy RPM                    selinux-policy-3.3.1-78.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall_file
Host Name                     saintloup.smith.man.ac.uk
Platform                      Linux saintloup.smith.man.ac.uk
                              2.6.25.10-86.fc9.x86_64 #1 SMP Mon Jul 7 20:23:46
                              EDT 2008 x86_64 x86_64
Alert Count                   23
First Seen                    Thu 17 Jul 2008 10:35:29 BST
Last Seen                     Mon 21 Jul 2008 14:51:51 BST
Local ID                      6e5157aa-9289-4171-8fff-49f0a9ad9599
Line Numbers                  

Raw Audit Messages            

host=saintloup.smith.man.ac.uk type=AVC msg=audit(1216648311.201:8947858): avc:
 denied  { read write } for  pid=29136 comm="sendmail"
path="anon_inode:[eventpoll]" dev=anon_inodefs ino=14
scontext=system_u:system_r:sendmail_t:s0
tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file

host=saintloup.smith.man.ac.uk type=AVC msg=audit(1216648311.201:8947858): avc:
 denied  { read write } for  pid=29136 comm="sendmail"
path="anon_inode:[eventpoll]" dev=anon_inodefs ino=14
scontext=system_u:system_r:sendmail_t:s0
tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file

host=saintloup.smith.man.ac.uk type=SYSCALL msg=audit(1216648311.201:8947858):
arch=c000003e syscall=59 success=yes exit=0 a0=1f732e0 a1=1f75710 a2=1f74510
a3=8 items=0 ppid=1 pid=29136 auid=4294967295 uid=500 gid=500 euid=500 suid=500
fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm="sendmail"
exe="/usr/sbin/sendmail.postfix" subj=system_u:system_r:sendmail_t:s0 key=(null)




Version-Release number of selected component (if applicable):
selinux-policy-3.3.1-78.fc9.noarch

How reproducible:


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


Expected results:


Additional info:
Comment 1 Daniel Walsh 2008-08-01 11:08:33 EDT
The second avc's are fixed.  What does your postdrop local policy look like?
Comment 2 Adam Huffman 2008-08-04 08:58:03 EDT
Here's postdrop.te:

module postdrop 1.0;

require {
        type sendmail_t;
        type postfix_postdrop_exec_t;
        class file execute;
}
require {
        type sendmail_t;
        type postfix_postdrop_exec_t;
        class file execute;
}

#============= sendmail_t ==============
allow sendmail_t postfix_postdrop_exec_t:file execute;

as generated by audit2allow.
Comment 3 Adam Huffman 2008-08-04 09:03:39 EDT
Still seeing these AVCs after applying the latest updates this morning:

host=saintloup.smith.man.ac.uk type=AVC msg=audit(1217852839.177:627): avc: denied { read write } for pid=7398 comm="sendmail" path="anon_inode:[eventpoll]" dev=anon_inodefs ino=14 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file host=saintloup.smith.man.ac.uk type=AVC msg=audit(1217852839.177:627): avc: denied { read write } for pid=7398 comm="sendmail" path="anon_inode:[eventpoll]" dev=anon_inodefs ino=14 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file host=saintloup.smith.man.ac.uk type=SYSCALL msg=audit(1217852839.177:627): arch=c000003e syscall=59 success=yes exit=0 a0=1bec2e0 a1=1bee6f0 a2=1bed520 a3=8 items=0 ppid=7387 pid=7398 auid=4294967295 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm="sendmail" exe="/usr/sbin/sendmail.postfix" subj=system_u:system_r:sendmail_t:s0 key=(null)
Comment 4 Daniel Walsh 2008-08-04 15:35:26 EDT
Do you have more then one file in /etc/selinux/targeted/policy?

If so delete the lower version, and execute load_policy.  See if this fixes the problem.
Comment 5 Adam Huffman 2008-08-05 13:31:24 EDT
Yes, there were two files - one ending in .21 and one in .23.  I deleted the .21 file and ran load_policy.

The errors are still there, sadly:


Summary:

SELinux is preventing sendmail (sendmail_t) "read write" to anon_inode
(anon_inodefs_t).

Detailed Description:

SELinux denied access requested by sendmail. It is not expected that this access
is required by sendmail 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:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for anon_inode,

restorecon -v 'anon_inode'

If this does not work, there is currently no automatic way to allow this access.
Instead, 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                system_u:system_r:sendmail_t
Target Context                system_u:object_r:anon_inodefs_t
Target Objects                anon_inode [ file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.postfix
Port                          <Unknown>
Host                          saintloup.smith.man.ac.uk
Source RPM Packages           postfix-2.5.1-2.fc9
Target RPM Packages           
Policy RPM                    selinux-policy-3.3.1-79.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall_file
Host Name                     saintloup.smith.man.ac.uk
Platform                      Linux saintloup.smith.man.ac.uk
                              2.6.25.11-97.fc9.x86_64 #1 SMP Mon Jul 21 01:09:10
                              EDT 2008 x86_64 x86_64
Alert Count                   100
First Seen                    Thu 17 Jul 2008 10:35:29 BST
Last Seen                     Tue 05 Aug 2008 17:11:28 BST
Local ID                      6e5157aa-9289-4171-8fff-49f0a9ad9599
Line Numbers                  

Raw Audit Messages            

host=saintloup.smith.man.ac.uk type=AVC msg=audit(1217952688.820:2972): avc:  denied  { read write } for  pid=27010 comm="sendmail" path="anon_inode:[eventpoll]" dev=anon_inodefs ino=14 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file

host=saintloup.smith.man.ac.uk type=AVC msg=audit(1217952688.820:2972): avc:  denied  { read write } for  pid=27010 comm="sendmail" path="anon_inode:[eventpoll]" dev=anon_inodefs ino=14 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file

host=saintloup.smith.man.ac.uk type=SYSCALL msg=audit(1217952688.820:2972): arch=c000003e syscall=59 success=yes exit=0 a0=e102e0 a1=e12720 a2=e11520 a3=8 items=0 ppid=1 pid=27010 auid=4294967295 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm="sendmail" exe="/usr/sbin/sendmail.postfix" subj=system_u:system_r:sendmail_t:s0 key=(null)
Comment 6 Daniel Walsh 2008-08-05 17:06:59 EDT
Can you update to selinux-policy-3.3.1-82?
Comment 7 Adam Huffman 2008-08-06 10:41:20 EDT
Have done so and that seems to have fixed the 'anon_inode' errors.  Does it include a fix for the postdrop errors too?
Comment 8 Daniel Walsh 2008-08-08 11:06:54 EDT
I am not sure do you have an AVC that matches this problem?
Comment 9 Adam Huffman 2008-08-11 07:01:29 EDT
host=saintloup.smith.man.ac.uk type=AVC msg=audit(1218446991.926:11714): avc:  denied  { read } for  pid=12582 comm="sendmail" name="postdrop" dev=dm-4 ino=1114546 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:postfix_postdrop_exec_t:s0 tclass=file

host=saintloup.smith.man.ac.uk type=SYSCALL msg=audit(1218446991.926:11714): arch=c000003e syscall=59 success=no exit=-13 a0=7fc795e5c420 a1=7fc795e5bb90 a2=7fc795e5bb10 a3=7fff9c3e7900 items=0 ppid=12577 pid=12582 auid=4294967295 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm="sendmail" exe="/usr/sbin/sendmail.postfix" subj=system_u:system_r:sendmail_t:s0 key=(null)
Comment 10 Daniel Walsh 2008-08-12 10:22:07 EDT
# audit2allow -M mypol -l -i /var/log/audit/audit.log
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-85.fc9.noarch
Comment 11 Adam Huffman 2008-09-24 12:54:07 EDT
Running selinux-policy-3.3.1-87.fc9.noarch and still seeing this.
Comment 12 Daniel Walsh 2008-09-26 08:06:01 EDT
Well it is definitely fixed in
selinux-policy-3.3.1-91.fc9.noarch
Comment 13 Adam Huffman 2008-10-21 10:51:31 EDT
Running selinux-policy-3.3.1-99.fc9.noarch and still seeing the following:


Summary:

SELinux is preventing postdrop (postfix_postdrop_t) "read write" to socket
(sendmail_t).

Detailed Description:

SELinux denied access requested by postdrop. It is not expected that this access
is required by postdrop 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                system_u:system_r:postfix_postdrop_t
Target Context                system_u:system_r:sendmail_t
Target Objects                socket [ unix_stream_socket ]
Source                        postdrop
Source Path                   /usr/sbin/postdrop
Port                          <Unknown>
Host                          
Source RPM Packages           postfix-2.5.5-1.fc9
Target RPM Packages           
Policy RPM                    selinux-policy-3.3.1-99.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     
Platform                      Linux 
                              2.6.26.5-45.fc9.x86_64 #1 SMP Sat Sep 20 03:23:12
                              EDT 2008 x86_64 x86_64
Alert Count                   98
First Seen                    Thu 25 Sep 2008 15:01:51 BST
Last Seen                     Tue 21 Oct 2008 14:55:18 BST
Local ID                      51d8edc0-2cbd-43fd-8d8b-4e8fce23ef45
Line Numbers                  

Raw Audit Messages            

host= type=AVC msg=audit(1224597318.801:6424): avc:  denied  { read write } for  pid=19264 comm="postdrop" path="socket:[9955410]" dev=sockfs ino=9955410 scontext=system_u:system_r:postfix_postdrop_t:s0 tcontext=system_u:system_r:sendmail_t:s0 tclass=unix_stream_socket

host= type=AVC msg=audit(1224597318.801:6424): avc:  denied  { read write } for  pid=19264 comm="postdrop" path="socket:[9955410]" dev=sockfs ino=9955410 scontext=system_u:system_r:postfix_postdrop_t:s0 tcontext=system_u:system_r:sendmail_t:s0 tclass=unix_stream_socket

host= type=AVC msg=audit(1224597318.801:6424): avc:  denied  { append } for  pid=19264 comm="postdrop" path="/home/adam/procmail.log" dev=dm-1 ino=6622947 scontext=system_u:system_r:postfix_postdrop_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

host= type=SYSCALL msg=audit(1224597318.801:6424): arch=c000003e syscall=59 success=yes exit=0 a0=7f35bfd74c20 a1=7f35bfd743e0 a2=7f35bfd74360 a3=7fffc6f0f3f0 items=0 ppid=19263 pid=19264 auid=4294967295 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=90 sgid=90 fsgid=90 tty=(none) ses=4294967295 comm="postdrop" exe="/usr/sbin/postdrop" subj=system_u:system_r:postfix_postdrop_t:s0 key=(null)
Comment 14 Daniel Walsh 2008-10-21 11:24:17 EDT
host= type=AVC msg=audit(1224597318.801:6424): avc:  denied  { append } for 
pid=19264 comm="postdrop" path="/home/adam/procmail.log" dev=dm-1 ino=6622947
scontext=system_u:system_r:postfix_postdrop_t:s0
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


This is a local customization.  You need to add this via local policy or you might be able to change your script to something like

postdrop | cat > /home/adam/procmail.log

You can allow this for now.

# audit2allow -M mypol -l -i /var/log/audit/audit.log
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-104.fc9.noarch
Comment 15 Bug Zapper 2009-06-09 22:09:58 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  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 '9'.

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 9'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 9 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

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