Commit graph

5550 commits

Author SHA1 Message Date
Nick Kralevich
5e8402df43 adbd: allow ddms screen capture to work again
The removal of domain_deprecated broke ddms screen capturing
functionality.

Steps to reproduce:

1) Run "ddms"
2) Select your device
3) Go to the Device > Screen Capture menu
4) Attempt to take a screenshot

Addresses the following denials:

  avc: denied { read } for pid=2728 comm="screencap" name="ion" dev="tmpfs" ino=7255 scontext=u:r:adbd:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
  avc: denied { open } for pid=2728 comm="screencap" name="ion" dev="tmpfs" ino=7255 scontext=u:r:adbd:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
  avc: denied { ioctl } for pid=2728 comm="screencap" path="/dev/ion" dev="tmpfs" ino=7255 ioctlcmd=4905 scontext=u:r:adbd:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
  avc: denied { read } for pid=5261 comm="screencap" name="egl" dev="dm-1" ino=210 scontext=u:r:adbd:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
  avc: denied { read } for pid=5261 comm="screencap" name="egl" dev="dm-1" ino=210 scontext=u:r:adbd:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0

Bug: 26023462
Change-Id: Ie77c65900de56756d5c9b99dcda1e20664151ed2
2015-12-07 15:48:57 -08:00
Nick Kralevich
e9d43070e4 adbd: allow "adb pull /sdcard/"
am: b899f4fc33

* commit 'b899f4fc33e93ad6ec3d81c39e17eae5ea2fef4f':
  adbd: allow "adb pull /sdcard/"
2015-12-07 23:20:33 +00:00
Nick Kralevich
b899f4fc33 adbd: allow "adb pull /sdcard/"
The removal of domain_deprecated broke the ability for adbd to
pull files from /sdcard. Re-allow it.

Addresses the following denials:

  avc: denied { search } for pid=2753 comm=73657276696365203530 name="/" dev="tmpfs" ino=6242 scontext=u:r:adbd:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=0
  avc: denied { getattr } for pid=2755 comm=73657276696365203431 path="/sdcard" dev="rootfs" ino=5472 scontext=u:r:adbd:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0

Change-Id: I70257933f554abd008932c7f122dd0151f464b05
2015-12-07 14:55:23 -08:00
Felipe Leme
8cf8a9d01c Increase communication surface between dumpstate and Shell:
am: 83fd8a54f5

* commit '83fd8a54f54033837f168bbd61012fa5373a4e4c':
  Increase communication surface between dumpstate and Shell:
2015-12-04 14:28:26 -08:00
Felipe Leme
83fd8a54f5 Increase communication surface between dumpstate and Shell:
- Add a new 'dumpstate' context for system properties. This context
  will be used to share state between dumpstate and Shell. For example,
  as dumpstate progresses, it will update a system property, which Shell
  will use to display the progress in the UI as a system
  notification. The user could also rename the bugreport file, in which
  case Shell would use another system property to communicate such
  change to dumpstate.
- Allow Shell to call 'ctl.bugreport stop' so the same system
  notification can be used to stop dumpstate.

BUG: 25794470

Change-Id: I74b80bda07292a91358f2eea9eb8444caabc5895
2015-12-04 14:08:28 -08:00
Jeffrey Vander Stoep
0676757d17 Merge "rild: Remove toolbox_exec perms"
am: f6a0b144ae

* commit 'f6a0b144aecee7376ea5e661981354256fc8f375':
  rild: Remove toolbox_exec perms
2015-12-04 21:11:00 +00:00
Jeffrey Vander Stoep
f6a0b144ae Merge "rild: Remove toolbox_exec perms" 2015-12-04 21:05:24 +00:00
Nick Kralevich
298a38ed3d shell.te: Allow read access to system_file
am: 29b9532a9e

* commit '29b9532a9e775184ae47025d3c6aa2c719806483':
  shell.te: Allow read access to system_file
2015-12-04 17:13:33 +00:00
Nick Kralevich
29b9532a9e shell.te: Allow read access to system_file
Certain tests depend on the ability to examine directories
in /system. Allow it to the shell user.

Addresses the following denials:

  avc: denied { read } for name="egl" dev="dm-1" ino=104 scontext=u:r:shell:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0

Bug: 26020967
Bug: 26023420
Change-Id: I509d921e159e99164c85fae9e8b2982a47573d14
2015-12-04 09:05:02 -08:00
Jeff Vander Stoep
e811c49fce rild: Remove toolbox_exec perms
Confirmed via audit logs that it is not required.

Change-Id: I01d4b7ec15d4c852a9f28daf0b40ab4bce930125
2015-12-04 08:36:55 -08:00
Jeffrey Vander Stoep
cd47828c12 Merge "Further restrict access to tun_device"
am: 98c3f9971f

* commit '98c3f9971f4b551fd5578c63f77fa9111bed94ad':
  Further restrict access to tun_device
2015-12-04 01:38:37 +00:00
Jeffrey Vander Stoep
98c3f9971f Merge "Further restrict access to tun_device" 2015-12-04 01:32:54 +00:00
Jeff Vander Stoep
e555f4b971 Further restrict access to tun_device
Remove bluetooth's access to tun_device. Auditallow rule demonstrates
that it's not used.

Strengthen the neverallow on opening tun_device to include all Apps.

Bug: 24744295
Change-Id: Iba85ba016b1e24c6c12d5b33e46fe8232908aac1
2015-12-03 15:56:04 -08:00
Tom Cherry
c28d909159 Merge "Support fine grain read access control for properties"
am: 6fa6bdb6ee

* commit '6fa6bdb6ee70994da64baff0499687d6a565d773':
  Support fine grain read access control for properties
2015-12-03 22:58:52 +00:00
Tom Cherry
6fa6bdb6ee Merge "Support fine grain read access control for properties" 2015-12-03 22:55:32 +00:00
Tom Cherry
949d7cbc29 Support fine grain read access control for properties
Properties are now broken up from a single /dev/__properties__ file into
multiple files, one per property label.  This commit provides the
mechanism to control read access to each of these files and therefore
sets of properties.

This allows full access for all domains to each of these new property
files to match the current permissions of /dev/__properties__.  Future
commits will restrict the access.

Bug: 21852512

Change-Id: Ie9e43968acc7ac3b88e354a0bdfac75b8a710094
2015-12-03 14:06:10 -08:00
Nick Kralevich
d483d2f3d4 shell.te: allow pulling the currently running SELinux policy
am: ad22e86740

* commit 'ad22e86740132ba0541506edebb7a6c1da70017b':
  shell.te: allow pulling the currently running SELinux policy
2015-12-03 21:56:21 +00:00
Nick Kralevich
ad22e86740 shell.te: allow pulling the currently running SELinux policy
Allow pulling the currently running SELinux policy for CTS.

Change-Id: I82ec03724a8e5773b3b693c4f39cc7b5c3ae4516
2015-12-03 13:28:14 -08:00
Jeffrey Vander Stoep
d95780ac93 Merge "Allow priv_apps to stat files on the system partition"
am: 1d58b2fdea

* commit '1d58b2fdea644f2ac02e8c1552754ea7c4b576e4':
  Allow priv_apps to stat files on the system partition
2015-12-03 21:25:31 +00:00
Jeffrey Vander Stoep
1d58b2fdea Merge "Allow priv_apps to stat files on the system partition" 2015-12-03 21:20:18 +00:00
Jeff Vander Stoep
2b56e4844e Allow priv_apps to stat files on the system partition
Allows safetynet to scan the system partition which is made up of
files labeled system_file (already allowed) and/or files with the
exec_type attribute.

Bug: 25821333
Change-Id: I9c1c9c11bc568138aa115ba83238ce7475fbc5e4
2015-12-03 13:00:07 -08:00
Jeffrey Vander Stoep
d9c22bc4bc Merge "bootanim: Remove domain_deprecated"
am: a0757c4d54

* commit 'a0757c4d5487e08d7c8e4428dea1703ce77ca49d':
  bootanim: Remove domain_deprecated
2015-12-02 21:36:39 +00:00
Jeffrey Vander Stoep
a0757c4d54 Merge "bootanim: Remove domain_deprecated" 2015-12-02 21:33:04 +00:00
Jeff Vander Stoep
855ffe588e bootanim: Remove domain_deprecated
Remove domain_deprecated from bootanim. This removes some unnecessarily
permissive rules.

As part of this, re-allow access to cgroups, proc and sysfs, removed as
a result of removing domain_deprecated.

Bug: 25433265
Change-Id: I58658712666c719c8f5a39fe2076c4f6d166616c
2015-12-02 13:29:20 -08:00
Felipe Leme
1bee3fd24e Explicitly added permissions that were previously granted through domain_deprecated.
am: 15a1e0d41a

* commit '15a1e0d41a644a283a1b71e8807b5c64da879659':
  Explicitly added permissions that were previously granted through domain_deprecated.
2015-12-02 20:25:25 +00:00
Felipe Leme
15a1e0d41a Explicitly added permissions that were previously granted through
domain_deprecated.

BUG: 25965160
Change-Id: I586d082ef5fe49079cb0c4056f8e7b34fae48c03
2015-12-02 12:16:24 -08:00
Nick Kralevich
8dc9244673 mdnsd: Remove domain_deprecated
am: 4367cf2d1e

* commit '4367cf2d1e9b62b310a2187408afde0dee54897d':
  mdnsd: Remove domain_deprecated
2015-12-02 06:43:11 +00:00
Nick Kralevich
4367cf2d1e mdnsd: Remove domain_deprecated
Remove domain_deprecated from mdnsd. This removes some unnecessarily
permissive rules from mdnsd.

As part of this, re-allow /proc/net access, which is removed as
a result of removing domain_deprecated.

Bug: 25433265
Change-Id: Ie1cf27179ac2e9170cf4cd418aea3256b9534603
2015-12-01 16:51:47 -08:00
Nick Kralevich
f7a0cc51ab Add permissions back to app / shell domains
am: 8ff6a86da5

* commit '8ff6a86da526b18951c24a7971d71aac15f0fbca':
  Add permissions back to app / shell domains
2015-12-02 00:41:22 +00:00
Nick Kralevich
8ff6a86da5 Add permissions back to app / shell domains
Allow directory reads to allow tab completion in rootfs to work.

"pm" is crashing due to failure to access /data/dalvik-cache. Add
back in the permissions from domain_deprecated.

Allow /sdcard to work again.

Bug: 25954400
Change-Id: I48cfa92fabfa47ed3007a63b85284659ba94ea73
2015-12-01 16:28:28 -08:00
Nick Kralevich
781a4bed74 Allow appdomains to write on cgroup so it can start threads.
am: d618eb6f9c

* commit 'd618eb6f9cca63509fa05917680b7395ffc5fe60':
  Allow appdomains to write on cgroup so it can start threads.
2015-12-01 19:00:44 +00:00
Nick Kralevich
d618eb6f9c Allow appdomains to write on cgroup so it can start threads.
Addresses the following denial:

  avc: denied { write } for path="/dev/cpuctl/bg_non_interactive/tasks" dev="cgroup" ino=716 scontext=u:r:shell:s0 tcontext=u:object_r:cgroup:s0 tclass=file permissive=0

which started occurring because of https://android-review.googlesource.com/184260

Bug: 25945485
Change-Id: I6dcfb4bcfc473478e01e0e4690abf84c24128045
2015-12-01 10:26:33 -08:00
Nick Kralevich
78d03007ae Remove domain_deprecated from adbd and shell
am: 8ca19368da

* commit '8ca19368dae676ba8769c15ead2469a9f44e562e':
  Remove domain_deprecated from adbd and shell
2015-11-30 14:59:10 +00:00
Nick Kralevich
8ca19368da Remove domain_deprecated from adbd and shell
The extra permissions are not needed. Delete them.

This change also adds read permission for /data/misc/zoneinfo
back to all domains. libc refernces this directory for timezone
related files, and it feels dangerous and of little value to
try to restrict access. In particular, this causes problems when the
shell user attempts to run "ls -la" to show file time stamps in
the correct timezone.

Bug: 25433265
Change-Id: I666bb460e440515151e3bf46fe2e0ac0e7c99f46
2015-11-27 19:18:17 -08:00
Jeff Vander Stoep
eb59a815f4 Perms back to domain
am: 9a3d1c6bbe

* commit '9a3d1c6bbe73d3e5cfeb582564f971bc1cbe155a':
  Perms back to domain
2015-11-25 17:56:10 +00:00
Jeff Vander Stoep
9a3d1c6bbe Perms back to domain
allow reading symlinks in /data and getattr in /system

Change-Id: I8cc9ca056725cf10ebfeef474ebf9c80c5300a73
2015-11-25 09:31:40 -08:00
Sen Jiang
ea16de6179 Merge "Add bspatch to update_engine_exec."
am: 9b2b447212

* commit '9b2b447212649b867312b87e8eb6f8efdf5ae07b':
  Add bspatch to update_engine_exec.
2015-11-24 18:49:23 +00:00
Sen Jiang
9b2b447212 Merge "Add bspatch to update_engine_exec." 2015-11-24 18:43:36 +00:00
Nick Kralevich
4eee81382a Add auditallow for bluetoothdomain rules
am: cb835a2852

* commit 'cb835a2852997dde0be2941173f8c879ebbef157':
  Add auditallow for bluetoothdomain rules
2015-11-24 02:44:52 +00:00
Nick Kralevich
cb835a2852 Add auditallow for bluetoothdomain rules
Let's see if it's safe to get rid of them.

Bug: 25768265
Bug: 25767747
Change-Id: Iaf022b4dafe1cc9eab871c8d7ec5afd3cf20bf96
2015-11-23 17:15:11 -08:00
Sen Jiang
d33155be26 Add bspatch to update_engine_exec.
This allow bspatch to have same perssion as update_engine.

Also added a rule to allow update_engine to execute bspatch.

Bug: 24478450
Test: No more permission deny during delta update.

Change-Id: If94bc703b2f3fc32f901f0d7f300934316d4e9a4
2015-11-20 16:13:02 -08:00
Nick Kralevich
a049bb302f system_server: allow restorecon /data/system/users/0/fpdata
am: 4fd216060c

* commit '4fd216060ceb1353416d9398d30efbb5094dba9f':
  system_server: allow restorecon /data/system/users/0/fpdata
2015-11-20 02:51:39 +00:00
Nick Kralevich
4fd216060c system_server: allow restorecon /data/system/users/0/fpdata
Addresses the following denial:

  avc: denied { relabelfrom } for pid=9971 comm="system_server" name="fpdata" dev="dm-0" ino=678683 scontext=u:r:system_server:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0

Bug: 25801240
Change-Id: I043f48f410505acaee4bb97446945316f656a210
2015-11-19 18:26:51 -08:00
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