Bug 1780336 - SELinux is preventing exim from execute_no_trans access on the file /usr/sbin/deliver.
Summary: SELinux is preventing exim from execute_no_trans access on the file /usr/sbin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-05 17:29 UTC by Фукидид
Modified: 2024-09-09 18:28 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.14.4-44.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-21 01:38:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Фукидид 2019-12-05 17:29:34 UTC
Description of problem: SELinux is preventing exim from execute_no_trans access on the file /usr/sbin/deliver.

Version-Release number of selected component (if applicable):
cyrus-imapd-3.0.11-1.fc31.x86_64
exim-4.92.3-1.fc31.x86_64
selinux-policy-3.14.4-40.fc31.x86_64

How reproducible: always.

Steps to Reproduce:
1. Configure the delivery transport in exim.conf:
lmtp_delivery:
  home_directory = /var/spool/imap
  driver = lmtp
  command = "/usr/lib/cyrus-imapd/deliver -l"
  batch_max = 20
  user = cyrus
2. Send a letter to be delivered by this transport.

Actual results: type=AVC msg=audit(1575561979.386:7947): avc: denied { execute_no_trans } for pid=28600 comm="exim" path="/usr/sbin/deliver" dev="mmcblk0p3" ino=26652 scontext=system_u:system_r:exim_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=0

Expected results: mail is delivered to the local recipient.

Additional info:

$ ls -laZ /usr/lib/cyrus-imapd/deliver
lrwxrwxrwx. 1 root root system_u:object_r:lib_t:s0 18 Jul 30 23:08 /usr/lib/cyrus-imapd/deliver -> ../../sbin/deliver

$ ls -laZ /usr/sbin/deliver
-rwxr-xr-x. 1 root root system_u:object_r:bin_t:s0 41504 Jul 30 23:08 /usr/sbin/deliver

ls -laZ /usr/sbin/exim
-rwsr-xr-x. 1 root root system_u:object_r:exim_exec_t:s0 1307196 Sep 30 14:28 /usr/sbin/exim

Comment 1 Фукидид 2019-12-06 19:15:39 UTC
At startup
$ sudo exim -bd -q15m -d+all
everything works fine.

Comment 2 Lukas Vrabec 2019-12-09 09:55:41 UTC
Hi Айфф, 

So is it working for you fine? Could we close the bug? 

Thanks,
Lukas

Comment 3 Фукидид 2019-12-09 19:19:00 UTC
No, it doesn't work, I had to create new rules through audit2allow and semodule.

Comment 4 Lukas Vrabec 2020-01-10 12:11:35 UTC
    Allow exim to execute bin_t without domain trans
    
    Allow exim_t - Mail transfer agent, to execute generic programs in system bin directories (/bin, /sbin, /usr/bin,/usr/sbin) a without domain transition.

Comment 5 Фукидид 2020-01-11 21:11:18 UTC
It seems to me that giving exim access to all these directories is not a good idea.

Comment 6 Lukas Vrabec 2020-01-11 22:04:43 UTC
In these directories are binary files installed via rpm packages. We allowed only executing these binaries but there will be domain transition to another (e.g: more loose) SELinux domain. This operation is quite usual.

Comment 7 Fedora Update System 2020-01-14 01:43:36 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-397eea28b7

Comment 8 Fedora Update System 2020-01-21 01:38:48 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 LeroyGonzalez 2024-09-06 09:04:44 UTC Comment hidden (spam)
Comment 10 WillieGrimm 2024-09-06 13:26:07 UTC Comment hidden (spam)

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