Bug 1305758 - SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr/sbin/ssmtp.
Summary: SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c524843c4af30fb88ed50724dae...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-09 07:31 UTC by Raman Gupta
Modified: 2017-08-08 12:45 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 12:45:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Raman Gupta 2016-02-09 07:31:16 UTC
Description of problem:
Opened a PDF file on a samba share from a virtual machine. I have no idea why samba is opening /usr/bin/ssmtp and /usr/bin/wodim. I have reported these before on earlier Fedora versions with no resolution.
SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr/sbin/ssmtp.

*****  Plugin samba_share (75.5 confidence) suggests   ***********************

If you want to allow smbd to have getattr access on the ssmtp file
Then you need to change the label on '/usr/sbin/ssmtp'
Do
# semanage fcontext -a -t samba_share_t '/usr/sbin/ssmtp'
# restorecon  -v '/usr/sbin/ssmtp'

*****  Plugin catchall_boolean (12.2 confidence) suggests   ******************

If you want to allow samba to share any file/directory read only.
Then you must tell SELinux about this by enabling the 'samba_export_all_ro' boolean.
You can read 'None' man page for more details.
Do
setsebool -P samba_export_all_ro 1

*****  Plugin catchall_boolean (12.2 confidence) suggests   ******************

If you want to allow samba to share any file/directory read/write.
Then you must tell SELinux about this by enabling the 'samba_export_all_rw' boolean.
You can read 'None' man page for more details.
Do
setsebool -P samba_export_all_rw 1

*****  Plugin catchall (1.97 confidence) suggests   **************************

If you believe that smbd should be allowed getattr access on the ssmtp 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 smbd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:smbd_t:s0
Target Context                system_u:object_r:sendmail_exec_t:s0
Target Objects                /usr/sbin/ssmtp [ file ]
Source                        smbd
Source Path                   /usr/sbin/smbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-4.3.4-1.fc23.x86_64
Target RPM Packages           ssmtp-2.64-15.fc23.x86_64
Policy RPM                    selinux-policy-3.13.1-158.2.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.3.3-303.fc23.x86_64 #1 SMP Tue
                              Jan 19 18:31:55 UTC 2016 x86_64 x86_64
Alert Count                   6
First Seen                    2016-02-09 02:25:20 EST
Last Seen                     2016-02-09 02:25:20 EST
Local ID                      bccab205-135e-4004-923c-9d13dc3e4c14

Raw Audit Messages
type=AVC msg=audit(1455002720.413:69412): avc:  denied  { getattr } for  pid=3470 comm="smbd" path="/usr/sbin/ssmtp" dev="dm-0" ino=925074 scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:sendmail_exec_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1455002720.413:69412): arch=x86_64 syscall=stat success=no exit=EACCES a0=5597260a8260 a1=7ffcd5b0d840 a2=7ffcd5b0d840 a3=5597260a81f0 items=0 ppid=3396 pid=3470 auid=4294967295 uid=1000 gid=0 euid=1000 suid=0 fsuid=1000 egid=1000 sgid=0 fsgid=1000 tty=(none) ses=4294967295 comm=smbd exe=/usr/sbin/smbd subj=system_u:system_r:smbd_t:s0 key=(null)

Hash: smbd,smbd_t,sendmail_exec_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-158.2.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.3.3-303.fc23.x86_64
type:           libreport

Potential duplicate: bug 858739

Comment 1 Raman Gupta 2016-02-09 07:32:40 UTC
/usr/bin/ssmtp is not shared in my smb.conf and I see no reason why opening a PDF file in Adobe Acrobat inside the VM would cause this access.

Comment 2 Lukas Vrabec 2016-02-09 09:42:34 UTC
Samba folks, 
Could you check this issue? Do you know whats going on? 

Thank you.

Comment 3 Sumit Bose 2016-02-09 10:01:27 UTC
Please provide samba log files with 'log level = 10' from the time the issue is happening. See https://www.samba.org/~asn/reporting_samba_bugs.txt for details.

Comment 4 Raman Gupta 2016-06-01 13:10:11 UTC
(In reply to Sumit Bose from comment #3)
> Please provide samba log files with 'log level = 10' from the time the issue
> is happening. See https://www.samba.org/~asn/reporting_samba_bugs.txt for
> details.

I am attempting to do so, but the issue does not occur consistently (or even frequently) and the samba logging at level 10 is massive, so I can't keep it on all the time. Other suggestions are welcome.

Comment 5 Raman Gupta 2016-09-12 23:47:22 UTC
I have a log at level 10 from the time the issue is happening. It contains private information -- where can I send it?

Comment 6 Raman Gupta 2016-10-21 15:13:48 UTC
Ping.

Comment 7 Fedora End Of Life 2016-11-24 15:28:09 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Raman Gupta 2016-11-24 15:32:10 UTC
Still have this issue on Fedora 24. Still waiting for someone to accept the logs for debugging.

Comment 10 Fedora End Of Life 2017-07-25 19:54:32 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2017-08-08 12:45:19 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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