Bug 1278983 - SELinux is preventing SetroubleshootF from 'write' accesses on the directory /var/tmp.
SELinux is preventing SetroubleshootF from 'write' accesses on the directory ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
x86_64 Unspecified
high Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:a61bd1e7b3cddab59321dc0f41a...
:
Depends On:
Blocks: 1279396
  Show dependency treegraph
 
Reported: 2015-11-06 17:47 EST by Paul Finnigan
Modified: 2016-02-16 22:50 EST (History)
13 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-158.6.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1279396 (view as bug list)
Environment:
Last Closed: 2016-02-16 22:50:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (1.59 KB, patch)
2016-02-10 19:05 EST, Petr Lautrbach
no flags Details | Diff

  None (edit)
Description Paul Finnigan 2015-11-06 17:47:51 EST
Description of problem:
This happened after attempting to run restorecon for a problem with the provided button in SELinux Alert Browser. The 'fixes' were needed after updating my Fedora 22 system to Fedora 23. There were two other related problems. I will mark them as related once I have all the numbers.
SELinux is preventing SetroubleshootF from 'write' accesses on the directory /var/tmp.

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

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

Additional Information:
Source Context                system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.
                              c1023
Target Context                system_u:object_r:tmp_t:s0
Target Objects                /var/tmp [ dir ]
Source                        SetroubleshootF
Source Path                   SetroubleshootF
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           filesystem-3.2-35.fc23.x86_64
Policy RPM                    selinux-policy-3.13.1-152.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.5-300.fc23.x86_64 #1 SMP Tue
                              Oct 27 04:29:56 UTC 2015 x86_64 x86_64
Alert Count                   6
First Seen                    2015-11-06 22:36:52 GMT
Last Seen                     2015-11-06 22:36:52 GMT
Local ID                      9e1ef59e-fcba-41f2-89bb-e87d6cb33ea6

Raw Audit Messages
type=AVC msg=audit(1446849412.408:817): avc:  denied  { write } for  pid=12161 comm="SetroubleshootF" name="tmp" dev="sda2" ino=130145 scontext=system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tmp_t:s0 tclass=dir permissive=0


Hash: SetroubleshootF,setroubleshoot_fixit_t,tmp_t,dir,write

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

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.5-300.fc23.x86_64
type:           libreport
Comment 1 Madd Sauer 2016-01-12 15:41:30 EST
Description of problem:
#1 installed abcde
#2 started abcde as user (non-root)
#3 this message poped up.

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

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.8-300.fc23.x86_64
type:           libreport
Comment 2 cutnioff 2016-01-13 01:22:58 EST
$ sudo rpm -qa | grep -i abcde
$
Comment 3 Petr Lautrbach 2016-02-10 19:02:42 EST
Until there's refactored code in sealert it would need to use similar fix as 14ce26603c60b9cf8fb98b0be0f2209cedf7bc45 to allow setroubleshoot_fixit_t to create and manage temp files.
Comment 4 Petr Lautrbach 2016-02-10 19:05 EST
Created attachment 1123024 [details]
proposed patch

I've not tested this patch yet but it should work. Still I will try to refactor the sealert code.
Comment 6 Fedora Update System 2016-02-11 09:27:58 EST
selinux-policy-3.13.1-158.6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-36a160982c
Comment 7 Fedora Update System 2016-02-14 11:23:40 EST
selinux-policy-3.13.1-158.6.fc23 has been pushed to the Fedora 23 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-2016-36a160982c
Comment 8 Fedora Update System 2016-02-16 22:50:16 EST
selinux-policy-3.13.1-158.6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

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