Commit graph

10383 commits

Author SHA1 Message Date
Alex Klyubin
5e6a4dd332 Merge "Mark all clients of Allocator HAL" am: 73a6f38b94 am: 5d8fcf3bb0
am: f91f369d68

Change-Id: I58593c82cd9b7b1dc7fcdfa8916f4bf55a3d9ab4
2017-03-24 22:52:37 +00:00
Alex Klyubin
f91f369d68 Merge "Mark all clients of Allocator HAL" am: 73a6f38b94
am: 5d8fcf3bb0

Change-Id: I5f88b48df906acb9381dc853d61dcd5ef8d5e4e4
2017-03-24 22:50:36 +00:00
Alex Klyubin
5d8fcf3bb0 Merge "Mark all clients of Allocator HAL"
am: 73a6f38b94

Change-Id: I24d9be712209ee22a33ae858001c4e38e0eb763a
2017-03-24 22:48:41 +00:00
Alex Klyubin
73a6f38b94 Merge "Mark all clients of Allocator HAL" 2017-03-24 22:42:35 +00:00
Alex Klyubin
882bfbbab7 su and perfprofd are coredomain too am: 6b558dcbea am: e1742ef066
am: f535a40d6e

Change-Id: I66da4d14a2388b1241b755280682f6e7d93d3830
2017-03-24 22:39:36 +00:00
Alex Klyubin
f535a40d6e su and perfprofd are coredomain too am: 6b558dcbea
am: e1742ef066

Change-Id: I007ae4064a8daf690b15bc5196131169727cbec9
2017-03-24 22:38:06 +00:00
Alex Klyubin
e1742ef066 su and perfprofd are coredomain too
am: 6b558dcbea

Change-Id: I82c412038e43bb343dc355c9d1e56a11f6da6542
2017-03-24 22:35:41 +00:00
Alex Klyubin
7cda44f49f Mark all clients of Allocator HAL
This change associates all domains which are clients of Allocator HAL
with hal_allocator_client and the, required for all HAL client
domains, halclientdomain.

This enables this commit to remove the now unnecessary hwallocator_use
macro because its binder_call(..., hal_allocator_server) is covered by
binder_call(hal_allocator_client, hal_allocator_server) added in this
commit.

Unfortunately apps, except isolated app, are clients of Allocator HAL
as well. This makes it hard to use the hal_client_domain(...,
hal_allocator) macro because it translates into "typeattribute" which
currently does not support being provided with a set of types, such as
{ appdomain -isolated_app }. As a workaround, hopefully until
typeattribute is improved, this commit expresses the necessary
association operation in CIL. private/technical_debt.cil introduced by
this commit is appended into the platform policy CIL file, thus
ensuring that the hack has effect on the final monolithic policy.

P. S. This change also removes Allocator HAL access from isolated_app.
Isolated app shouldn't have access to this HAL anyway.

Test: Google Play Music plays back radios
Test: Google Camera records video with sound and that video is then
      successfully played back with sound
Test: YouTube app plays back clips with sound
Test: YouTube in Chrome plays back clips with sound
Bug: 34170079
Change-Id: Id00bba6fde83e7cf04fb58bc1c353c2f66333f92
2017-03-24 13:54:43 -07:00
Alex Klyubin
6b558dcbea su and perfprofd are coredomain too
This is a follow-up to f5446eb148 where
I forgot to associate su and perfprofd domains with coredomain.

Test: mmm system/sepolicy
      sepolicy-analyze $OUT/root/sepolicy attribute coredomain
Bug: 35870313
Change-Id: I13f90693843f7c6fe9fea8e5332aa6dd9558478a
2017-03-24 09:31:50 -07:00
Alex Klyubin
d9ff859704 Mark vr_wm as coredomain
This couldn't be done in earlier because this domain does not yet exist
in AOSP master.

Test: mmm system/sepolicy -- no errors
Bug: 35870313
Change-Id: I323e5c22e471cd1900b88d0d1d4edfb5973a33d7
2017-03-24 08:06:28 -07:00
Alex Klyubin
68e6109d4a Vendor domains must not use Binder am: f5446eb148 am: 2fe065d708
am: 49ce439425

Change-Id: I1b38d903e61188594d0de80be479e7d9e045fb26
2017-03-24 15:03:44 +00:00
Alex Klyubin
49ce439425 Vendor domains must not use Binder am: f5446eb148
am: 2fe065d708

Change-Id: Ieefcec5619fc2b941a675b473661dc561864ffc9
2017-03-24 15:02:11 +00:00
Alex Klyubin
2fe065d708 Vendor domains must not use Binder
am: f5446eb148

Change-Id: I23d5d274ae05a9b0bdac6872be86c3f56aec734e
2017-03-24 15:00:10 +00:00
Alex Klyubin
f5446eb148 Vendor domains must not use Binder
On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
apps) are not permitted to use Binder. This commit thus:
* groups non-vendor domains using the new "coredomain" attribute,
* adds neverallow rules restricting Binder use to coredomain and
  appdomain only, and
* temporarily exempts the domains which are currently violating this
  rule from this restriction. These domains are grouped using the new
  "binder_in_vendor_violators" attribute. The attribute is needed
  because the types corresponding to violators are not exposed to the
  public policy where the neverallow rules are.

Test: mmm system/sepolicy
Test: Device boots, no new denials
Test: In Chrome, navigate to ip6.me, play a YouTube video
Test: YouTube: play a video
Test: Netflix: play a movie
Test: Google Camera: take a photo, take an HDR+ photo, record video with
      sound, record slow motion video with sound. Confirm videos play
      back fine and with sound.
Bug: 35870313
Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
2017-03-24 07:54:00 -07:00
Alex Klyubin
463f9a491c Merge "Remove unnecessary rules from NFC HAL clients" am: 93f99cb1d9 am: 3d12305d42
am: da6c88c93c

Change-Id: I9b2c1457c7c8cf3a6c8edde11e4dad8883bbf34c
2017-03-24 05:29:32 +00:00
Alex Klyubin
da6c88c93c Merge "Remove unnecessary rules from NFC HAL clients" am: 93f99cb1d9
am: 3d12305d42

Change-Id: Id45b1a26067b7525feabb029d5c98270d0c5994b
2017-03-24 05:26:32 +00:00
Alex Klyubin
3d12305d42 Merge "Remove unnecessary rules from NFC HAL clients"
am: 93f99cb1d9

Change-Id: I877e23910bc424a2026bab1d9669bc6537ea5c31
2017-03-24 05:25:03 +00:00
Treehugger Robot
93f99cb1d9 Merge "Remove unnecessary rules from NFC HAL clients" 2017-03-24 05:20:12 +00:00
Steven Moreland
cd525cdaeb Merge "Allow bugreport to dump some HAL processes." am: 45afc7a68a am: 1ecff6facd
am: 165c37017b

Change-Id: I76b85c42d2a24810de78e56d6f9624eb8df04c90
2017-03-23 21:00:56 +00:00
Steven Moreland
165c37017b Merge "Allow bugreport to dump some HAL processes." am: 45afc7a68a
am: 1ecff6facd

Change-Id: I9e4aefbdc5ec712164cb2946cda4b51a3967c8c3
2017-03-23 20:58:25 +00:00
Steven Moreland
1ecff6facd Merge "Allow bugreport to dump some HAL processes."
am: 45afc7a68a

Change-Id: I73d31158b87c68fa5b4ee80e33a397bb1be7c010
2017-03-23 20:55:01 +00:00
Treehugger Robot
45afc7a68a Merge "Allow bugreport to dump some HAL processes." 2017-03-23 20:51:04 +00:00
Steven Moreland
f20b04efdb Allow bugreport to dump some HAL processes.
Whitelist several hals which can be dumped by bugreports. Don't want to
dump more because of the time it takes and also certain hals have
sensitive data which shouldn't be dumped (i.e. keymaster).

Test: dumps work for given hals
Bug: 36414311
Change-Id: Ic0eddfa95fa33abbc983d3b5161e42c240663f22
2017-03-23 12:19:17 -07:00
Martijn Coenen
4ca2d4a4ac Merge "Initial sepolicy for vndservicemanager." am: 4dd14f69cb am: 392c86e929
am: d7b8338e71  -s ours

Change-Id: I66d268eb596277171a88377dad0e613a7497e3f4
2017-03-23 16:48:11 +00:00
Martijn Coenen
d7b8338e71 Merge "Initial sepolicy for vndservicemanager." am: 4dd14f69cb
am: 392c86e929

Change-Id: Id520704ad8a2be81648c33d2d1ef4a865badacd0
2017-03-23 16:42:41 +00:00
Martijn Coenen
392c86e929 Merge "Initial sepolicy for vndservicemanager."
am: 4dd14f69cb

Change-Id: I60c3e0f1441aa4f548b1875e68f49c2047bf74e4
2017-03-23 16:34:41 +00:00
Martijn Coenen
4dd14f69cb Merge "Initial sepolicy for vndservicemanager." 2017-03-23 16:22:27 +00:00
Steven Moreland
ab9241c952 Allow hals to read hwservicemanager prop. am: d3ce5dc38c am: d437f0e09d
am: 4c013db7d6

Change-Id: I77c714f588bdc78020af4e7dbf6a89d9e6792ca6
2017-03-23 03:53:11 +00:00
Steven Moreland
4c013db7d6 Allow hals to read hwservicemanager prop. am: d3ce5dc38c
am: d437f0e09d

Change-Id: Ib72b4435a8173a213f1ddb3331afc0bebf991029
2017-03-23 03:49:39 +00:00
Steven Moreland
d437f0e09d Allow hals to read hwservicemanager prop.
am: d3ce5dc38c

Change-Id: Ifd66a82a429b18f6e0077b042dccef38ddcd636d
2017-03-23 03:47:10 +00:00
Steven Moreland
d3ce5dc38c Allow hals to read hwservicemanager prop.
Test: no relevant denials on marlin while booting
Test: no relevant denials on angler while booting
Bug: 36278706
Change-Id: Ieba79e1c8fca4f74c63bc63e6dd0bdcf59204ca2
2017-03-23 01:50:50 +00:00
Martijn Coenen
e7d8f4c3c8 Initial sepolicy for vndservicemanager.
vndservicemanager is the context manager for binder services
that are solely registered and accessed from vendor processes.

Bug: 36052864
Test: vendorservicemanager runs
Merged-In: Ifbf536932678d0ff13d019635fe6347e185ef387
Change-Id: I430f1762eb83825f6cd4be939a69d46a8ddc80ff
2017-03-23 00:20:43 +00:00
Alex Klyubin
e539570694 Remove unnecessary rules from NFC HAL clients
Rules in clients of NFC HAL due to the HAL running (or previously
running) in passthrough mode are now targeting hal_nfc. Domains which
are clients of NFC HAL are associated with hal_nfc only the the HAL
runs in passthrough mode. NFC HAL server domains are always associated
with hal_nfc and thus get these rules unconditionally.

This commit also moves the policy of nfc domain to private. The only
thing remaining in the public policy is the existence of this domain.
This is needed because there are references to this domain in public
and vendor policy.

Test: Open a URL in Chrome, NFC-tap Android to another Android and
      observe that the same URL is opened in a web browser on the
      destination device. Do the same reversing the roles of the two
      Androids.
Test: Install an NFC reader app, tap a passive NFC tag with the
      Android and observe that the app is displaying information about
      the tag.
Test: No SELinux denials to do with NFC before and during and after
      the above tests on sailfish, bullhead, and angler.
Bug: 34170079

Change-Id: I29fe43f63d64b286c28eb19a3a9fe4f630612226
2017-03-22 16:22:33 -07:00
Jeff Vander Stoep
3ee107ff5e Merge "Grant additional permissions for ASAN builds" am: 63211f8da2 am: 1c05f80071
am: 8f0abfec15

Change-Id: Id2a898b91932fa74389586bb534cb1dba3bfe26c
2017-03-22 23:14:43 +00:00
Jeff Vander Stoep
8f0abfec15 Merge "Grant additional permissions for ASAN builds" am: 63211f8da2
am: 1c05f80071

Change-Id: Icb9150c5828272df8ccfce8a4145df2f3c987c45
2017-03-22 23:12:08 +00:00
Jeff Vander Stoep
1c05f80071 Merge "Grant additional permissions for ASAN builds"
am: 63211f8da2

Change-Id: If8aa9152a643522fc896b7a412d3fafb19043649
2017-03-22 23:09:29 +00:00
Treehugger Robot
63211f8da2 Merge "Grant additional permissions for ASAN builds" 2017-03-22 22:46:58 +00:00
Sandeep Patil
2819620e8f Merge "dumpstate: allow HALs to read /proc/interrupts" am: 871e44c456 am: e2f8626ed3
am: e43f5c9792

Change-Id: I40ee71a3473e23a29b370cdc8be7cabd8e8245fc
2017-03-22 22:32:39 +00:00
Sandeep Patil
e43f5c9792 Merge "dumpstate: allow HALs to read /proc/interrupts" am: 871e44c456
am: e2f8626ed3

Change-Id: If401e4107787e6620ed31115c45b7d594812dbe5
2017-03-22 22:30:05 +00:00
Sandeep Patil
e2f8626ed3 Merge "dumpstate: allow HALs to read /proc/interrupts"
am: 871e44c456

Change-Id: I1c261dc247b93306c6d1a70dd0014532c84843c5
2017-03-22 22:29:11 +00:00
Martijn Coenen
7cfba9a773 Merge "Initial sepolicy for vndservicemanager." 2017-03-22 22:14:05 +00:00
Treehugger Robot
871e44c456 Merge "dumpstate: allow HALs to read /proc/interrupts" 2017-03-22 22:09:39 +00:00
Steven Moreland
bc915757f0 Merge "hwservicemanager: halserverdomain" am: 6456542f3e am: 3d49330bed
am: 23bf2d440b

Change-Id: Ib9d7b139d7792eedf3c8963cdc12fbe9f194f0f4
2017-03-22 21:39:53 +00:00
Steven Moreland
23bf2d440b Merge "hwservicemanager: halserverdomain" am: 6456542f3e
am: 3d49330bed

Change-Id: I1ceaf1d95f07b8c4635a6055384cf6dcff932d51
2017-03-22 21:37:01 +00:00
Steven Moreland
3d49330bed Merge "hwservicemanager: halserverdomain"
am: 6456542f3e

Change-Id: I353c8d695a5c995f72fe865f27682a05011f8f55
2017-03-22 21:34:44 +00:00
Treehugger Robot
6456542f3e Merge "hwservicemanager: halserverdomain" 2017-03-22 21:28:46 +00:00
Jeff Vander Stoep
7443484831 Grant additional permissions for ASAN builds
ASAN builds may require additional permissions to launch processes
with ASAN wrappers. In this case, system_server needs permission to
execute /system/bin/sh.

Create with_asan() macro which can be used exclusively on debug
builds. Note this means that ASAN builds with these additional
permission will not pass the security portion of CTS - like any
other debug build.

Addresses:
avc: denied { execute } for name="sh" dev="dm-0" ino=571
scontext=u:r:system_server:s0 tcontext=u:object_r:shell_exec:s0
tclass=file

Test: lunch aosp_marlin-userdebug;
      cd system/sepolicy; mm SANITIZE_TARGET=address;
      Verify permissions granted using with_asan() are granted.
Test: lunch aosp_marlin-userdebug;
      cd system/sepolicy; mm;
      Verify permissions granted using with_asan() are not granted.
Test: lunch aosp_marlin-user;
      cd system/sepolicy; mm SANITIZE_TARGET=address;
      Verify permissions granted using with_asan() are not granted.
Bug: 36138508
Change-Id: I6e39ada4bacd71687a593023f16b45bc16cd7ef8
2017-03-22 14:03:07 -07:00
Sandeep Patil
a866a416e9 dumpstate: allow HALs to read /proc/interrupts
/proc/interrupts may be dumped by dumpstate HAL if required.

Bug: 36486169
Test: 'adb shell bugreport' on sailfish

Change-Id: Ifc41a516aeea846bc56b86b064bda555b43c58ed
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-03-22 13:26:03 -07:00
Roshan Pius
66cf8ebe9a Merge "wpa_supplicant: Remove unnecessary permissions from system_server" am: e1a350a035 am: 790052147c
am: 180a688261

Change-Id: Ic5e8018fd106a645d24f52b8502fff3e4c603f7e
2017-03-22 20:26:02 +00:00
Roshan Pius
180a688261 Merge "wpa_supplicant: Remove unnecessary permissions from system_server" am: e1a350a035
am: 790052147c

Change-Id: Icf0aefc596f8c3df64be9bc68b4c1f4243059747
2017-03-22 20:23:26 +00:00