Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 598798 - SELinux is preventing /usr/bin/ksmserver "write" access on /var/run/xdmctl/dmctl-:0/socket.
SELinux is preventing /usr/bin/ksmserver "write" access on /var/run/xdmc...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:2bfdad83234...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-01 23:57 EDT by Carl G.
Modified: 2010-07-13 03:22 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.7.19-28.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-13 03:22:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Carl G. 2010-06-01 23:57:10 EDT
Summary:

SELinux is preventing /usr/bin/ksmserver "write" access on
/var/run/xdmctl/dmctl-:0/socket.

Detailed Description:

SELinux denied access requested by ksmserver. It is not expected that this
access is required by ksmserver and this access may signal an intrusion attempt.
It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                staff_u:staff_r:staff_t:s0
Target Context                system_u:object_r:xdm_var_run_t:s0
Target Objects                /var/run/xdmctl/dmctl-:0/socket [ sock_file ]
Source                        ksmserver
Source Path                   /usr/bin/ksmserver
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kdebase-workspace-4.4.3-1.fc13.1
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-21.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux BubbleWork 2.6.33.5-112.fc13.x86_64 #1 SMP
                              Thu May 27 02:28:31 UTC 2010 x86_64 x86_64
Alert Count                   16
First Seen                    Tue 01 Jun 2010 11:55:26 PM EDT
Last Seen                     Tue 01 Jun 2010 11:55:57 PM EDT
Local ID                      f47fda2b-05c7-4f7a-9ba0-52e2db6f3696
Line Numbers                  

Raw Audit Messages            

node=BubbleWork type=AVC msg=audit(1275450957.341:26900): avc:  denied  { write } for  pid=3244 comm="ksmserver" name="socket" dev=dm-2 ino=262188 scontext=staff_u:staff_r:staff_t:s0 tcontext=system_u:object_r:xdm_var_run_t:s0 tclass=sock_file

node=BubbleWork type=SYSCALL msg=audit(1275450957.341:26900): arch=c000003e syscall=42 success=no exit=-13 a0=28 a1=7fff36bea770 a2=6e a3=fffffffe items=0 ppid=3212 pid=3244 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=3 comm="ksmserver" exe="/usr/bin/ksmserver" subj=staff_u:staff_r:staff_t:s0 key=(null)



Hash String generated from  catchall,ksmserver,staff_t,xdm_var_run_t,sock_file,write
audit2allow suggests:

#============= staff_t ==============
allow staff_t xdm_var_run_t:sock_file write;
Comment 1 Carl G. 2010-06-02 00:24:43 EDT
This AVC prevent the Kmenu system from displaying shutdown and restart icons.
Comment 2 Daniel Walsh 2010-06-02 10:46:27 EDT
Miroslav can you make this change to xserver.if

interface(`xserver_stream_connect_xdm',`
	gen_require(`
		type xdm_t, xdm_tmp_t, xdm_var_run_t;
	')

	files_search_tmp($1)
	stream_connect_pattern($1, xdm_tmp_t, xdm_tmp_t, xdm_t)
	stream_connect_pattern($1, xdm_var_run_t, xdm_var_run_t, xdm_t)
')
Comment 3 Miroslav Grepl 2010-06-03 04:21:25 EDT
Fixed in selinux-policy-3.7.19-24.fc13
Comment 4 Fedora Update System 2010-06-14 15:29:26 EDT
selinux-policy-3.7.19-28.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-28.fc13
Comment 5 Fedora Update System 2010-06-15 11:59:25 EDT
selinux-policy-3.7.19-28.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-28.fc13
Comment 6 Fedora Update System 2010-06-23 13:46:16 EDT
selinux-policy-3.7.19-28.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Carl G. 2010-07-10 17:15:14 EDT
Miroslav, can you also push the change to Rawhide?

Sorry if you already did, it's been 3 days since i can't access http://koji.fedoraproject.org/koji/
Comment 8 Carl G. 2010-07-10 21:11:28 EDT
* Wed Jun 02 2010 Dan Walsh <dwalsh@redhat.com> 3.8.1-5
- Add xdm_var_run_t to xserver_stream_connect_xdm

$ rpm -q selinux-policy
selinux-policy-3.8.6-1.fc14.noarch

Okay, i guess it should be fixed if it's the right thing i'm looking at?

type=SYSCALL msg=audit(1278810568.751:441): arch=c000003e syscall=42 success=no exit=-13 a0=34 a1=7fffa1b5c0f0 a2=6e a3=0 items=0 ppid=1919 pid=1975 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="ksmserver" exe="/usr/bin/ksmserver" subj=staff_u:staff_r:staff_t:s0 key=(null)

type=AVC msg=audit(1278810568.755:442): avc:  denied  { write } for  pid=1975 comm="ksmserver" name="socket" dev=dm-1 ino=544014 scontext=staff_u:staff_r:staff_t:s0 tcontext=system_u:object_r:xdm_var_run_t:s0 tclass=sock_file

type=SYSCALL msg=audit(1278810568.755:442): arch=c000003e syscall=42 success=no exit=-13 a0=34 a1=7fffa1b5c0f0 a2=6e a3=0 items=0 ppid=1919 pid=1975 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="ksmserver" exe="/usr/bin/ksmserver" subj=staff_u:staff_r:staff_t:s0 key=(null)

type=AVC msg=audit(1278810572.017:443): avc:  denied  { write } for  pid=1975 comm="ksmserver" name="socket" dev=dm-1 ino=544014 scontext=staff_u:staff_r:staff_t:s0 tcontext=system_u:object_r:xdm_var_run_t:s0 tclass=sock_file

type=SYSCALL msg=audit(1278810572.017:443): arch=c000003e syscall=42 success=yes exit=0 a0=34 a1=7fffa1b5c0f0 a2=6e a3=0 items=0 ppid=1919 pid=1975 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="ksmserver" exe="/usr/bin/ksmserver" subj=staff_u:staff_r:staff_t:s0 key=(null)

type=AVC msg=audit(1278810572.021:444): avc:  denied  { write } for  pid=1975 comm="ksmserver" name="socket" dev=dm-1 ino=544014 scontext=staff_u:staff_r:staff_t:s0 tcontext=system_u:object_r:xdm_var_run_t:s0 tclass=sock_file

type=SYSCALL msg=audit(1278810572.021:444): arch=c000003e syscall=42 success=yes exit=0 a0=34 a1=7fffa1b5c0f0 a2=6e a3=0 items=0 ppid=1919 pid=1975 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="ksmserver" exe="/usr/bin/ksmserver" subj=staff_u:staff_r:staff_t:s0 key=(null)
Comment 9 Carl G. 2010-07-11 01:39:31 EDT
Summary:

SELinux is preventing /usr/bin/ksmserver "write" access on
/var/run/xdmctl/dmctl-:0/socket.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by ksmserver. It is not expected that this
access is required by ksmserver and this access may signal an intrusion attempt.
It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                staff_u:staff_r:staff_t:s0
Target Context                system_u:object_r:xdm_var_run_t:s0
Target Objects                /var/run/xdmctl/dmctl-:0/socket [ sock_file ]
Source                        ksmserver
Source Path                   /usr/bin/ksmserver
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kdebase-workspace-4.4.92-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.8.6-1.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux BubbleWork 2.6.35-0.31.rc4.git4.fc14.x86_64
                              #1 SMP Fri Jul 9 01:20:58 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 11 Jul 2010 01:38:04 AM EDT
Last Seen                     Sun 11 Jul 2010 01:38:04 AM EDT
Local ID                      5799e29d-365f-4294-a51c-2151604e2b50
Line Numbers                  

Raw Audit Messages            

node=BubbleWork type=AVC msg=audit(1278826684.285:28035): avc:  denied  { write } for  pid=2796 comm="ksmserver" name="socket" dev=dm-1 ino=544014 scontext=staff_u:staff_r:staff_t:s0 tcontext=system_u:object_r:xdm_var_run_t:s0 tclass=sock_file

node=BubbleWork type=SYSCALL msg=audit(1278826684.285:28035): arch=c000003e syscall=42 success=yes exit=0 a0=33 a1=7fff9f0f09f0 a2=6e a3=0 items=0 ppid=2757 pid=2796 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=2 comm="ksmserver" exe="/usr/bin/ksmserver" subj=staff_u:staff_r:staff_t:s0 key=(null)
Comment 10 Daniel Walsh 2010-07-12 15:12:54 EDT
Miroslav, I think we need to add

	stream_connect_pattern($1, xdm_var_run_t, xdm_var_run_t, xdm_t)

to xserver_stream_connect_xdm
Comment 11 Miroslav Grepl 2010-07-13 03:22:55 EDT
Fixed in selinux-policy-3.8.6-3.fc14.

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