Bug 1278983 - SELinux is preventing SetroubleshootF from 'write' accesses on the directory /var/tmp.
Summary: SELinux is preventing SetroubleshootF from 'write' accesses on the directory ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: x86_64
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a61bd1e7b3cddab59321dc0f41a...
Depends On:
Blocks: 1279396
TreeView+ depends on / blocked
 
Reported: 2015-11-06 22:47 UTC by Paul Finnigan
Modified: 2016-02-17 03:50 UTC (History)
13 users (show)

Fixed In Version: selinux-policy-3.13.1-158.6.fc23
Clone Of:
: 1279396 (view as bug list)
Environment:
Last Closed: 2016-02-17 03:50:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
proposed patch (1.59 KB, patch)
2016-02-11 00:05 UTC, Petr Lautrbach
no flags Details | Diff

Description Paul Finnigan 2015-11-06 22:47:51 UTC
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 20:41:30 UTC
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 06:22:58 UTC
$ sudo rpm -qa | grep -i abcde
$

Comment 3 Petr Lautrbach 2016-02-11 00:02:42 UTC
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-11 00:05:16 UTC
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 14:27:58 UTC
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 16:23:40 UTC
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-17 03:50:16 UTC
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.