Bug 472883 - SElinux is denying sendmail access to uux
Summary: SElinux is denying sendmail access to uux
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-25 12:09 UTC by Robert Vogelgesang
Modified: 2009-01-08 18:17 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-01-08 18:17:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robert Vogelgesang 2008-11-25 12:09:12 UTC
Description of problem:
SElinux is denying sendmail access to uux when sendmail is configured to use
an uucp mailer.

Version-Release number of selected component (if applicable):
sendmail-8.14.2-4.fc9
uucp-1.07-17.fc9
selinux-policy-3.3.1-107.fc9

How reproducible:
always

Steps to Reproduce:
1. configure sendmail to use an uucp mailer
2. send mail that should be transported via the uucp mailer
3. observe failure
  
Actual results:
Mail fails and gets bounced back to sender.

Expected results:
Mail should be transported via uucp to next-hop MTA.


Additional info:
The uucp mailer was added to sendmail.cf by adding "MAILER(uucp)" to sendmail.mc and using m4 with the "standard" sendmail-cf-8.14.2-4.fc9.i386 package.

Comment 1 Ondrej Vasik 2008-11-25 12:34:46 UTC
Reassigning to selinux-policy as I guess it should be fixed there.

Comment 2 Daniel Walsh 2008-11-25 14:52:27 UTC
What avc messages are you seeing?

Comment 3 Robert Vogelgesang 2008-11-25 15:18:16 UTC
/var/log/audit/audit.log shows:

type=AVC msg=audit(1227613116.899:1248): avc:  denied  { getattr } for  pid=6851 comm="sendmail" path="/usr/bin/uux" dev=sda3 ino=66987 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:uux_exec_t:s0 tclass=file

type=AVC msg=audit(1227613116.919:1249): avc:  denied  { execute } for  pid=6851 comm="sendmail" name="uux" dev=sda3 ino=66987 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:uux_exec_t:s0 tclass=file

There are similar entries in /var/log/messages, generated by setroubleshoot.
If these, or the "translations" by sealert, should be helpful, I'm happy to provide them as well.

Comment 4 Daniel Walsh 2008-11-25 15:55:46 UTC
Ok I can add

optional_policy(`
	uucp_domtrans_uux(sendmail_t)
')
to policy which will allow sendmail to start up the uux program.  It might cause other avc's.

Cab you create a file (myuux.te) with the following

#========================================================
policy_module(myuux, 1.0)
gen_require(`
    type sendmail_t;
')
uucp_domtrans_uux(sendmail_t)
#=========================================================

Then compile it and install it with the command

# make -f /usr/share/selinux/devel/Makefile
# semodule -i myuux.pp

Then try so send mail via uux again

Comment 5 Robert Vogelgesang 2008-11-25 17:28:15 UTC
The make command you gave missed a "myuux.pp" at its end...

With this new policy module the mail transfer succeeded, but there was another avc:

type=AVC msg=audit(1227630135.315:1353): avc:  denied  { read } for  pid=7222 comm="uux" path="/var/spool/mqueue/dfmAPGMFpq007219" dev=sda9 ino=204425 scontext=system_u:system_r:uux_t:s0 tcontext=system_u:object_r:mqueue_spool_t:s0 tclass=file

Receiving mails via uucp worked fine, without any avc's or other problems.

Comment 6 Miroslav Grepl 2008-12-15 10:08:39 UTC
Fixed in selinux-policy-3.3.1-116.fc9.noarch

Comment 7 Robert Vogelgesang 2009-01-08 18:17:21 UTC
Yes, I can confirm that selinux-policy-3.3.1-116.fc9.noarch fixes this issue.


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