Commit graph

10734 commits

Author SHA1 Message Date
TreeHugger Robot
e1074f8bfc Merge "Allow adbd and shell to read /proc/config.gz" into oc-dev 2017-05-09 02:26:25 +00:00
Yifan Hong
19a87733c5 Allow adbd and shell to read /proc/config.gz
for CTS device info collection purposes.

Bug: 28656227
Test: m cts -j && cts-tradefed run cts -m Gesture --test
android.gesture.cts.GestureTest#testGetStrokes

Change-Id: I8caf3580fb05fb489dc5abb917c8cb78cb089fb7
2017-05-08 14:40:25 -07:00
Mikhail Naganov
7fa260ab0c hal_audio: Allow writing dump info into pipes when capturing BR
The following HAL methods use file descriptors to write dump
info comprising audioflinger debug dump:

IDevice.debugDump
IEffectsFactory.debugDump
IStream.debugDump

Bug: 37993476
Test: check contents of media.audio_flinger section in
      a bugreport captured on Pixel device
Merged-In: I77d347c019ac93c3ba0d54ce50f0fdc243b04685

Change-Id: Ia0531f715ae5f8b2599153e54a11e9eb4ee47d4b
2017-05-08 10:12:45 -07:00
Jeff Sharkey
c659e37c4b Merge "Allow installd to delete files via sdcardfs." into oc-dev 2017-05-06 01:58:15 +00:00
Jeff Sharkey
72f4c61979 Allow installd to delete files via sdcardfs.
When installd clears cached files on external storage, the sdcardfs
kernel filesystem needs to be kept in the loop to release any cached
dentries that it's holding onto.  (Otherwise the underlying disk
space isn't actually released.)

installd can already delete the underlying files directly (via the
media_rw_data_file rules), so this technically isn't expanding its
capabilities.

avc: granted { search } for name="/" dev="tmpfs" ino=6897 scontext=u:r:installd:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir
avc: denied { open } for path="/mnt/runtime/default/emulated/0/Android/data" dev="sdcardfs" ino=589830 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=1
avc: denied { write } for name="com.google.android.inputmethod.japanese" dev="sdcardfs" ino=590040 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=0
avc: denied { remove_name } for name="cache_r.m" dev="sdcardfs" ino=589868 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=0
avc: denied { getattr } for path="/mnt/runtime/default/emulated/0/Android/data/.nomedia" dev="sdcardfs" ino=589831 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=1

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37486230
Change-Id: Icfd00a9ba379b1f50c48fe85849304cf9859bcb2
2017-05-05 16:10:06 -06:00
Daniel Nicoara
0181f5f1f9 Merge "Remove vr_wm service selinux policy" into oc-dev 2017-05-05 14:56:18 +00:00
Dimitry Ivanov
a0d3ff8edd Allow getattr on tempfs files
This is needed by linker to be able to load libraries from memfd
which currently generated following denial:
avc: denied { getattr } for path=2F6D656D66643A666F6F626172202864656C6574656429 dev="tmpfs" ino=902079 scontext=u:r:shell:s0 tcontext=u:object_r:shell_tmpfs:s0 tclass=file permissive=0

Bug: http://b/37245203
Bug: http://b/37916741
Test: builds
Change-Id: I5b57b6cada50a62657c8daaaaaa56f1ee9cdb376
2017-05-03 21:52:18 -07:00
Ian Pedowitz
47859a9370 Merge "Revert "O is API 26"" into oc-dev 2017-05-04 00:07:10 +00:00
Ian Pedowitz
6b04a961b4 Revert "O is API 26"
This reverts commit 8713882bb8.

Reason for revert:  b/37355569

Bug: 37480230
Bug: 37896931
Bug: 37355569
Change-Id: Ic07d948fd0b4a0a8434e1f4f0c8e559c4258cf5e
2017-05-03 22:00:06 +00:00
TreeHugger Robot
b9d5d20790 Merge "sepolicy: allow AAudio apps to use FDs from the audio HAL" into oc-dev 2017-05-02 22:22:44 +00:00
TreeHugger Robot
7cc3f0a909 Merge "O is API 26" into oc-dev 2017-05-02 22:11:59 +00:00
Michael Wright
8713882bb8 O is API 26
Bug: 37480230
Bug: 37896931
Test: build, boot
Change-Id: Ib8d4309d37b8818163a17e7d8b25155c4645edcf
2017-05-02 20:50:49 +01:00
Steven Moreland
d64561f716 Allow omx hal access to vndbinder on all devices.
Whether a device is full Treble or not, omx should be able to
access vndbinder

Test: (sanity) oc-dev marlin boots + YouTube + lshal
Fixes: 37528973
Change-Id: Idd734b42c7dfe3e09e544680a6893b03910ecd3e
2017-05-02 18:25:07 +00:00
Salvador Martinez
66109bdbc6 Merge "Give system_server access to last reboot reason" into oc-dev 2017-05-01 16:45:30 +00:00
TreeHugger Robot
c28be99207 Merge "Allow audioserver to talk to bluetooth server" into oc-dev 2017-04-29 21:06:54 +00:00
TreeHugger Robot
bd08796853 Merge "Remove audio from socket_between.._violators" into oc-dev 2017-04-29 21:06:54 +00:00
Hassan Shojania
5fe8881bb6 Merge "Allow mediaserver to access fd allocated by hal_graphics_composer" into oc-dev 2017-04-29 20:15:17 +00:00
Chris Forbes
8027f979e3 Merge "allow surfaceflinger to use socket from adbd" into oc-dev 2017-04-29 19:57:08 +00:00
TreeHugger Robot
74a96734a9 Merge "Add default label and mapping for vendor services" into oc-dev 2017-04-29 18:05:30 +00:00
TreeHugger Robot
1177281825 Merge "untrusted_apps: allow untrusted_apps to execute from /vendor/app" into oc-dev 2017-04-29 13:49:41 +00:00
TreeHugger Robot
d811225511 Merge "Enable the use of IOmxStore service" into oc-dev 2017-04-29 11:51:52 +00:00
Hassan Shojania
a91e3e8294 Allow mediaserver to access fd allocated by hal_graphics_composer
Bug:  37713584
Test: With GtsMediaTestCases.apk installed, try:
      adb shell am instrument -w
      -e class 'com.google.android.media.gts.MediaPlayerTest#testLLAMA_H264_BASELINE_240P_800_DOWNLOADED_V0_SYNC'
      'com.google.android.media.gts/android.support.test.runner.AndroidJUnitRunner'

Change-Id: Icc2066e9d9bbc5c020b6d694e9627487771ef35e
2017-04-28 17:55:20 -07:00
Andreas Gampe
bddd189394 Sepolicy: Fix new access from the linker for postinstall
The linker now requires getattr rights for the filesystem. Otherwise
linking otapreopt and patchoat/dex2oat will fail.

Bug: 37776530
Test: m
Test: manual OTA
Change-Id: I1351fbfa101beca4ba80f84b0dd9dbcabe2c9d39
2017-04-28 17:34:41 -07:00
Pawin Vongmasa
98b7f66da9 Enable the use of IOmxStore service
Test: Manual use of Camera app
Test: lshal shows IOmxStore

Bug: 37657124
Bug: 37726880
Change-Id: I5459d992c2feb14bd26765673864e583d48e3ba4
2017-04-28 16:38:28 -07:00
Chris Forbes
676003cf3a allow surfaceflinger to use socket from adbd
Fixes `adb shell cmd gpu vkjson`, which was previously failing due to
surfaceflinger not being able to use the socket passed to it by adbd.

Bug: b/37157136
Test: run above command, verified on marlin + bullhead
Change-Id: I57fa7e99d5c3dc7bc7d033b83f8ce6032162d7d3
2017-04-28 16:36:02 -07:00
Sandeep Patil
ef7b210937 untrusted_apps: allow untrusted_apps to execute from /vendor/app
The typical use case is where vendor apps which run as untrusted apps
use libraries that are packaged withing the apk

Bug: 37753883
Test: Tested by runnig pre-installed app that packages a library from
      /vendor/app

Change-Id: I445144e37e49e531f4f43b13f34d6f2e78d7a3cf
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-04-28 15:27:37 -07:00
Phil Burk
d6e9c94908 sepolicy: allow AAudio apps to use FDs from the audio HAL
The API does not expose the FD directly. But they are
used by libaaudio.so linked with the app.

Needed for low latency audio.

Bug: 37167970
Test: NativeOboe touch to tone latency app
Change-Id: I92372eff44d856e9aff399dc9c64fd18524fdc44
Signed-off-by: Phil Burk <philburk@google.com>
2017-04-28 15:14:13 -07:00
Jeff Vander Stoep
082eae4e51 Add default label and mapping for vendor services
Adding the default label/mapping is important because:
1.  Lookups of services without an selinux label should generate
    a denial.
2.  In permissive mode, lookups of a service without a label should be
    be allowed, without the default label service manager disallows
    access.
3.  We can neverallow use of the default label.

Bug: 37762790
Test: Build and flash policy onto Marlin with unlabeled vendor services.
    Add/find of unlabeled vendor services generate a denial.

Change-Id: I66531deedc3f9b79616f5d0681c87ed66aca5b80
(cherry picked from commit 639a2b842c)
2017-04-28 14:56:57 -07:00
Steven Moreland
b0ed936373 Remove audio from socket_between.._violators
Test: Play Music over BT headset
Bug: 37640821
Change-Id: I1fe6c9a289315dc0118888e19250cd64aee9a0d5
2017-04-28 20:03:03 +00:00
Mikhail Naganov
9450a8754d Allow audioserver to talk to bluetooth server
Audioserver loads A2DP module directly. The A2DP module
talks to the bluetooth server.

Bug: 37640821
Test: Play Music over BT headset
Change-Id: Ie6233e52a3773b636a81234b73e5e64cfbff458e
2017-04-28 20:02:48 +00:00
Nick Kralevich
89671020da Merge "Correct documentation in untrusted_app_all" into oc-dev 2017-04-28 15:38:43 +00:00
Daniel Nicoara
22ebf24ef2 Merge "Allow vr_hwc and virtual_touchpad to query for permissions" into oc-dev 2017-04-28 15:15:18 +00:00
TreeHugger Robot
b9d5d5cc8b Merge changes Ia9960af9,I6987d60c into oc-dev
* changes:
  NFC HAL no longer violates socket access restrictions
  Remove access to sock_file for hal_nfc
2017-04-27 23:25:38 +00:00
Abodunrinwa Toki
adfc5db008 SELinux configuration for TextClassifier model updates.
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34780396
Change-Id: I8b98fef913df571e55474ea2529f71750874941c
2017-04-27 18:54:00 +01:00
Ruchi Kandoi
688a76672e NFC HAL no longer violates socket access restrictions
Test: compiles
Bug: 37640900
Change-Id: Ia9960af9da880fd130b5fb211a054689e2353f1d
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2017-04-27 17:21:42 +00:00
Ruchi Kandoi
468eabb136 Remove access to sock_file for hal_nfc
Test: manual
Bug: 37640900
Change-Id: I6987d60c1eb1578134b51f4e7417700fd462ba4d
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
(cherry picked from commit ad41fa8dc3)
2017-04-27 09:05:27 -07:00
TreeHugger Robot
9829506c25 Merge "Allow installd to read vendor_overlay_file" into oc-dev 2017-04-26 21:50:16 +00:00
TreeHugger Robot
edc2fedba5 Merge "Allow Bluetooth sys_nice and system_server setsched for Bluetooth HAL" into oc-dev 2017-04-26 21:24:46 +00:00
TreeHugger Robot
c78db706d4 Merge "relax fuse_device neverallow rules" into oc-dev 2017-04-26 21:12:56 +00:00
Chad Brubaker
eda4b88d3a Correct documentation in untrusted_app_all
Rules defined in utrusted_app_all do not apply to all untrusted apps,
update the comments to reflect that.

Test: builds
Change-Id: I6f064bd93c13d8341128d941be34fdfaa0bec5da
2017-04-26 12:32:51 -07:00
Philip Cuadra
3c46d2ff9c Allow Bluetooth sys_nice and system_server setsched for Bluetooth HAL
Bluetooth needs the capability to set audio-related threads to be RT
scheduled.  Grant it sys_nice.

system_server needs to set priority for the Bluetooth HAL.  Allow it.

Bug 37518404
Test:  Play Bluetooth audio, confirm RT scheduling with systrace
Merged-In: Iaf7b85a11a51883744d72a50addfd320b6fbbc2f
Change-Id: Iaf7b85a11a51883744d72a50addfd320b6fbbc2f

(cherry picked from commit 6eee6eb2c0)
2017-04-26 11:48:00 -07:00
Nick Kralevich
45766d4178 relax fuse_device neverallow rules
The fuse_device neverallow rules are too aggressive and are inhibiting
certain vendor customizations. Relax the /dev/fuse neverallow rules so
that they better reflect the security invariants we want to uphold.

Bug: 37496487
Test: policy compiles.
Change-Id: Ie73b0ba7c76446afc2a7a23ebed1275c977d932d
2017-04-26 11:43:40 -07:00
TreeHugger Robot
a5647da327 Merge "Remove rules blocking vrcore_app to connect to VR HWC and VirtualTouchpad" into oc-dev 2017-04-26 17:53:36 +00:00
Alex Klyubin
a9d7b895da Merge "Assert ban on framework <-> vendor comms over VndBinder" into oc-dev 2017-04-26 04:48:43 +00:00
Alex Klyubin
26564ce754 Merge "Do not warn about empty typesets in neverallows" into oc-dev 2017-04-26 00:32:52 +00:00
TreeHugger Robot
f033cfdc38 Merge "Allow DRM hal to access fd allocated by mediaserver" into oc-dev 2017-04-25 23:54:48 +00:00
TreeHugger Robot
364644eb84 Merge "Remove underscore from Companion service name" into oc-dev 2017-04-25 21:26:15 +00:00
Alex Klyubin
c60d3ea164 Do not warn about empty typesets in neverallows
Empty typeset is not an issue in neverallow rules. The reason is that
it's completly normal for scontext or tcontext of neverallow rules to
evaluate to an empty type set. For example, there are neverallow rules
whose purpose is to test that all types with particular powers are
associated with a particular attribute:
  neverallow {
    untrusted_app_all
    -untrusted_app
    -untrusted_app_25
  } domain:process fork;

Test: sepolicy-analyze neverallow -w -n \
          'neverallow {} {}:binder call;'
      produces empty output instead of "Warning!  Empty type set"
Bug: 37357742
Change-Id: Id61b4fe22fafaf0522d8769dd4e23dfde6cd9f45
2017-04-25 14:25:04 -07:00
Jeff Tinker
3bc24e6816 Allow DRM hal to access fd allocated by mediaserver
Test: gts-tradefed run gts -m GtsMediaTestCases -t com.google.android.media.gts.MediaPlayerTest#testLLAMA_H264_BASELINE_240P_800_DOWNLOADED_V0_SYNC

bug:37548390
Change-Id: I9c2d446118d3a5f729730b75ec117954e383159b
2017-04-25 14:20:04 -07:00
Alex Klyubin
00657834b8 Assert ban on framework <-> vendor comms over VndBinder
This adds neverallow rules which enforce the prohibition on
communication between framework and vendor components over VendorBinder.
This prohibition is similar in spirit to the one for Binder
communications.

Most changes consist of adding neverallow rules, which do not affect
runtime behavior. The only change which does affect runtime behavior
is the change which takes away the right of servicemanager domain to
transfer Binder tokens to hwservicemanager and vndservicemanager. This
grant was there by accident (because it was overly broad) and is not
expected to be needed: servicemanager, hwservicemanager, and
vndservicemanager are not supposed to be communicating with each
other.

P. S. The new neverallow rules in app_neverallows.te are covered by
the new rules in domain.te. The rules were nevertheless added to
app_neverallows.te for consistency with other *Binder rules there.

Test: mmm system/sepolicy
Bug: 37663632
Change-Id: I7c2ae23924bf0f2fed3f1e3a8d4d603129286329
2017-04-25 14:15:52 -07:00