Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1067254 - SELinux is preventing /usr/bin/xinit from 'connectto' accesses on the unix_stream_socket . [NEEDINFO]
Summary: SELinux is preventing /usr/bin/xinit from 'connectto' accesses on the unix_st...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d0c71649bf61956e5c520df285a...
: 1067255 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-20 03:06 UTC by Christopher Meng
Modified: 2014-11-19 14:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-19 14:57:01 UTC
mgrepl: needinfo? (i)


Attachments (Terms of Use)

Description Christopher Meng 2014-02-20 03:06:04 UTC
Description of problem:
SELinux is preventing /usr/bin/xinit from 'connectto' accesses on the unix_stream_socket .

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

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

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:system_r:xserver_t:s0
Target Objects                 [ unix_stream_socket ]
Source                        xinit
Source Path                   /usr/bin/xinit
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xorg-x11-xinit-1.3.2-9.fc20.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-25.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.14.0-0.rc2.git1.2.fc21.i686 #1
                              SMP Tue Feb 11 21:07:56 UTC 2014 i686 i686
Alert Count                   77
First Seen                    2014-02-20 11:01:08 CST
Last Seen                     2014-02-20 11:05:43 CST
Local ID                      c00793e9-298c-4965-a07c-724f621671a4

Raw Audit Messages
type=AVC msg=audit(1392865543.607:471): avc:  denied  { connectto } for  pid=563 comm="xinit" path=002F746D702F2E5831312D756E69782F5839 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:xserver_t:s0 tclass=unix_stream_socket


type=SYSCALL msg=audit(1392865543.607:471): arch=i386 syscall=socketcall success=no exit=EACCES a0=3 a1=bf7ff430 a2=b7563000 a3=3 items=0 ppid=1 pid=563 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=xinit exe=/usr/bin/xinit subj=system_u:system_r:init_t:s0 key=(null)

Hash: xinit,init_t,xserver_t,unix_stream_socket,connectto

Additional info:
reporter:       libreport-2.1.12
hashmarkername: setroubleshoot
kernel:         3.14.0-0.rc2.git1.2.fc21.i686
type:           libreport

Comment 1 Miroslav Grepl 2014-02-20 09:21:55 UTC
*** Bug 1067255 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2014-02-20 09:35:41 UTC
Ok, this is caused by xinit. 

Christopher,
any chance to re-test it in permissive to see if you get more AVCs.

Also what does

$ seinfo -xtinit_t |grep uncon

Comment 3 Christopher Meng 2014-02-21 06:45:20 UTC
(In reply to Miroslav Grepl from comment #2)
> Ok, this is caused by xinit. 
> 
> Christopher,
> any chance to re-test it in permissive to see if you get more AVCs.

I will do this later.

> Also what does
> 
> $ seinfo -xtinit_t |grep uncon

No results returned.(enforcing mode)

Comment 4 Lukas Bezdicka 2014-02-21 10:04:58 UTC
Description of problem:
Updated rawhide. This seems to be issue with some missing selinux change when delivering new feature.

Additional info:
reporter:       libreport-2.1.12
hashmarkername: setroubleshoot
kernel:         3.14.0-0.rc3.git3.2.fc21.x86_64
type:           libreport

Comment 5 Daniel Walsh 2014-02-21 20:56:08 UTC
This is caused by init_t not being unconfined, which should be fixed in selinux-policy-3.13.1-26.fc21

I think we should label xinit as xserver_exec_t.

Comment 6 Christopher Meng 2014-02-22 08:23:29 UTC
Permissive mode is fine, no alert found.

Comment 7 Miroslav Grepl 2014-02-25 11:53:09 UTC
Chris,
could you test it with

# chcon -t xserver_exec_t /usr/bin/xinit


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