Bug 1133737 - SELinux is preventing gvim from 'connectto' accesses on the unix_stream_socket @/tmp/.X11-unix/X0.
Summary: SELinux is preventing gvim from 'connectto' accesses on the unix_stream_socke...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:56e2a173a3f61df5c89f3f72f46...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-26 03:22 UTC by Ankur Sinha (FranciscoD)
Modified: 2014-09-10 02:45 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.13.1-78.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-10 02:45:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2014-08-26 03:22:23 UTC
Description of problem:
Did crontab -e to set up a new crontab for my user.

I have this alias in place if it makes a difference: alias vim='gvim -v'
SELinux is preventing gvim from 'connectto' accesses on the unix_stream_socket @/tmp/.X11-unix/X0.

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

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

Additional Information:
Source Context                unconfined_u:unconfined_r:crontab_t:s0-s0:c0.c1023
Target Context                system_u:system_r:xserver_t:s0-s0:c0.c1023
Target Objects                @/tmp/.X11-unix/X0 [ unix_stream_socket ]
Source                        gvim
Source Path                   gvim
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-75.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.1-300.fc21.x86_64 #1 SMP Thu
                              Aug 14 15:06:34 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-08-26 13:20:54 AEST
Last Seen                     2014-08-26 13:20:54 AEST
Local ID                      aff2a079-858d-43db-8a7e-0d2f43210c34

Raw Audit Messages
type=AVC msg=audit(1409023254.319:1658): avc:  denied  { connectto } for  pid=22735 comm="gvim" path=002F746D702F2E5831312D756E69782F5830 scontext=unconfined_u:unconfined_r:crontab_t:s0-s0:c0.c1023 tcontext=system_u:system_r:xserver_t:s0-s0:c0.c1023 tclass=unix_stream_socket permissive=0


Hash: gvim,crontab_t,xserver_t,unix_stream_socket,connectto

Version-Release number of selected component:
selinux-policy-3.13.1-75.fc21.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.1-300.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-08-31 11:47:23 UTC
unconfined_t should not be transitioning to crontab_t.

77266f471312971c6ff85b16b797a2ecefd27c1e eliminates this transition.

Comment 2 Lukas Vrabec 2014-09-01 08:57:15 UTC
commit 77266f471312971c6ff85b16b797a2ecefd27c1e
Author: Dan Walsh <dwalsh>
Date:   Sun Aug 31 07:46:41 2014 -0400

    I see no reason why unconfined_t should transition to crontab_t, this looks like old cruft

https://github.com/selinux-policy/selinux-policy/commit/77266f471312971c6ff85b16b797a2ecefd27c1e

Comment 3 Fedora Update System 2014-09-02 19:29:19 UTC
selinux-policy-3.13.1-78.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-78.fc21

Comment 4 Fedora Update System 2014-09-06 00:59:05 UTC
Package selinux-policy-3.13.1-78.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.13.1-78.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-10184/selinux-policy-3.13.1-78.fc21
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-09-10 02:45:34 UTC
selinux-policy-3.13.1-78.fc21 has been pushed to the Fedora 21 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.