All of lore.kernel.org
 help / color / mirror / Atom feed
* What is the reason for the denial?
@ 2012-07-24 22:25 Haiqing Jiang
  2012-07-24 22:42 ` William Roberts
  2012-07-25 11:31 ` Stephen Smalley
  0 siblings, 2 replies; 3+ messages in thread
From: Haiqing Jiang @ 2012-07-24 22:25 UTC (permalink / raw)
  To: selinux; +Cc: Stephen Smalley, William Roberts

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

*Hi, all*
*
*
*I have the following denial. It's very strange since there is one policy
in app.te: "*allow appdomain app_data_file:notdevfile_class_set
create_file_perms;*"*
Therefore, this denial should not be existed. Do you have any ideas?
Thanks.
*

#============= browser_app ==============
allow browser_app app_data_file:file open;

<5>[12332.713684] type=1400 audit(1342643713.703:2221): avc:  denied  {
open } for  pid=25996 comm="WebViewCoreThre" name="jsfileaccess.html"
dev=mmcblk0p12 ino=578608 scontext=u:r:browser_app:s0:c3
tcontext=u:object_r:app_data_file:s0:c37 tclass=file
<5>[12332.933044] type=1400 audit(1342643713.921:2222): avc:  denied  {
open } for  pid=25996 comm="WebViewCoreThre" name="target.txt"
dev=mmcblk0p12 ino=578521 scontext=u:r:browser_app:s0:c3
tcontext=u:object_r:app_data_file:s0:c37 tclass=file*

-- 
-----------------------------------
Haiqing Jiang, PH.D student

Computer Science Department, North Carolina State University

[-- Attachment #2: Type: text/html, Size: 2936 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What is the reason for the denial?
  2012-07-24 22:25 What is the reason for the denial? Haiqing Jiang
@ 2012-07-24 22:42 ` William Roberts
  2012-07-25 11:31 ` Stephen Smalley
  1 sibling, 0 replies; 3+ messages in thread
From: William Roberts @ 2012-07-24 22:42 UTC (permalink / raw)
  To: Haiqing Jiang; +Cc: Stephen Smalley, selinux

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

Is it MLS notice the MLS level change
On Jul 24, 2012 3:25 PM, "Haiqing Jiang" <hqjiang1988@gmail.com> wrote:

> *Hi, all*
> *
> *
> *I have the following denial. It's very strange since there is one policy
> in app.te: "*allow appdomain app_data_file:notdevfile_class_set
> create_file_perms;*"*
> Therefore, this denial should not be existed. Do you have any ideas?
> Thanks.
> *
>
> #============= browser_app ==============
> allow browser_app app_data_file:file open;
>
> <5>[12332.713684] type=1400 audit(1342643713.703:2221): avc:  denied  {
> open } for  pid=25996 comm="WebViewCoreThre" name="jsfileaccess.html"
> dev=mmcblk0p12 ino=578608 scontext=u:r:browser_app:s0:c3
> tcontext=u:object_r:app_data_file:s0:c37 tclass=file
> <5>[12332.933044] type=1400 audit(1342643713.921:2222): avc:  denied  {
> open } for  pid=25996 comm="WebViewCoreThre" name="target.txt"
> dev=mmcblk0p12 ino=578521 scontext=u:r:browser_app:s0:c3
> tcontext=u:object_r:app_data_file:s0:c37 tclass=file*
>
> --
> -----------------------------------
> Haiqing Jiang, PH.D student
>
> Computer Science Department, North Carolina State University
>
>
>

[-- Attachment #2: Type: text/html, Size: 3251 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What is the reason for the denial?
  2012-07-24 22:25 What is the reason for the denial? Haiqing Jiang
  2012-07-24 22:42 ` William Roberts
@ 2012-07-25 11:31 ` Stephen Smalley
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Smalley @ 2012-07-25 11:31 UTC (permalink / raw)
  To: Haiqing Jiang; +Cc: selinux, William Roberts

On Tue, 2012-07-24 at 15:25 -0700, Haiqing Jiang wrote:
> Hi, all
> 
> 
> I have the following denial. It's very strange since there is one
> policy in app.te: "allow appdomain app_data_file:notdevfile_class_set
> create_file_perms;"
> Therefore, this denial should not be existed. Do you have any ideas?
> Thanks. 
> 
> 
> #============= browser_app ==============
> allow browser_app app_data_file:file open;
> 
> <5>[12332.713684] type=1400 audit(1342643713.703:2221): avc:  denied
>  { open } for  pid=25996 comm="WebViewCoreThre"
> name="jsfileaccess.html" dev=mmcblk0p12 ino=578608
> scontext=u:r:browser_app:s0:c3
> tcontext=u:object_r:app_data_file:s0:c37 tclass=file
> <5>[12332.933044] type=1400 audit(1342643713.921:2222): avc:  denied
>  { open } for  pid=25996 comm="WebViewCoreThre" name="target.txt"
> dev=mmcblk0p12 ino=578521 scontext=u:r:browser_app:s0:c3
> tcontext=u:object_r:app_data_file:s0:c37 tclass=file

Violates the mlsconstrain statement on lines 72-73 of sepolicy/mls due
to different MLS categories (c3 vs c37).  This is our approach to
ensuring isolation of app processes and files from other apps that is
not dependent on app correctness (unlike the DAC permissions, as
illustrated in the Skype and Lookout Mobile examples in our prior
presentations).  Each app UID is mapped to a unique MLS category when
levelFromUid=true in seapp_contexts.

If we have to relax the restriction, then options include:
- Rather than using MLS for per-app isolation, we could just use it for
specific groups of apps via level= rather than levelFromUid=.

- Or we could isolate only based on app domain/type.  We recently
introduced support for specifying not only domain= but also type= based
on seinfo= strings in seapp_contexts, so you could in fact define and
assign different types for each app domain, e.g. platform_app_data_file,
media_app_data_file, etc.  Then we wouldn't use the MLS levels at all at
least in the default configuration.

- Labeling different subdirectories of the /data/data/<packagename>
directory differently so that we can for example apply this restriction
on the files/ subdirectory (private app files) but relax it for the
sharedprefs/ subdirectory.  This would require code changes to support.
We experimented briefly with this previously; if you want to go down
this route, let us know and we can dig out the older patch.  Not clear
if this would help with your particular issue - where does that file
live?

-- 
Stephen Smalley
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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-25 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 22:25 What is the reason for the denial? Haiqing Jiang
2012-07-24 22:42 ` William Roberts
2012-07-25 11:31 ` Stephen Smalley

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.