Bug 1473999

Summary: SELinux is preventing abrt-action-gen from 'read' accesses on the file libmono.so.
Product: [Fedora] Fedora Reporter: Arsenii <aib-rf4>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: avv.marengoni, dominick.grift, dwalsh, gbonnema, lsm5, lukasz.dorau, lvrabec, mgrepl, peacengell, plautrba, pmoore, ruudolfs.strazdins, ssekidde, vilmos.nagy
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:0d4b16fec1fe238c628f34fb2fb8a61368b1120a7b046f5c20704c0a55364440;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-16 12:26:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arsenii 2017-07-23 00:29:32 UTC
Description of problem:
SELinux is preventing abrt-action-gen from 'read' accesses on the file libmono.so.

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

If вы считаете, что abrt-action-gen следует разрешить доступ read к libmono.so file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
allow this access for now by executing:
# ausearch -c 'abrt-action-gen' --raw | audit2allow -M my-abrtactiongen
# semodule -X 300 -i my-abrtactiongen.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:unlabeled_t:s0
Target Objects                libmono.so [ file ]
Source                        abrt-action-gen
Source Path                   abrt-action-gen
Port                          <Неизвестно>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-260.1.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.10-300.fc26.x86_64 #1 SMP Wed
                              Jul 12 17:05:39 UTC 2017 x86_64 x86_64
Alert Count                   20
First Seen                    2017-07-23 03:27:44 MSK
Last Seen                     2017-07-23 03:27:44 MSK
Local ID                      aff6aeb0-1d4d-44d3-9bc6-84b50d78f4cd

Raw Audit Messages
type=AVC msg=audit(1500769664.582:351): avc:  denied  { read } for  pid=11961 comm="eu-unstrip" name="libmono.so" dev="dm-4" ino=31719549 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:unlabeled_t:s0 tclass=file permissive=0


Hash: abrt-action-gen,abrt_t,unlabeled_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-260.1.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.10-300.fc26.x86_64
type:           libreport

Potential duplicate: bug 1240604

Comment 1 A.J. Bonnema 2017-09-13 04:53:49 UTC
Description of problem:
This kind of se alert happens a lot. Especially when I am compiling small example programs or programs of a project I create.
I develop in C using either make or the autotools.

I cannot fathom what I am doing wrong to cause these SE alerts. The previous one was not abrt, but eu-unstrip iirc.

It looks like the cause is creating an executable with proper chmod attributes, but improper SE linux attributes. 
I do not know what to change to get this right.

Version-Release number of selected component:
selinux-policy-3.13.1-260.8.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.9-300.fc26.x86_64
type:           libreport

Comment 2 Vilmos Nagy 2017-11-11 14:54:12 UTC
Description of problem:
I was playing Black Mesa, and it crashed.

Version-Release number of selected component:
selinux-policy-3.13.1-260.13.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.5-200.fc26.x86_64
type:           libreport

Comment 3 Lukas Vrabec 2017-11-16 12:26:18 UTC
Hi, 

It looks like your system is mislabeled, could you please run: 

# restorecon -Rv / 

To fix labels on your system? 

Closing this BZ as NOATBUG, if you still facing this issue after relabel, feel free to re-open this BZ. 

Thanks,
Lukas.