Bug 1565953 - SELinux is preventing systemd-logind from 'getattr' accesses on the file /dev/shm/sem.com.sophos.av.process.exclusion.
Summary: SELinux is preventing systemd-logind from 'getattr' accesses on the file /dev...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Unspecified
medium
low
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:06792b7dfe1e4a2cbe2df373025...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-11 07:23 UTC by ricky.tigg
Modified: 2019-05-29 00:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-29 00:01:20 UTC
Type: ---


Attachments (Terms of Use)
Audit log of it. (35.61 KB, text/plain)
2018-11-11 10:19 UTC, Frank Büttner
no flags Details

Description ricky.tigg 2018-04-11 07:23:56 UTC
Description of problem:
Sophos is a third-part software antivirus for Linux systems.
SELinux is preventing systemd-logind from 'getattr' accesses on the file /dev/shm/sem.com.sophos.av.process.exclusion.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd-logind should be allowed getattr access on the sem.com.sophos.av.process.exclusion 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:
# ausearch -c 'systemd-logind' --raw | audit2allow -M my-systemdlogind
# semodule -X 300 -i my-systemdlogind.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:tmpfs_t:s0
Target Objects                /dev/shm/sem.com.sophos.av.process.exclusion [
                              file ]
Source                        systemd-logind
Source Path                   systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-19.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.0-300.fc28.x86_64 #1 SMP Tue
                              Apr 3 03:44:37 UTC 2018 x86_64 x86_64
Alert Count                   18
First Seen                    2018-04-05 11:25:56 CEST
Last Seen                     2018-04-10 15:19:47 CEST
Local ID                      3f972eef-e7a9-4f55-ba21-e1d75d7d43ca

Raw Audit Messages
type=AVC msg=audit(1523366387.913:1917): avc:  denied  { getattr } for  pid=863 comm="systemd-logind" path="/dev/shm/sem.com.sophos.av.process.exclusion" dev="tmpfs" ino=34066 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file permissive=0


Hash: systemd-logind,systemd_logind_t,tmpfs_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.14.1-19.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.4
hashmarkername: setroubleshoot
kernel:         4.16.0-300.fc28.x86_64
type:           libreport

Potential duplicate: bug 1190461

Comment 1 Lukas Vrabec 2018-04-15 12:51:17 UTC
Hi, 

Sophos is third party software, please create local SELinux policy to make it working: 

# dnf install selinux-policy-devel -y

# cat sophos.te
module sophos 1.0;

require {
	type systemd_logind_t;
	type tmpfs_t;
	class file getattr;
}

#============= systemd_logind_t ==============
allow systemd_logind_t tmpfs_t:file getattr;

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

Thanks,
Lukas.

Comment 2 ricky.tigg 2018-04-21 20:04:18 UTC
Description of problem:
Antivirus is installed


Additional info:
reporter:       libreport-2.9.4
hashmarkername: setroubleshoot
kernel:         4.16.2-300.fc28.x86_64
type:           libreport

Comment 3 ricky.tigg 2018-04-21 20:45:00 UTC
Description of problem:
Stand-alone Sophos antivirus is installed.


Additional info:
reporter:       libreport-2.9.4
hashmarkername: setroubleshoot
kernel:         4.16.2-300.fc28.x86_64
type:           libreport

Comment 4 ricky.tigg 2018-04-26 10:07:03 UTC
Hi. #Comment 1 was remained unnoticed from me. Program was installed at /opt/sophos-av/. I got an unexpected output:

[root@localhost ~]# cat sophos.te
cat: sophos.te: No such file or directory

Comment 5 Frank Büttner 2018-11-11 10:03:17 UTC
Description of problem:
Let the bareos-fd/bareos-sd run.

Version-Release number of selected component:
selinux-policy-3.14.1-48.fc28.noarch

Additional info:
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.18.17-200.fc28.x86_64
type:           libreport

Comment 6 Frank Büttner 2018-11-11 10:04:21 UTC
It will not only happens with Sophos.

Comment 7 Frank Büttner 2018-11-11 10:12:19 UTC
In my case it will happens when the bareos director open an ssh connection to an KVM host (which run's with fedora) to start vm's via sudo virsh-

Comment 8 Frank Büttner 2018-11-11 10:19:48 UTC
Created attachment 1504341 [details]
Audit log of it.

Comment 9 Ving B Jr 2018-11-29 02:37:57 UTC
Description of problem:
This happened after installing Sophos anti-virus. The deamon is not able to start.

Version-Release number of selected component:
selinux-policy-3.14.1-48.fc28.noarch

Additional info:
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.19.3-200.fc28.x86_64
type:           libreport

Comment 10 Lukas Vrabec 2018-12-19 15:30:22 UTC
Hi All,

Could somebody reproduce it in permissive mode? 

Thanks,
Lukas.

Comment 11 Ben Cotton 2019-05-02 19:35:07 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. 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 '28'.

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 28 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 12 Ben Cotton 2019-05-29 00:01:20 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 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.