Commit graph

4178 commits

Author SHA1 Message Date
dcashman
38885bc47a am e96c3abe: Add neverallow for mounting on proc
* commit 'e96c3abe2e86f3ecdfdb7770629e9f73ff1e96d1':
  Add neverallow for mounting on proc
2015-04-14 19:02:31 +00:00
dcashman
e96c3abe2e Add neverallow for mounting on proc
Change-Id: Ie19ac00f2e96836667e8a5c18fafeaf6b6eadb25
2015-04-14 11:29:20 -07:00
Andres Morales
2e9e13d468 am dd156fc3: Allow gatekeeperd to use keystore
* commit 'dd156fc377c2892752fb5b38c5cca4c3e7484054':
  Allow gatekeeperd to use keystore
2015-04-13 19:48:46 +00:00
Andres Morales
dd156fc377 Allow gatekeeperd to use keystore
needs to call addAuthToken

Change-Id: If519df61448f19dfafab254668c17eea6c161ea4
2015-04-13 12:26:02 -07:00
Neil Fuller
69d3b89756 am 4127a4c8: Merge "Add rules for /system/bin/tzdatacheck"
* commit '4127a4c890e84f1fd8f22b8baecc2519b25b8701':
  Add rules for /system/bin/tzdatacheck
2015-04-13 11:58:52 +00:00
Neil Fuller
4127a4c890 Merge "Add rules for /system/bin/tzdatacheck" 2015-04-13 11:41:24 +00:00
Jeff Sharkey
6b6d51cf06 am 5e5b0065: Merge "Allow sdcard daemon to run above expanded storage."
* commit '5e5b0065e958e91ed8d286b8c2861f428909f0ec':
  Allow sdcard daemon to run above expanded storage.
2015-04-12 18:19:59 +00:00
Jeff Sharkey
5e5b0065e9 Merge "Allow sdcard daemon to run above expanded storage." 2015-04-12 18:00:25 +00:00
Jeff Sharkey
3acec6fa17 Allow sdcard daemon to run above expanded storage.
We have a /media directory on expanded storage that behaves just
like internal storage, and has a FUSE daemon running above it.

avc: denied { search } for name="expand" dev="tmpfs" ino=3130 scontext=u:r:sdcardd:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0

Bug: 19993667
Change-Id: I771ecb8f2808c48ccf4139ac9cfc2a48a2332fec
2015-04-11 22:21:50 -07:00
Nick Kralevich
c53f343747 am fdc56c5f: genfs_contexts: provide a label for binfmt_misc
* commit 'fdc56c5ffec126b5d5ee257b816cfc6633667ace':
  genfs_contexts: provide a label for binfmt_misc
2015-04-11 16:00:28 +00:00
Nick Kralevich
fdc56c5ffe genfs_contexts: provide a label for binfmt_misc
Provide a default label for binfmt_misc. This is not used by the
core policy, although it may be used in device specific policy.

Bug: 20152930
Change-Id: Id51d69333bfeda40720d0e65e1539fab0b6e1e95
2015-04-10 17:42:49 -07:00
Jeff Sharkey
39e0b8206a am e32c7b2e: Merge "Allow installd to move around private app data."
* commit 'e32c7b2e6827f776ba51d120841f832562b7aaec':
  Allow installd to move around private app data.
2015-04-10 21:14:54 +00:00
Jeff Sharkey
e32c7b2e68 Merge "Allow installd to move around private app data." 2015-04-10 21:00:43 +00:00
Nick Kralevich
200fa37435 am 50d50621: Revert "Exclude isolated_app from ptrace self."
* commit '50d506212ee33c19c9258a3cb5fc94d396a58f0b':
  Revert "Exclude isolated_app from ptrace self."
2015-04-10 18:34:38 +00:00
Nick Kralevich
50d506212e Revert "Exclude isolated_app from ptrace self."
Google Breakpad (crash reporter for Chrome) relies on ptrace
functionality. Without the ability to ptrace, the crash reporter
tool is broken.

Addresses the following denial:

  type=1400 audit(1428619926.939:1181): avc: denied { ptrace } for pid=10077 comm="CrRendererMain" scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:r:isolated_app:s0:c512,c768 tclass=process permissive=0

This reverts commit e9623d8fe6.

Bug: 20150694
Bug: https://code.google.com/p/chromium/issues/detail?id=475270
Change-Id: I1727c6a93f10ea6db877687a8f81ec789f9e501f
2015-04-10 11:11:10 -07:00
Nick Kralevich
fd174d8fab am 9fc35a75: Merge "isolated_app: Do not allow access to the gpu_device."
* commit '9fc35a752c6b4068afeaf9c7e35d2965908d2a62':
  isolated_app: Do not allow access to the gpu_device.
2015-04-10 14:54:40 +00:00
Nick Kralevich
9fc35a752c Merge "isolated_app: Do not allow access to the gpu_device." 2015-04-10 14:35:40 +00:00
Jeff Sharkey
8da7876bf9 Allow installd to move around private app data.
Add rules that allow installd to move private app data between
internal and expanded storage devices.  For now we'll be reusing
the "cp" binary using android_fork_execvp(), so grant access to
devpts.

avc: denied { read write } for name="14" dev="devpts" ino=17 scontext=u:r:installd:s0 tcontext=u:object_r:devpts:s0 tclass=chr_file permissive=1
avc: denied { open } for path="/dev/pts/14" dev="devpts" ino=17 scontext=u:r:installd:s0 tcontext=u:object_r:devpts:s0 tclass=chr_file permissive=1

avc: denied { read } for name="com.android.opengl.shaders_cache" dev="mmcblk0p16" ino=114672 scontext=u:r:installd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
avc: denied { open } for path="/data/data/com.example.playground/code_cache/com.android.opengl.shaders_cache" dev="mmcblk0p16" ino=114672 scontext=u:r:installd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
avc: denied { create } for name="com.android.opengl.shaders_cache" scontext=u:r:installd:s0 tcontext=u:object_r:app_data_file:s0 tclass=file permissive=1
avc: denied { read write open } for path="/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/user/0/com.example.playground/code_cache/com.android.opengl.shaders_cache" dev="dm-0" ino=64518 scontext=u:r:installd:s0 tcontext=u:object_r:app_data_file:s0 tclass=file permissive=1

Bug: 19993667
Change-Id: I5188e660c8b5e97eab8f0c74147499ec688f3f19
2015-04-09 21:16:25 -07:00
Nick Kralevich
2a7a403724 am 2234f9ff: gatekeeperd: neverallow non-system_server binder call
* commit '2234f9ff579f9e928d868372f5bd7499e2da7bd1':
  gatekeeperd: neverallow non-system_server binder call
2015-04-10 00:47:10 +00:00
Nick Kralevich
f1b5c665ad isolated_app: Do not allow access to the gpu_device.
Bug: 17471434
Bug: 18609318
Change-Id: Idb3ed8ada03dbc07f35e74fd80cb989c8e6808bc
2015-04-09 14:31:16 -07:00
Nick Kralevich
2234f9ff57 gatekeeperd: neverallow non-system_server binder call
The current neverallow rule (compile time assertion)

  neverallow { domain -gatekeeperd -system_server } gatekeeper_service:service_manager find;

asserts that no rule is present which allows processes other than
system_server from asking servicemanager for a gatekeeperd token.

However, if system_server leaks the token to other processes, it may
be possible for those processes to access gatekeeperd directly, bypassing
servicemanager.

Add a neverallow rule to assert that no process other than system_server
are allowed to make binder calls to gatekeeperd. Even if another process
was to manage to get a binder token to gatekeeperd, it would be useless.

Remove binder_service() from gatekeeperd. The original use of the
binder_service() macro was to widely publish a binder service.
If this macro is present and the calling process has a gatekeeperd
binder token, it's implicitly possible for the following processes
to make a binder call to gatekeeperd:

 * all app processes
 * dumpstate
 * system_server
 * mediaserver
 * surfaceflinger

Removing binder_service revokes this implicit access.

Add explicit access for system_server to make binder calls to
gatekeeperd.

Add explicit access for gatekeeperd to make calls to keystore.
This was implicitly granted via binder_service() before, but now
needs to be explicit.

Change-Id: I23c1573d04ab670a42660d5922b39eecf4265b66
2015-04-09 12:55:38 -07:00
dcashman
e38a8325c4 am 84f580ac: Merge "Make persistent_data_block_service a system_api_service."
* commit '84f580ac9e5c93d7e342a4a702f2070af4167028':
  Make persistent_data_block_service a system_api_service.
2015-04-09 19:01:59 +00:00
dcashman
84f580ac9e Merge "Make persistent_data_block_service a system_api_service." 2015-04-09 18:46:18 +00:00
dcashman
5321279463 Make persistent_data_block_service a system_api_service.
Settings needs to be able to access it when opening developer options.

Address the following denial:
avc:  denied  { find } for service=persistent_data_block scontext=u:r:system_app:s0 tcontext=u:object_r:persistent_data_block_service:s0 tclass=service_manager

Bug: 20131472
Change-Id: I85e2334a92d5b8e23d0a75312c9b4b5bf6aadb0b
2015-04-09 11:45:32 -07:00
dcashman
1559494445 am dd31d68f: Merge "Make backup service app_api_service."
* commit 'dd31d68f46adc71e6c2eef9350855559d26a759f':
  Make backup service app_api_service.
2015-04-09 17:41:41 +00:00
dcashman
29f90b1eb7 am 7f2bb0c1: Merge "Enforce more specific service access."
* commit '7f2bb0c1381ac19615c4269881a25c62a72e2b38':
  Enforce more specific service access.
2015-04-09 17:26:42 +00:00
dcashman
dd31d68f46 Merge "Make backup service app_api_service." 2015-04-09 17:22:51 +00:00
Nick Kralevich
44f7dbea45 am 53c84ed4: isolated_app: allow app_data_file lock
* commit '53c84ed4f075833c0af22125e6354f12b901b119':
  isolated_app: allow app_data_file lock
2015-04-09 17:16:48 +00:00
dcashman
9378ceaf50 Make backup service app_api_service.
Backup service needs to be accessible to all apps to notify the system when
something changes which is being backed-up.

Bug: 18106000
Change-Id: I8f34cca64299960fa45afc8d09110123eb79338b
2015-04-09 10:13:15 -07:00
dcashman
7f2bb0c138 Merge "Enforce more specific service access." 2015-04-09 17:06:00 +00:00
Nick Kralevich
53c84ed4f0 isolated_app: allow app_data_file lock
Chrome's WebSQL implementation works by running sqlite in the
sandboxed renderer process, and sqlite expects to be able to
call flock() on the database file.

Bug: 20134929
Change-Id: Id33a2cd19b779144662056c6f3aba3365b0a2a54
2015-04-09 09:55:12 -07:00
dcashman
bd7f5803f9 Enforce more specific service access.
Move the remaining services from tmp_system_server_service to appropriate
attributes and remove tmp_system_server and associated logging:

registry
restrictions
rttmanager
scheduling_policy
search
sensorservice
serial
servicediscovery
statusbar
task
textservices
telecom_service
trust_service
uimode
updatelock
usagestats
usb
user
vibrator
voiceinteraction
wallpaper
webviewupdate
wifip2p
wifi
window

Bug: 18106000
Change-Id: Ia0a6d47099d82c53ba403af394537db6fbc71ca0
2015-04-09 09:45:54 -07:00
Neil Fuller
e647578502 Add rules for /system/bin/tzdatacheck
Bug: 19941636
Change-Id: I7cc61e058424c856da88f11ff9b259f34cb39dc7
2015-04-09 09:29:12 +01:00
Andres Morales
eb889050c1 am 186c82ff: Merge "Allow gatekeeperd to check Android permissions"
* commit '186c82ff4648cccfff0cca5525fcc1b93aac8451':
  Allow gatekeeperd to check Android permissions
2015-04-09 04:25:13 +00:00
Andres Morales
186c82ff46 Merge "Allow gatekeeperd to check Android permissions" 2015-04-09 04:08:28 +00:00
Andres Morales
13abb1701b Allow gatekeeperd to check Android permissions
Change-Id: Ie88568c43642505f68d137843a1f6b7a3de481e5
2015-04-09 04:06:36 +00:00
dcashman
18867dbb42 am 03a6f64f: Enforce more specific service access.
* commit '03a6f64f9568e2c58eb043463a5b4ff1cf10bef6':
  Enforce more specific service access.
2015-04-08 21:37:34 +00:00
Nick Kralevich
2a762352f3 am 9bef2502: system_server: support hard linking for split APKs
* commit '9bef25026b43ccfb656a3a53b74a787ca3376227':
  system_server: support hard linking for split APKs
2015-04-08 21:37:15 +00:00
dcashman
03a6f64f95 Enforce more specific service access.
Move the following services from tmp_system_server_service to appropriate
attributes:

network_management
network_score
notification
package
permission
persistent
power
print
processinfo
procstats

Bug: 18106000
Change-Id: I9dfb41fa41cde72ef0059668410a2e9eb1af491c
2015-04-08 20:26:50 +00:00
Nick Kralevich
9bef25026b system_server: support hard linking for split APKs
Commit 85ce2c706e removed hard link
support from create_file_perms, but system_server requires hard
link support for split APKs. Allow it.

Addresses the following denial:

  audit(0.0:152): avc: denied { link } for name="base.apk" dev="dm-0" ino=816009 scontext=u:r:system_server:s0 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=0

Steps to reproduce:
1) Find the directory "hellogoogle3.splitapk"
2) adb install-multiple -r hellogoogle3_incremental.apk
3) adb install-multiple -r -p com.google.android.samples.hellogoogle3 native.apk

Expected:
  2nd APK installs successfully.

Actual:
  2nd APK fails to install.

Change-Id: Ib69fc70dd1c7cd158590db3fd117d6b05acf1cf7
2015-04-08 10:42:30 -07:00
Nick Kralevich
63b0790965 am 8a06c077: Allow system_server to collect app heapdumps (debug builds only)
* commit '8a06c07724ad538d6c2f1d703fec88929c118894':
  Allow system_server to collect app heapdumps (debug builds only)
2015-04-08 00:43:31 +00:00
dcashman
0bc36adada am 91b7c67d: Enforce more specific service access.
* commit '91b7c67d1647b2a88b1547cc57b69fc685bbac18':
  Enforce more specific service access.
2015-04-07 23:52:59 +00:00
Nick Kralevich
8a06c07724 Allow system_server to collect app heapdumps (debug builds only)
On debuggable builds, system_server can request app heap dumps
by running something similar to the following commands:

  % adb shell am set-watch-heap com.android.systemui 1048576
  % adb shell dumpsys procstats --start-testing

which will dump the app's heap to /data/system/heapdump. See
framework/base commit b9a5e4ad30c9add140fd13491419ae66e947809d.

Allow this behavior.

Addresses the following denial:

  avc: denied { write } for path="/data/system/heapdump/javaheap.bin" dev="dm-0" ino=150747 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0

Bug: 20073185
Change-Id: I4b925033a5456867caf2697de6c2d683d0743540
2015-04-07 16:40:44 -07:00
dcashman
91b7c67d16 Enforce more specific service access.
Move the following services from tmp_system_server_service to appropriate
attributes:

jobscheduler
launcherapps
location
lock_settings
media_projection
media_router
media_session
mount
netpolicy
netstats

Bug: 18106000
Change-Id: Ia82d475ec41f658851f945173c968f4abf57e7e1
2015-04-07 15:48:58 -07:00
dcashman
b1a137280e am 3cc6fc5f: Enforce more specific service access.
* commit '3cc6fc5ffbd6e3d647f8c425e5298912d3733e45':
  Enforce more specific service access.
2015-04-07 20:54:47 +00:00
dcashman
3cc6fc5ffb Enforce more specific service access.
Move the following services from tmp_system_server_service to appropriate
attributes:

diskstats
display
dreams
dropbox
ethernet
fingerprint
graphicstats
hardware
hdmi_control
input_method
input_service

Bug: 18106000
Change-Id: Iadd8aab9e78d9d39fb00cf0b5a95fa1927d02095
2015-04-07 12:43:47 -07:00
Fyodor Kupolov
26ef3bbc87 am 3af8c9d0: Allow system_server to read oat dir
* commit '3af8c9d0ef0e4385f69a1a50dd04a010a76c6b19':
  Allow system_server to read oat dir
2015-04-07 18:07:23 +00:00
Fyodor Kupolov
3af8c9d0ef Allow system_server to read oat dir
Required for PackageManagerService to perform restorecon recursively on a
staging dir.

Addresses the following denial:
avc: denied { open } for name="oat" dev="mmcblk0p28" ino=163027 scontext=u:r:system_server:s0 tcontext=u:object_r:dalvikcache_data_file:s0 tclass=dir

Bug: 19550105
Bug: 20087446
Change-Id: I0f6ebb79745091ecb4d6d3dbe92f65606b7469da
2015-04-07 10:50:13 -07:00
dcashman
86501cde10 am d4c78f4b: Enforce more specific service access.
* commit 'd4c78f4b3fed1ca77aa9f13e757644aca3ed2b21':
  Enforce more specific service access.
2015-04-07 17:45:03 +00:00
dcashman
d4c78f4b3f Enforce more specific service access.
Move the following services from tmp_system_server_service to appropriate
attributes:

battery
bluetooth_manager
clipboard
commontime_management
connectivity
content
country_detector
device_policy
deviceidle

Bug: 18106000
Change-Id: I0d0f2a075c0509a783631d88ba453ac13399cdf2
2015-04-07 16:59:38 +00:00