Bug 472883 - SElinux is denying sendmail access to uux
SElinux is denying sendmail access to uux
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-25 07:09 EST by Robert Vogelgesang
Modified: 2009-01-08 13:17 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-08 13:17:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Robert Vogelgesang 2008-11-25 07:09:12 EST
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):

How reproducible:

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 07:34:46 EST
Reassigning to selinux-policy as I guess it should be fixed there.
Comment 2 Daniel Walsh 2008-11-25 09:52:27 EST
What avc messages are you seeing?
Comment 3 Robert Vogelgesang 2008-11-25 10:18:16 EST
/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 10:55:46 EST
Ok I can add

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)
    type 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 12:28:15 EST
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 05:08:39 EST
Fixed in selinux-policy-3.3.1-116.fc9.noarch
Comment 7 Robert Vogelgesang 2009-01-08 13:17:21 EST
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.