Bug 1319370 - SELinux is preventing /usr/bin/esmtp from 'read' accesses on the file /root/.esmtp_queue/ZOs0vFLQ/mail.
Summary: SELinux is preventing /usr/bin/esmtp from 'read' accesses on the file /root/....
Keywords:
Status: CLOSED DUPLICATE of bug 1366173
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4271d77dafbc5abd06b9924af51...
: 1366350 1368860 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-19 00:45 UTC by Andrew Cook
Modified: 2016-08-22 00:34 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-11 09:54:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrew Cook 2016-03-19 00:45:46 UTC
Description of problem:
SELinux is preventing /usr/bin/esmtp from 'read' accesses on the file /root/.esmtp_queue/ZOs0vFLQ/mail.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/root/.esmtp_queue/ZOs0vFLQ/mail default label should be mail_home_rw_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /root/.esmtp_queue/ZOs0vFLQ/mail

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that esmtp should be allowed read access on the mail file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep esmtp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_mail_t:s0-s0:c0.c1023
Target Context                system_u:object_r:admin_home_t:s0
Target Objects                /root/.esmtp_queue/ZOs0vFLQ/mail [ file ]
Source                        esmtp
Source Path                   /usr/bin/esmtp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           esmtp-1.2-2.fc24.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-178.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.0-0.rc7.git0.2.fc24.x86_64 #1
                              SMP Tue Mar 8 02:20:08 UTC 2016 x86_64 x86_64
Alert Count                   153
First Seen                    2016-03-17 00:00:06 AEDT
Last Seen                     2016-03-19 09:00:06 AEDT
Local ID                      caaf56ca-2ab5-44c2-a09c-3c19702efb63

Raw Audit Messages
type=AVC msg=audit(1458338406.771:2536): avc:  denied  { read } for  pid=12037 comm="esmtp" path="/root/.esmtp_queue/ZOs0vFLQ/mail" dev="sdc4" ino=2464062 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1458338406.771:2536): arch=x86_64 syscall=execve success=yes exit=0 a0=55983fd953a0 a1=55983fd96110 a2=55983fd80b10 a3=55983fd96110 items=2 ppid=11983 pid=12037 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=esmtp exe=/usr/bin/esmtp subj=system_u:system_r:system_mail_t:s0-s0:c0.c1023 key=(null)

type=CWD msg=audit(1458338406.771:2536): cwd=/root

type=PATH msg=audit(1458338406.771:2536): item=0 name=/usr/bin/esmtp inode=2447325 dev=00:26 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:sendmail_exec_t:s0 nametype=NORMAL

type=PATH msg=audit(1458338406.771:2536): item=1 name=/lib64/ld-linux-x86-64.so.2 inode=2259195 dev=00:26 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL

Hash: esmtp,system_mail_t,admin_home_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-178.fc24.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc7.git0.2.fc24.x86_64
type:           libreport

Potential duplicate: bug 828094

Comment 1 Lukas Vrabec 2016-03-29 22:40:59 UTC
*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/root/.esmtp_queue/ZOs0vFLQ/mail default label should be mail_home_rw_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /root/.esmtp_queue/ZOs0vFLQ/mail

Is it possible to reproduce this issue, even when you used restorecon? 

Thank you.

Comment 2 Sureyya Sahin 2016-07-25 16:08:51 UTC
Description of problem:
I started receiving this SELinux security alerts, esmtp is installed as a dependency and it seems the program is not doing well with selinux.

Version-Release number of selected component:
selinux-policy-3.13.1-191.5.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.4-301.fc24.x86_64
type:           libreport

Comment 3 Lukas Vrabec 2016-08-11 09:54:31 UTC

*** This bug has been marked as a duplicate of bug 1366173 ***

Comment 4 axl812 2016-08-11 17:54:34 UTC
*** Bug 1366350 has been marked as a duplicate of this bug. ***

Comment 5 Damon Hill 2016-08-22 00:34:04 UTC
*** Bug 1368860 has been marked as a duplicate of this bug. ***


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