allocate perms to platformappdomain over system_data_file
PATCH 1/1 allocate perms to platformappdomain over system_data_file
--- app.te | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
app.te +2 -0
@@ -83,6 +83,8 @@ allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ # App sdcard file accesses allow platformappdomain sdcard:dir create_dir_perms; allow platformappdomain sdcard:file create_file_perms; +# System data file accesses XXX???? +allow platformappdomain system_data_file:file open; # # Untrusted apps.
Signature · 7 lines
1.7.0.4 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 9 lines · Haiqing Jiang
--- app.te | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)app.te +0
-0
app.te allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ · line 90
Quoted 8 lines
app.te +2
-0@@ -83,6 +83,8 @@ allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ # App sdcard file accesses allow platformappdomain sdcard:dir create_dir_perms; allow platformappdomain sdcard:file create_file_perms; +# System data file accesses XXX???? +allow platformappdomain system_data_file:file open; # # Untrusted apps.
Need to know more about the denial to diagnose.
Also, enabling syscall audit may help with getting full pathnames, although you likely need the ARM audit patches for that.
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
This is the denial information. What is your opinion? Thanks.
5>[ 2978.206604] type=1400 audit(1342634359.195:1155): avc: denied { open } for pid=10393 comm="android.cts.jni" name="libjnitest.so" dev=mmcblk0p12 ino=578521 scontext=u:r:release_app:s0:c41 tcontext=u:object_r:system_data_file:s0 tclass=file
<5>[12124.019561] type=1400 audit(1342643505.007:1919): avc: denied {open } for pid=24055 comm="ationTestRunner" name="libctspermission_jni.so" dev=mmcblk0p12 ino=578541 scontext=u:r:release_app:s0:c41 tcontext=u:object_r:system_data_file:s0 tclass=file
Quoted 29 lines · Stephen Smalley
app.te allow platformappdomain
Quoted 9 lines · Haiqing Jiang
--- app.te | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)app.te +0
-0@@ -83,6 +83,8 @@ allow platformappdomainplatform_app_data_file:notdevfile_class_set
create_file_app.te allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ · line 90
Quoted 8 lines
app.te +2
-0# App sdcard file accesses allow platformappdomain sdcard:dir create_dir_perms; allow platformappdomain sdcard:file create_file_perms; +# System data file accesses XXX???? +allow platformappdomain system_data_file:file open; # # Untrusted apps.Need to know more about the denial to diagnose.
Also, enabling syscall audit may help with getting full pathnames, although you likely need the ARM audit patches for that.--
Stephen Smalley
National Security Agency
Signature · 4 lines
----------------------------------- Haiqing Jiang, PH.D student Computer Science Department, North Carolina State University
Quoted 7 lines · Haiqing Jiang
This is the denial information. What is your opinion? Thanks.
5>[ 2978.206604] type=1400 audit(1342634359.195:1155): avc: denied
{ open } for pid=10393 comm="android.cts.jni" name="libjnitest.so"
dev=mmcblk0p12 ino=578521 scontext=u:r:release_app:s0:c41 tcontext=u:object_r:system_data_file:s0 tclass=file
Quoted 5 lines
<5>[12124.019561] type=1400 audit(1342643505.007:1919): avc: denied{ open } for pid=24055 comm="ationTestRunner" name="libctspermission_jni.so" dev=mmcblk0p12 ino=578541 scontext=u:r:release_app:s0:c41 tcontext=u:object_r:system_data_file:s0 tclass=file
It is trying to execute a shared object from the lib directory. So it is the same as app_ndk, except for platformappdomain rather than untrusted_app.
Quoted 48 lines
On Fri, Jul 27, 2012 at 11:37 AM, Stephen Smalley <[email protected]> wrote:
On Fri, 2012-07-27 at 11:34 -0700, Haiqing Jiang wrote: > --- > app.te | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/app.te b/app.te > index 85de816..dca2e0c 100644 > --- a/app.te > +++ b/app.te > @@ -83,6 +83,8 @@ allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ > # App sdcard file accesses > allow platformappdomain sdcard:dir create_dir_perms; > allow platformappdomain sdcard:file create_file_perms; > +# System data file accesses XXX???? > +allow platformappdomain system_data_file:file open; > > # > # Untrusted apps. Need to know more about the denial to diagnose. Also, enabling syscall audit may help with getting full pathnames, although you likely need the ARM audit patches for that. -- Stephen Smalley National Security AgencySignature · 5 lines
----------------------------------- Haiqing Jiang, PH.D student Computer Science Department, North Carolina State University
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Exactly. I was thinking of adding the policy into if (app_ndk). But later on I wondered whether it could be generic for platformappdomain. So, what is your opinion? Add the permissions to if (app_ndk) or to platformappdomain rules? Thanks.
Quoted 72 lines · Stephen Smalley
Quoted 7 lines · Haiqing Jiang
This is the denial information. What is your opinion? Thanks.
5>[ 2978.206604] type=1400 audit(1342634359.195:1155): avc: denied
{ open } for pid=10393 comm="android.cts.jni" name="libjnitest.so"
dev=mmcblk0p12 ino=578521 scontext=u:r:release_app:s0:c41 tcontext=u:object_r:system_data_file:s0 tclass=fileQuoted 5 lines
<5>[12124.019561] type=1400 audit(1342643505.007:1919): avc: denied{ open } for pid=24055 comm="ationTestRunner" name="libctspermission_jni.so" dev=mmcblk0p12 ino=578541 scontext=u:r:release_app:s0:c41 tcontext=u:object_r:system_data_file:s0 tclass=file
It is trying to execute a shared object from the lib directory. So it is the same as
app_ndk, except for platformappdomain rather thanuntrusted_app.Quoted 38 lines
On Fri, Jul 27, 2012 at 11:37 AM, Stephen Smalley <[email protected]> wrote:
On Fri, 2012-07-27 at 11:34 -0700, Haiqing Jiang wrote: > --- > app.te | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/app.te b/app.te > index 85de816..dca2e0c 100644 > --- a/app.te > +++ b/app.te > @@ -83,6 +83,8 @@ allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ > # App sdcard file accesses > allow platformappdomain sdcard:dir create_dir_perms; > allow platformappdomain sdcard:file create_file_perms; > +# System data file accesses XXX???? > +allow platformappdomain system_data_file:file open; > > # > # Untrusted apps. Need to know more about the denial to diagnose. Also, enabling syscall audit may help with getting full pathnames, although you likely need the ARM audit patches for that. -- Stephen Smalley National Security AgencyQuoted 10 lines
--
-----------------------------------
Haiqing Jiang, PH.D studentComputer Science Department, North Carolina State University
--
Stephen Smalley
National Security Agency
Signature · 4 lines
----------------------------------- Haiqing Jiang, PH.D student Computer Science Department, North Carolina State University
Quoted 4 lines · Haiqing Jiang
Exactly. I was thinking of adding the policy into if (
app_ndk). But later on I wondered whether it could be generic for platformappdomain. So, what is your opinion? Add the permissions to if (app_ndk) or to platformappdomain rules? Thanks.
The latter. Although this suggests to me that we ought to explore using different types on the lib directory for platform apps vs. third party apps, possibly based on seinfo=, so that we can allow platform apps to execute platform shared objects while blocking execution of any .so files shipped by a third party app as a safety measure.
Quoted 103 lines
On Fri, Jul 27, 2012 at 11:52 AM, Stephen Smalley <[email protected]> wrote:
On Fri, 2012-07-27 at 11:46 -0700, Haiqing Jiang wrote: > This is the denial information. What is your opinion? Thanks. > > > 5>[ 2978.206604] type=1400 audit(1342634359.195:1155): avc: denied > { open } for pid=10393 comm="android.cts.jni" name="libjnitest.so" > dev=mmcblk0p12 ino=578521 scontext=u:r:release_app:s0:c41 > tcontext=u:object_r:system_data_file:s0 tclass=file > <5>[12124.019561] type=1400 audit(1342643505.007:1919): avc: denied > { open } for pid=24055 comm="ationTestRunner" > name="libctspermission_jni.so" dev=mmcblk0p12 ino=578541 > scontext=u:r:release_app:s0:c41 > tcontext=u:object_r:system_data_file:s0 tclass=file It is trying to execute a shared object from the lib directory. So it is the same as app_ndk, except for platformappdomain rather than untrusted_app. > > > On Fri, Jul 27, 2012 at 11:37 AM, Stephen Smalley <[email protected]> > wrote: > On Fri, 2012-07-27 at 11:34 -0700, Haiqing Jiang wrote: > > --- > > app.te | 2 ++ > > 1 files changed, 2 insertions(+), 0 deletions(-) > > > > diff --git a/app.te b/app.te > > index 85de816..dca2e0c 100644 > > --- a/app.te > > +++ b/app.te > > @@ -83,6 +83,8 @@ allow platformappdomain > platform_app_data_file:notdevfile_class_set create_file_ > > # App sdcard file accesses > > allow platformappdomain sdcard:dir create_dir_perms; > > allow platformappdomain sdcard:file create_file_perms; > > +# System data file accesses XXX???? > > +allow platformappdomain system_data_file:file open; > > > > # > > # Untrusted apps. > > > Need to know more about the denial to diagnose. > Also, enabling syscall audit may help with getting full > pathnames, > although you likely need the ARM audit patches for that. > > -- > Stephen Smalley > National Security Agency > > > > > > -- > ----------------------------------- > Haiqing Jiang, PH.D student > > > Computer Science Department, North Carolina State University > > > > -- Stephen Smalley National Security AgencySignature · 5 lines
----------------------------------- Haiqing Jiang, PH.D student Computer Science Department, North Carolina State University
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
I don't need to modify the patch. So, could you help to update the patch to branches? Thanks.
Quoted 121 lines · Stephen Smalley
Quoted 4 lines · Haiqing Jiang
Exactly. I was thinking of adding the policy into if (
app_ndk). But later on I wondered whether it could be generic for platformappdomain. So, what is your opinion? Add the permissions to if (app_ndk) or to platformappdomain rules? Thanks.The latter. Although this suggests to me that we ought to explore using different types on the lib directory for platform apps vs. third party apps, possibly based on seinfo=, so that we can allow platform apps to execute platform shared objects while blocking execution of any .so files shipped by a third party app as a safety measure.
Quoted 94 lines
On Fri, Jul 27, 2012 at 11:52 AM, Stephen Smalley <[email protected]> wrote:
On Fri, 2012-07-27 at 11:46 -0700, Haiqing Jiang wrote: > This is the denial information. What is your opinion? Thanks. > > > 5>[ 2978.206604] type=1400 audit(1342634359.195:1155): avc: denied > { open } for pid=10393 comm="android.cts.jni" name="libjnitest.so" > dev=mmcblk0p12 ino=578521 scontext=u:r:release_app:s0:c41 > tcontext=u:object_r:system_data_file:s0 tclass=file > <5>[12124.019561] type=1400 audit(1342643505.007:1919): avc: denied > { open } for pid=24055 comm="ationTestRunner" > name="libctspermission_jni.so" dev=mmcblk0p12 ino=578541 > scontext=u:r:release_app:s0:c41 > tcontext=u:object_r:system_data_file:s0 tclass=file It is trying to execute a shared object from the lib directory. So it is the same as app_ndk, except for platformappdomain rather than untrusted_app. > > > On Fri, Jul 27, 2012 at 11:37 AM, Stephen Smalley <[email protected]> > wrote: > On Fri, 2012-07-27 at 11:34 -0700, Haiqing Jiang wrote: > > --- > > app.te | 2 ++ > > 1 files changed, 2 insertions(+), 0 deletions(-) > > > > diff --git a/app.te b/app.te > > index 85de816..dca2e0c 100644 > > --- a/app.te > > +++ b/app.te > > @@ -83,6 +83,8 @@ allow platformappdomain > platform_app_data_file:notdevfile_class_set create_file_ > > # App sdcard file accesses > > allow platformappdomain sdcard:dir create_dir_perms; > > allow platformappdomain sdcard:file create_file_perms; > > +# System data file accesses XXX???? > > +allow platformappdomain system_data_file:file open; > > > > # > > # Untrusted apps. > > > Need to know more about the denial to diagnose. > Also, enabling syscall audit may help with getting full > pathnames, > although you likely need the ARM audit patches for that. > > -- > Stephen Smalley > National Security Agency > > > > > > -- > ----------------------------------- > Haiqing Jiang, PH.D student > > > Computer Science Department, North Carolina State University > > > > -- Stephen Smalley National Security AgencyQuoted 9 lines
--
-----------------------------------
Haiqing Jiang, PH.D studentComputer Science Department, North Carolina State University
--
Stephen Smalley
National Security Agency
Signature · 4 lines
----------------------------------- Haiqing Jiang, PH.D student Computer Science Department, North Carolina State University
Quoted 2 lines · Haiqing Jiang
I don't need to modify the patch. So, could you help to update the patch to branches? Thanks.
Don't quite understand what you are asking here:
- this is for sepolicy, which has no version-specific branches (everything just feeds off of master), unlike the device trees.
- i did apply your previous patch for the sdcard accesses. So you should be able to amend this one.
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
I am trying to locate those patches for auditing, can someone please point us in the right direction?
Are these them?
https://www.redhat.com/archives/linux-audit/2011-October/msg00030.html
Quoted 27 lines · Stephen Smalley
Quoted 9 lines · Haiqing Jiang
--- app.te | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)app.te +0
-0app.te allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ · line 90
Quoted 8 lines
app.te +2
-0@@ -83,6 +83,8 @@ allow platformappdomain platform_app_data_file:notdevfile_class_set create_file_ # App sdcard file accesses allow platformappdomain sdcard:dir create_dir_perms; allow platformappdomain sdcard:file create_file_perms; +# System data file accesses XXX???? +allow platformappdomain system_data_file:file open; # # Untrusted apps.Need to know more about the denial to diagnose.
Also, enabling syscall audit may help with getting full pathnames, although you likely need the ARM audit patches for that.--
Stephen Smalley
National Security Agency
Signature · 8 lines
Respectfully, William C Roberts -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
audit patches
Quoted 5 lines · William Roberts
I am trying to locate those patches for auditing, can someone please point us in the right direction?
Are these them?
https://www.redhat.com/archives/linux-audit/2011-October/msg00030.html
That was one version of them. They were mainlined in Linux 3.3, commit 29ef73b7a82. Then you have to enable CONFIG_AUDITSYSCALL in your kernel configuration.
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.