Commit graph

5357 commits

Author SHA1 Message Date
Jeff Vander Stoep
c614046662 Move some perms back to domain
am: aef68b7799

* commit 'aef68b779909fe85a0f98bf443851bb30eb8b236':
  Move some perms back to domain
2015-11-19 23:15:22 +00:00
Jeff Vander Stoep
aef68b7799 Move some perms back to domain
libselinux stats selinuxfs, as does every process that links against
libselinux such as toolbox. grant:
   allow domain selinuxfs:filesystem getattr;

domain is already granted:
   allow domain self:dir r_dir_perms;
   allow domain self:lnk_file r_file_perms;
   allow domain self:{ fifo_file file } rw_file_perms;
To make these possible, also grant:
   allow domain proc:dir search;

Change-Id: Ife6cfa2124c9d61bf908ac89a8444676acdb4259
2015-11-19 14:59:44 -08:00
Jeffrey Vander Stoep
0062aa1b81 Merge "grant country_detector_service app_api_service attribute"
am: 29a1e43ecf

* commit '29a1e43ecfd5825f37fd736ffca1a650ff5a7738':
  grant country_detector_service app_api_service attribute
2015-11-18 23:57:03 +00:00
Jeffrey Vander Stoep
29a1e43ecf Merge "grant country_detector_service app_api_service attribute" 2015-11-18 23:47:15 +00:00
Jeff Vander Stoep
1e1d65a392 grant country_detector_service app_api_service attribute
All apps should have access to the country_detector service.

avc:  denied  { find } for service=country_detector pid=1802 uid=1010002 scontext=u:r:untrusted_app:s0:c522,c768 tcontext=u:object_r:country_detector_service:s0 tclass=service_manager

Bug: 25766732
Change-Id: Ie3f1a801114030dada7ad70c715a62907a2d264f
2015-11-18 15:38:59 -08:00
Nick Kralevich
eedee59726 Move bluetoothdomain rules into their own file.
am: 85dcd53b74

* commit '85dcd53b745dfcce534ea35443816057c6122887':
  Move bluetoothdomain rules into their own file.
2015-11-18 18:39:27 +00:00
Nick Kralevich
85dcd53b74 Move bluetoothdomain rules into their own file.
Don't mix bluetooth rules with bluetoothdomain. The bluetoothdomain
rules are used by several other SELinux domains, not just bluetooth,
and keeping them in the same file is confusing.

Change-Id: I487251ab1c1392467a39c7a87328cdaf802fc1f8
2015-11-18 09:19:17 -08:00
Jeffrey Vander Stoep
e324735dde Merge "grant deviceidle_service app_api_service attribute"
am: bcf31c786a

* commit 'bcf31c786a5d0a18c04972255fb246777f3a1004':
  grant deviceidle_service app_api_service attribute
2015-11-17 22:22:22 +00:00
Jeffrey Vander Stoep
bcf31c786a Merge "grant deviceidle_service app_api_service attribute" 2015-11-17 21:44:06 +00:00
Jeff Vander Stoep
692bdc4404 grant deviceidle_service app_api_service attribute
avc:  denied  { find } for service=deviceidle pid=26116 uid=10007 scontext=u:r:untrusted_app:s0:c512,c768
tcontext=u:object_r:deviceidle_service:s0 tclass=service_manager

Bug: 25734577
Change-Id: I3c955e6df2186ad7adb6b599c5b6b802b8ecd8de
2015-11-17 13:10:46 -08:00
Calin Juravle
b67f8d5c94 Remove handling of dalvik-cache/profiles
am: 2469b32e15

* commit '2469b32e15b569fabaeca066ce53b65fa0ee8995':
  Remove handling of dalvik-cache/profiles
2015-11-16 11:20:21 +00:00
Calin Juravle
2469b32e15 Remove handling of dalvik-cache/profiles
Bug: 24698874
Bug: 17173268
Change-Id: I8c502ae6aad3cf3c13fae81722c367f45d70fb18
2015-11-16 11:05:10 +00:00
Nick Kralevich
9bb0ec1d1b zygote.te: Remove deprecated rules
am: 5c57e7c238

* commit '5c57e7c2386e49bd8ded4fd482e61583159301b1':
  zygote.te: Remove deprecated rules
2015-11-12 02:19:11 +00:00
Nick Kralevich
5c57e7c238 zygote.te: Remove deprecated rules
f063f461a9 marked several zygote.te
rules as "deprecated in M". Now that M is out the door, delete
the obsolete rules.

Change-Id: I7ff8abe8659bbcf7aa0b5c612ce3822a238df8ca
2015-11-11 16:47:44 -08:00
Calin Juravle
1ca5efe905 Add SElinux rules for /data/misc/trace
am: f255d775fc

* commit 'f255d775fceb18df08011f61560815cd1bfe47fd':
  Add SElinux rules for /data/misc/trace
2015-11-11 18:11:58 +00:00
Calin Juravle
f255d775fc Add SElinux rules for /data/misc/trace
The directory is to be used in eng/userdebug build to store method
traces (previously stored in /data/dalvik-cache/profiles).

Bug: 25612377

Change-Id: Ia4365a8d1f13d33ee54115dc5e3bf62786503993
2015-11-11 10:33:51 +00:00
Jeffrey Vander Stoep
c97f86ebcb Merge "remove overly permissive rules from domain"
am: 7151f75492

* commit '7151f7549269089a2aaab48493881c8b0ea5dd8e':
  remove overly permissive rules from domain
2015-11-09 21:54:57 +00:00
Jeffrey Vander Stoep
7151f75492 Merge "remove overly permissive rules from domain" 2015-11-09 21:50:47 +00:00
Jeff Vander Stoep
6e3506e1ba remove overly permissive rules from domain
Move to domain_deprecated

Bug: 25433265
Change-Id: Ib21876e450d8146ef9363d6430f6c7f00ab0c7f3
2015-11-09 08:44:13 -08:00
Nick Kralevich
7de86e2c62 system_server: clean up stale rules
am: 142f97b758

* commit '142f97b758c232ef0300578371152739d81408a3':
  system_server: clean up stale rules
2015-11-07 17:45:54 +00:00
Nick Kralevich
142f97b758 system_server: clean up stale rules
979adffd45 added an auditallow
to see if system_server was relabeling system_data_file.
The auditallow rule hasn't triggered, so remove the allow rule.

a3c97a7660 added an auditallow
to see if system_server was executing toolbox. The auditallow
rule hasn't triggered, so remove the allow rule. AFAIK,
system_server never executes ANY file, so further tightening here
is feasible.

Change-Id: Ia0a93f3833e32c3e2c898463bd8813701a6dd20a
2015-11-07 09:20:16 -08:00
Jeff Vander Stoep
e2280fbcdd Create attribute for moving perms out of domain
am: d22987b4da

* commit 'd22987b4daf02a8dae5bb10119d9ec5ec9f637cf':
  Create attribute for moving perms out of domain
2015-11-03 23:56:50 +00:00
Jeff Vander Stoep
d22987b4da Create attribute for moving perms out of domain
Motivation: Domain is overly permissive. Start removing permissions
from domain and assign them to the domain_deprecated attribute.
Domain_deprecated and domain can initially be assigned to all
domains. The goal is to not assign domain_deprecated to new domains
and to start removing domain_deprecated where it is not required or
reassigning the appropriate permissions to the inheriting domain
when necessary.

Bug: 25433265
Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
2015-11-03 23:11:11 +00:00
Bill Yi
134e665df2 Merge commit '8810311a31827f1e4d5d2fadbc212828ad23cc04' into HEAD 2015-11-03 14:29:50 -08:00
dcashman
e25588fba8 Enable permission checking by binderservicedomain.
am: 000b69499a

* commit '000b69499aa233a7277b828756c01b27a47b17ce':
  Enable permission checking by binderservicedomain.
2015-10-29 22:29:56 +00:00
dcashman
000b69499a Enable permission checking by binderservicedomain.
binderservicedomain services often expose their methods to untrusted
clients and rely on permission checks for access control.  Allow these
services to query the permission service for access decisions.

(cherry-pick of commit: 32d207e042)

Bug: 25282923
Change-Id: I39bbef479de3a0df63e0cbca956f3546e13bbb9b
2015-10-29 12:45:37 -07:00
Jeffrey Vander Stoep
4c445999d1 Merge "audit mtp sync permission"
am: 6fc134e3e5

* commit '6fc134e3e529e2a79c754593b2ca660cabcd81ed':
  audit mtp sync permission
2015-10-29 18:18:23 +00:00
Jeffrey Vander Stoep
6fc134e3e5 Merge "audit mtp sync permission" 2015-10-29 18:11:04 +00:00
Nick Kralevich
8810311a31 Create a new SELinux type for /data/nativetest am: e9d261ff17
am: 6dd7d3cd84

* commit '6dd7d3cd84855142779218b696a226ced8c70417':
  Create a new SELinux type for /data/nativetest
2015-10-29 00:25:04 +00:00
Nick Kralevich
6dd7d3cd84 Create a new SELinux type for /data/nativetest
am: e9d261ff17

* commit 'e9d261ff17648e7d08f8fe86909ad0522fbbafb3':
  Create a new SELinux type for /data/nativetest
2015-10-29 00:17:40 +00:00
Nick Kralevich
e9d261ff17 Create a new SELinux type for /data/nativetest
1) Don't use the generic "system_data_file" for the files in /data/nativetest.
Rather, ensure it has it's own special label. This allows us to distinguish
these files from other files in SELinux policy.

2) Allow the shell user to execute files from /data/nativetest, on
userdebug or eng builds only.

3) Add a neverallow rule (compile time assertion + CTS test) that nobody
is allowed to execute these files on user builds, and only the shell user
is allowed to execute these files on userdebug/eng builds.

Bug: 25340994
Change-Id: I3e292cdd1908f342699d6c52f8bbbe6065359413
2015-10-28 17:00:30 -07:00
Jeff Vander Stoep
94ee59bc4a audit mtp sync permission
Determine if the following rule can be removed:

allow kernel untrusted_app:fd use

Bug: 25331459
Change-Id: I4ef9f376d7fc1d2bdfba69b2fb3e24d49ac136ad
2015-10-28 08:57:40 -07:00
Nick Kralevich
27743c0ffe Update text relocation neverallow assertions am: 89424bf947
am: 984b0030a1

* commit '984b0030a1e26ecfc5451845e3a3dfe03c72a30e':
  Update text relocation neverallow assertions
2015-10-28 01:25:23 +00:00
Nick Kralevich
984b0030a1 Update text relocation neverallow assertions
am: 89424bf947

* commit '89424bf9470931df90afa4f6d141b3696ad5a632':
  Update text relocation neverallow assertions
2015-10-28 01:21:01 +00:00
Nick Kralevich
89424bf947 Update text relocation neverallow assertions
1) Don't allow any SELinux domain to attempt to perform a text
relocation on a file from the /system partition. It's not supported
and should never be attempted.

2) Completely block any non-app SELinux domains from using text
relocations, regardless of the source.

Bug: 20013628
Change-Id: I82573398d0d5586264a717a1e400a3dbc7793fe3
2015-10-27 17:15:34 -07:00
Bruce Beare
4516643186 Define the i2C device policy am: 59019fd72a
am: 5a3132bbeb

* commit '5a3132bbeb16107e637890b6abc7ccc1cf648771':
  Define the i2C device policy
2015-10-28 00:05:06 +00:00
Bruce Beare
5a3132bbeb Define the i2C device policy
am: 59019fd72a

* commit '59019fd72a46bb4d1fa4e14e15122f56841f2e0d':
  Define the i2C device policy
2015-10-27 23:54:11 +00:00
Bruce Beare
59019fd72a Define the i2C device policy
Change-Id: I93d9cfea2f2148bb042d1cb8af3649524ad31034
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2015-10-27 16:40:54 -07:00
Jeff Vander Stoep
fa6169ade8 Fix MTP sync am: 9ba8ade5d2
am: 34d81d9152

* commit '34d81d9152cd2adc8758f84aca0e36bac64e99c0':
  Fix MTP sync
2015-10-27 04:01:25 +00:00
Jeff Vander Stoep
34d81d9152 Fix MTP sync
am: 9ba8ade5d2

* commit '9ba8ade5d2b24bd1f9083e8a51e7d586e609e28a':
  Fix MTP sync
2015-10-27 03:58:36 +00:00
Jeff Vander Stoep
9ba8ade5d2 Fix MTP sync
Address the following denial:
avc: denied { use } for path="/storage/emulated/0/305512.pdf" dev="fuse"
ino=239 scontext=u:r:kernel:s0 tcontext=u:r:priv_app:s0:c512,c768 tclass=fd
permissive=0

Bug: 25068662
Change-Id: Ic29d9569ff387dfd411363db751c3642572c8e85
2015-10-26 20:32:49 -07:00
Jeff Vander Stoep
ad32785689 audit untrusted_app access to mtp_device am: 7b8f9f153e
am: 775dda1fb3

* commit '775dda1fb3641e3ea2be4124a9a77cb236648d6f':
  audit untrusted_app access to mtp_device
2015-10-23 18:12:32 +00:00
Jeff Vander Stoep
4b1c3de99a Temporarily downgrade to policy version number am: 0fc831c3b0
am: 312c2511f7

* commit '312c2511f7dfbebf110f1372db55d811bc1ad29f':
  Temporarily downgrade to policy version number
2015-10-23 18:12:28 +00:00
Jeff Vander Stoep
775dda1fb3 audit untrusted_app access to mtp_device
am: 7b8f9f153e

* commit '7b8f9f153edf7c8bbefe3d472c86419d8048e5dd':
  audit untrusted_app access to mtp_device
2015-10-23 18:05:09 +00:00
Jeff Vander Stoep
312c2511f7 Temporarily downgrade to policy version number
am: 0fc831c3b0

* commit '0fc831c3b0b8d9a4e10d0931131a0eed06cd4275':
  Temporarily downgrade to policy version number
2015-10-23 18:05:05 +00:00
Jeff Vander Stoep
7b8f9f153e audit untrusted_app access to mtp_device
android.process.media moved to priv_app. Add audit rule to test if
untrusted_app still requires access or if some/all permissions may
be removed.

Bug: 25085347
Change-Id: I13bae9c09bd1627b2c06ae84b069778984f9bd5d
2015-10-23 18:03:01 +00:00
Jeff Vander Stoep
0fc831c3b0 Temporarily downgrade to policy version number
Temporarily move from policy version 30 to 29 until device kernels
and prebuilts are all upgraded to the accepted upstream version of
the selinux ioctl command whitelisting code.

(cherry picked from commit 89765083f7)

Bug: 22846070

Change-Id: I31d1e80aaee164cf41a2f01c6ca846a000898ef4
2015-10-23 10:16:00 -07:00
Anthony Hugh
d19b20c30c Merge "Revert "Update sepolicy to allow ThermalObserver system service"" into cw-e-dev
am: 753148a869

* commit '753148a8691b7b5d29ee0ebab400c1eb7b2a7c27':
  Revert "Update sepolicy to allow ThermalObserver system service"
2015-10-22 22:27:54 +00:00
Anthony Hugh
753148a869 Merge "Revert "Update sepolicy to allow ThermalObserver system service"" into cw-e-dev 2015-10-22 22:22:44 +00:00
Anthony Hugh
2d8c2d9779 Revert "Update sepolicy to allow ThermalObserver system service"
This reverts commit cda36e31d1.
This will be moved to a device specific file.

BUG: 24555181

Change-Id: I0eb543211245c37da77bbf42449f70ff3fdf79ec
2015-10-22 21:58:51 +00:00