All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Xavier Toth <txtoth@gmail.com>
Cc: SE Linux <selinux@tycho.nsa.gov>
Subject: Re: X avcs
Date: Fri, 28 Dec 2007 14:34:35 -0500	[thread overview]
Message-ID: <47754FCB.1070307@tycho.nsa.gov> (raw)
In-Reply-To: <cadfc0e40712280854i586aae43ya9e602fd56a984ab@mail.gmail.com>

Xavier Toth wrote:
> What about labeling notification-daemon as other gnome apps have been
> labeled (user_xpriv_t)?
>
> On Dec 26, 2007 3:01 PM, Xavier Toth <txtoth@gmail.com> wrote:
>   
>> swo_u who is running ranged (systemlow-systemhigh) uses newrole to
>> launch an X windows app at systemhigh and then I get avcs like the
>> following:
>>
>> avc:  denied  { receive } for request=X11:ChangeWindowAttributes
>> comm=/usr/libexec/notification-daemon resid=3800036 restype=WINDOW
>> scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_t:s15:c0.c1023 tclass=x_drawable
>> avc:  denied  { get_property } for request=X11:GetProperty
>> comm=/usr/libexec/notification-daemon resid=3800036 restype=WINDOW
>> scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_t:s15:c0.c1023 tclass=x_drawable
>> avc:  denied  { receive } for  comm=/usr/libexec/notification-daemon
>> event=X11:MapNotify scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_manage_xevent_t:s15:c0.c1023
>> tclass=x_event
>> avc:  denied  { receive } for  comm=/usr/libexec/notification-daemon
>> event=X11:VisibilityNotify
>> scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_default_xevent_t:s15:c0.c1023
>> tclass=x_event
>> avc:  denied  { receive } for  comm=/usr/libexec/notification-daemon
>> event=X11:PropertyNotify scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_property_xevent_t:s15:c0.c1023
>> tclass=x_event
>> avc:  denied  { receive } for  comm=/usr/libexec/notification-daemon
>> event=X11:FocusIn scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_focus_xevent_t:s15:c0.c1023
>> tclass=x_event
>> avc:  denied  { getattr } for request=X11:GetGeometry
>> comm=/usr/libexec/notification-daemon resid=3800036 restype=WINDOW
>> scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_t:s15:c0.c1023 tclass=x_drawable
>> avc:  denied  { read } for request=X11:GetProperty
>> comm=/usr/libexec/notification-daemon property=WM_NAME
>> scontext=swo_u:user_r:user_t:s0-s15:c0.c1023
>> tcontext=swo_u:object_r:user_default_xproperty_t:s15:c0.c1023
>> tclass=x_property
>>     

These are all allowed by the TE rules.  So I think this is a MLS issue.

I committed read-to-clearance and write-to-clearance interfaces and went 
ahead and granted read-to-clearance in the per-role template.  The patch 
I committed is below.  So update from SVN and see if that solves the 
problem.

Index: policy/modules/kernel/mls.if
===================================================================
--- policy/modules/kernel/mls.if	(revision 2565)
+++ policy/modules/kernel/mls.if	(working copy)
@@ -612,6 +612,26 @@
 ########################################
 ## <summary>
 ##	Make specified domain MLS trusted
+##	for reading from X objects up to its clearance.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+## <rolecap/>
+#
+interface(`mls_xwin_read_to_clearance',`
+	gen_require(`
+		attribute mlsxwinreadtoclr;
+	')
+
+	typeattribute $1 mlsxwinreadtoclr;
+')
+
+########################################
+## <summary>
+##	Make specified domain MLS trusted
 ##	for reading from X objects at any level.
 ## </summary>
 ## <param name="domain">
@@ -632,6 +652,26 @@
 ########################################
 ## <summary>
 ##	Make specified domain MLS trusted
+##	for write to X objects up to its clearance.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+## <rolecap/>
+#
+interface(`mls_xwin_write_to_clearance',`
+	gen_require(`
+		attribute mlsxwinwritetoclr;
+	')
+
+	typeattribute $1 mlsxwinwritetoclr;
+')
+
+########################################
+## <summary>
+##	Make specified domain MLS trusted
 ##	for writing to X objects at any level.
 ## </summary>
 ## <param name="domain">
Index: policy/modules/services/xwindows.if
===================================================================
--- policy/modules/services/xwindows.if	(revision 2565)
+++ policy/modules/services/xwindows.if	(working copy)
@@ -374,6 +374,7 @@
 	#
 
 	xwindows_domain_template($1,$1,$2,$3)
+	mls_xwin_read_to_clearance($2)
 
 	# FIXME: this domain should be removed
 	xwindows_domain_template($1,$1_xpriv,$1_xpriv_t,$3)



-- 
Eamon Walsh <ewalsh@tycho.nsa.gov>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2007-12-28 19:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-26 21:01 X avcs Xavier Toth
2007-12-28 16:54 ` Xavier Toth
2007-12-28 19:34   ` Eamon Walsh [this message]
2007-12-28 21:26     ` Xavier Toth
2008-01-02 15:11       ` Xavier Toth
2008-01-02 20:11         ` Glenn Faden
2008-01-09 14:21           ` Ted X Toth
2008-01-09 17:46             ` Glenn Faden
2008-01-10 21:14               ` Eamon Walsh
2008-01-10 23:55                 ` Glenn Faden
2008-01-10 20:27           ` Eamon Walsh
2008-01-10 23:27             ` Glenn Faden
2008-01-11 14:46             ` Ted X Toth
2008-01-11 20:46               ` Glenn Faden
2008-01-11 22:37                 ` Ted X Toth
2008-01-17 22:07                 ` Eamon Walsh
2008-01-21  2:04                   ` Glenn Faden
2008-01-24  0:11                     ` Eamon Walsh
2008-01-24 15:40                       ` Xavier Toth
2008-01-29 15:48                       ` Xavier Toth
2008-01-31  2:26                         ` Eamon Walsh
2008-02-08 23:51                           ` Eamon Walsh
2008-02-13 16:52                             ` Xavier Toth
2008-02-15 14:53                             ` Xavier Toth
2008-02-15 17:18                               ` Eamon Walsh
2008-01-11 23:04               ` Eamon Walsh
2008-01-14 20:14             ` Xavier Toth
2008-01-15 22:47               ` Eamon Walsh
2008-01-16 15:41                 ` Xavier Toth
2008-01-16 16:05                   ` Xavier Toth
     [not found] <195F0BAA-7896-416C-9897-E191080161D4@nall.com>
     [not found] ` <47EC1760.7050504@tycho.nsa.gov>
     [not found]   ` <F3CB74C1-A379-4B76-A41B-E7282D0C580A@nall.com>
2008-06-30 19:38     ` Eamon Walsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47754FCB.1070307@tycho.nsa.gov \
    --to=ewalsh@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=txtoth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.