selinux-policy-targeted-2.6.4-49.fc7 blocking httpd from sendmail.postfix
by Robert C. Auch
I just installed a Fedora Core 7 box, ran yum update yesterday, and installed php5 and apache 2.2.6. SELinux is in Enforcing mode, and is blocking PHP's mail() function from sending:
Nov 2 11:05:41 webserver setroubleshoot: SELinux is preventing the sh from using potentially mislabeled files sendmail.postfix (sendmail_exec_t). For complete SELinux messages. run sealert -l c9001c48-5d48-4b7c-9fd7-8400544daa8f
sealert says:
Source Context user_u:system_r:httpd_t
Target Context system_u:object_r:sendmail_exec_t
Target Objects /usr/sbin/sendmail.postfix [ file ]
Affected RPM Packages postfix-2.4.3-2.fc7 [target]
Policy RPM selinux-policy-2.6.4-48.fc7
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name plugins.httpd_bad_labels
If I follow sealert's suggestion and "chcon -t httpd_sys_content_t /usr/sbin/sendmail.postfix", then I get the following (expected to me) errors in /var/log/messages on "service postfix restart":
Nov 2 13:38:25 $(server) setroubleshoot: SELinux is preventing postfix-script (postfix_master_t) "getattr" to /usr/sbin/sendmail.postfix (httpd_sys_content_t). For complete SELinux messages. run sealert -l b8bea1cd-10eb-40bc-8d5b-2031b5bceabe
According to this post: https://www.redhat.com/archives/fedora-selinux-list/2004-December/msg0003..., this problem has been seen before and was fixed in selinux-policy-targeted-1.19.8-1. Has that fix been lost, or am I seeing something new?
Thanks,
Robert Auch
16 years, 5 months
Another problem with "avc: denied" messages
by Ian Leonard
Hi,
I have a web app that will create xml files. It has been running for a
while now but has suddenly started giving errors as per below (I guess a
maintenance update did it).
audit(1193660948.194:421): avc: denied { write } for pid=3358
comm="eco_upload.cgi" name="2007-10.xml" dev=dm-0 ino=58753075
scontext=system_u:system_r:httpd_t:s0
tcontext=user_u:object_r:var_lib_t:s0 tclass=file
My minimal selinux knowledge has allowed me to fix the problem with the
file, but a new files is created once a month. I am guessing that next
month I will have the same problem.
I guess I need to do something to the cgi script to allow it to create
the files.
Any advice appreciated.
--
Ian Leonard
Please ignore spelling and punctuation - I did.
16 years, 6 months
unconfined_execmem_t transitions to unconfined_t
by Tom London
Running latest rawhide, targeted/enforcing.
Are there any issues allowing transition from 'unconfined_execmem_t'
to 'unconfined_t'?
/usr/bin/valgrind is 'unconfined_execmem_exec_t', so running
'valgrind system-config-users' or
'PYTHONPATH=/usr/share/system-config-users valgrind /usr/bin/python
/usr/share/system-config-users/system-config-users.py'
produces:
Summary
SELinux is preventing userhelper (unconfined_execmem_t) "transition" to
/usr/share/system-config-users/system-config-users (unconfined_t).
Detailed Description
SELinux denied access requested by userhelper. It is not expected that this
access is required by userhelper 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
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 http://bugzilla.redhat.com/bugzilla/enter_bug.cgi
against this package.
Additional Information
Source Context system_u:system_r:unconfined_execmem_t
Target Context system_u:system_r:unconfined_t
Target Objects /usr/share/system-config-users/system-config-users
[ process ]
Affected RPM Packages system-config-users-1.2.72-1.fc8 [target]
Policy RPM selinux-policy-3.0.8-40.fc8
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name plugins.catchall
Host Name localhost.localdomain
Platform Linux localhost.localdomain 2.6.23.1-41.fc8 #1 SMP
Mon Oct 29 18:29:15 EDT 2007 i686 i686
Alert Count 2
First Seen Tue 30 Oct 2007 07:08:40 AM PDT
Last Seen Tue 30 Oct 2007 07:09:35 AM PDT
Local ID c1b26ecd-2d55-4e55-85bd-46f718634fce
Line Numbers
Raw Audit Messages
avc: denied { transition } for comm=userhelper dev=dm-0 path=/usr/share/system-
config-users/system-config-users pid=5742
scontext=system_u:system_r:unconfined_execmem_t:s0 tclass=process
tcontext=system_u:system_r:unconfined_t:s0
--
Tom London
16 years, 6 months