Commit Graph

17174 Commits

Author SHA1 Message Date
Treehugger Robot
9c654b7ca1 Merge "Allow fs-verity setup within system_server" 2019-01-12 06:03:26 +00:00
Nick Kralevich
ef6f1b52ad Merge "rename rs_data_file to app_exec_data_file" 2019-01-12 01:51:47 +00:00
Tim Van Patten
890186e561 Merge "Create System Property to Indicate ANGLE Support" 2019-01-11 22:58:43 +00:00
Treehugger Robot
f99d088e14 Merge "Camera HAL: Allow minor version changes to camera.provider" 2019-01-11 22:04:53 +00:00
Victor Hsieh
7397ebd1e1 Allow fs-verity setup within system_server
The original fs-verity implementation requires CAP_SYS_ADMIN and thus
the actual setup is proxied through installd.  Instead, upstream
FS_IOC_ENABLE_VERITY ioctl checks write permission to inode, and thus
can happen in system_server.

Also, replace the old measure ioctl with FS_IOC_SET_VERITY_MEASUREMENT.
Note that although the number is name, they work differently.

Test: set ro.apk_verity.mode=2, in-progress CTS passed without denial
Bug: 112037636
Change-Id: I3e8d14321df8904dfed68b83aae8b3dd99c211ac
2019-01-11 12:21:59 -08:00
Nick Kralevich
fb66c6f81b rename rs_data_file to app_exec_data_file
There are multiple trusted system components which may be responsible
for creating executable code within an application's home directory.
Renderscript is just one of those trusted components.

Generalize rs_data_file to app_exec_data_file. This label is intended to
be used for any executable code created by trusted components placed
into an application's home directory.

Introduce a typealias statement to ensure files with the previous label
continue to be understood by policy.

This change is effectively a no-op, as it just renames a type, but
neither adds or removes any rules.

Bug: 121375718
Bug: 112357170
Test: cts-tradefed run cts-dev -m CtsRenderscriptTestCases
Change-Id: I17dca5e3e8a1237eb236761862174744fb2196c0
2019-01-11 20:07:20 +00:00
Eino-Ville Talvala
579314c66a Camera HAL: Allow minor version changes to camera.provider
Test: Adding a camera.provider@2.5 to a device works correctly
Merged-In: I516698afedad1294c0af3f4efedb0aed0a141780
Change-Id: I516698afedad1294c0af3f4efedb0aed0a141780
2019-01-11 19:24:47 +00:00
Tao Bao
a22f9b80f3 Remove the file context rule for /system/bin/bspatch.
update_engine no longer needs a standalone bspatch executable since [1]
(which first landed into O). And we don't ship /system/bin/bspatch on
device by default.

[1] https://android-review.googlesource.com/c/platform/system/update_engine/+/327365

Test: Verify that /system/bin/bspatch doesn't exist on device.
Test: Trigger an A/B OTA install for aosp_walleye-userdebug:
      `m dist`;
      `system/update_engine/scripts/update_device.py out/dist/aosp_walleye-ota.zip`.
      No update_engine related denial.
Change-Id: Iff578bdb0b1909092dd19feff069755a44d29398
2019-01-11 19:00:55 +00:00
Steven Moreland
b7246ac0b6 system/etc/event-log-tags available to all
This was a regression in Q, and the file is an implementation of
liblog.

Bug: 113083310
Test: use tags from vendor and see no denials

Change-Id: I726cc1fcfad39afc197b21e431a687a3e4c8ee4a
2019-01-11 18:42:02 +00:00
Treehugger Robot
1531e72e76 Merge "Permissions for InputClassifier HAL" 2019-01-11 18:30:38 +00:00
Primiano Tucci
985cb4a96a Merge "Allow perfetto to ingest logs on userdebug/eng" 2019-01-11 14:06:42 +00:00
Treehugger Robot
5f49b8dcec Merge "Allow init to mount on bionic libs and the dynamic linker" 2019-01-11 06:27:23 +00:00
Remi NGUYEN VAN
9b9c787937 Merge "Allow network_stack to use common app api services" 2019-01-11 02:40:52 +00:00
Siarhei Vishniakou
41a871ba84 Permissions for InputClassifier HAL
Add the required permissions for the InputClassifier HAL.

Bug: 62940136
Test: no selinux denials in logcat when HAL is used inside input flinger.
Change-Id: Ibc9b115a83719421d56ecb4bca2fd196ec71fd76
2019-01-11 02:08:19 +00:00
Remi NGUYEN VAN
d0f65ce2ff Allow network_stack to use common app api services
Bug: b/122620633
Test: m
Change-Id: I36fe66fc22a1664f9ef25c66f933a2613a6f346b
2019-01-11 07:48:21 +09:00
Primiano Tucci
a64d5bb7ef Allow perfetto to ingest logs on userdebug/eng
When recording hour-long traces, logcat messages help
to interpret the trace, giving human readable context on what
is happening on the system.
Furthermore this is particularly helpful for startup
debugging thanks to activity manager instrumentation events
(am_on_create_called, am_on_start, ...).
This is only allowed on userdebug/eng builds.

Bug: 122243384
Change-Id: I4dfaebf21107e9853b0bf42403fbab6c3b4d5141
2019-01-10 20:14:06 +00:00
Tim Van Patten
3293abb67f Create System Property to Indicate ANGLE Support
Create the system property ro.gfx.angle.supported that indicates if the
device supports ANGLE.   The current planned use of this property is to
allow CTS to validate ANGLE functionality if the device indicates ANGLE
is supported.

Bug: 80239516
Test: Flash the build and verify the property is 'false' for marlin.
Test: Flash the build and verify the property is 'true' for walleye.
Change-Id: I00387db9ade34152f79d75453ea17d5ea7b063cd
2019-01-10 11:35:58 -07:00
Chalard Jean
fb15c9f12f Add sepolicy for IpMemoryStoreService
Bug: 116512211
Test: Builds, boots, including upcoming changes needing this
Change-Id: I6f119368c5a4f7ac6c0325915dff60124c5a6399
2019-01-10 18:06:56 +09:00
Tri Vo
0fa0d1e596 Merge "Apply full_treble_only to whole rule." 2019-01-10 03:06:35 +00:00
Tri Vo
1e99de5779 Apply full_treble_only to whole rule.
The way we build and run CTS expects full_treble_only and
compatible_property_only macros to be applied to whole rules and not be
nested inside other rules.

Fixes: 122601363
Test: corresponding neverallow rule in auto-generated
SELinuxNeverallowRulesTest.java is parsed correctly.
Change-Id: Ibf5187cedca72510fe74c6dc55a75a54a86c02ff
2019-01-09 16:57:09 -08:00
Chong Zhang
b1ab8c6f9f adding apex for media swcodecs
bug: 111407413
Change-Id: Ica209ad9476b0597a206bf53823a1928643c8256
2019-01-09 13:24:59 -08:00
Treehugger Robot
cd1c24f323 Merge "Add permissions in runas_app domain to debug/profile debuggable apps." 2019-01-09 19:48:18 +00:00
Treehugger Robot
a739746990 Merge "Use bpfloader to create bpf maps instead of netd" 2019-01-09 18:34:49 +00:00
Treehugger Robot
7813cf4249 Merge "audit use of net.dns. property" 2019-01-09 18:26:19 +00:00
Yabin Cui
770a4f6539 Add permissions in runas_app domain to debug/profile debuggable apps.
runas_app domain is used by lldb/ndk-gdb/simpleperf to debug/profile
debuggable apps. But it misses permissions to ptrace app processes and
read /proc/<app_pid> directory.

Bug: none
Test: build and boot marlin.
Test: run lldb and simpleperf on apps with target sdk version 24-29.
Change-Id: I9e6f940ec81a8285eae8db3b77fb1251a25dedd0
2019-01-09 17:24:31 +00:00
Jiyong Park
b55762da64 Allow init to mount on bionic libs and the dynamic linker
In order to use the bionic libs and the dynamic linker from the runtime
APEX for all processes that are started after the APEX is activated, the
paths /system/lib/{libc.so|libm.so|libdl.so} and /system/bin/linker are
bind-mounted to the corresponding bionic libs and the dynamic linker
in the runtime APEX.

This bind mount allows us to keep other part of the platform and the
tests having implicit assumption that bionic libs are located at
/system/lib and loaded from the default linker namespace.

Bug: 120266448
Test: device boots

Change-Id: Ied611b267d187ee3d75a139c378ee12242d5b8d8
2019-01-09 20:41:41 +09:00
David Anderson
39b0b80c34 Merge "Allow init to symlink userdata during first stage mounting." 2019-01-09 07:37:00 +00:00
Remi NGUYEN VAN
b4eef1ae50 Merge "Change package name for NetworkStack" 2019-01-09 04:57:19 +00:00
Jeff Vander Stoep
ecb00a109c audit use of net.dns. property
Bug: 33308258
Test: atest CtsSelinuxTargetSdk25TestCases
Change-Id: Ifeceecec7b2f38ebd38b6693712b8f65ee24dc5d
2019-01-08 18:44:29 +00:00
Chenbo Feng
7b57104013 Use bpfloader to create bpf maps instead of netd
Recent change in netd and bpfloader switched the creater of bpf maps
from netd to bpfloader. Change the rules related to it to make sure it
doesn't fail.

Test: dumpsys netd trafficcontroller
Bug: 112334572
Change-Id: I016ff68b58ef7b12bdfdebc2fd178be1d0206a62
2019-01-08 10:30:22 -08:00
Tri Vo
35650d50a1 Separate product_mac_permissions.xml out of system sepolicy.
Bug: 119305624
Test: normal/recovery boot aosp_taimen

Change-Id: I46da995886ce421bb87e741d577f659426ff79c4
2019-01-08 09:49:30 -08:00
Tri Vo
6ac0896b90 Separate product_service_contexts out of system sepolicy.
Bug: 119305624
Test: normal/recovery boot aosp_taimen
Change-Id: I15aa275fa658b58f5a5d3e651d164f9fcd87c0af
2019-01-08 09:49:30 -08:00
Tri Vo
3507678d2e Separate product_seapp_contexts out of system sepolicy.
Bug: 119305624
Test: normal/recovery boot aosp_taimen
Change-Id: Ia8d69be16011db8dd63fa41672449a4ade7302c2
2019-01-08 09:49:30 -08:00
Tri Vo
5da7200510 Separate product_property_contexts out of system sepolicy.
Bug: 119305624
Test: normal/recovery boot aosp_taimen
Change-Id: Ib7a29a9f8f23dd917cc25c23c7612f9e4ae36ea0
2019-01-08 09:49:30 -08:00
Tri Vo
ade741635f Separate product_hwservice_contexts out of system sepolicy.
Bug: 119305624
Test: normal/recovery boot aosp_taimen
Change-Id: I1009745686acd51563378dac56e857be0d60e794
2019-01-08 09:49:30 -08:00
Treehugger Robot
edbe51215e Merge "Allow dumpstate to read some directories." 2019-01-08 15:21:06 +00:00
Narayan Kamath
9f343b32be Allow system_server to read apex_data_file.
For consistency with APKs, signature verification is performed
in the system_server. This includes checking that the signature of
an updated install matches the signature of the active package that
it updates. For this, it requires search access to /data/apex and
read access to the files under that directory.

Test: m
Change-Id: Ia073adb8892886e4767fa5529e95c110b9cbff1b
2019-01-08 11:55:01 +00:00
Dario Freni
4d399f606f Merge "SEPolicy for Staged Installs." 2019-01-08 09:55:18 +00:00
Remi NGUYEN VAN
aed7180675 Change package name for NetworkStack
Test: flashed, booted, verified app running properly
Bug: b/112869080
Change-Id: I10737736ca5da67ef08fca1055e0f702371aba58
2019-01-08 17:30:30 +09:00
Treehugger Robot
58b2f2b86d Merge "Add Adam to OWNERS." 2019-01-08 04:41:12 +00:00
Treehugger Robot
ec5a6ce810 Merge "Label the dynamic linker in the runtime APEX correctly" 2019-01-08 00:20:29 +00:00
Dario Freni
274c1ded4d SEPolicy for Staged Installs.
Test: basic workflow between apexd and PackageManager tested with
changes being developed.
Bug: 118865310
Change-Id: I1ae866f33e9b22493585e108c4fd45400493c7ac
2019-01-07 22:36:28 +00:00
Joel Galenson
886ba9c9ff Allow dumpstate to read some directories.
This prevents denials while taking a bugreport.

Bug: 116711254
Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t
android.security.cts.SELinuxHostTest#testNoBugreportDenials

Change-Id: I64f441eb66c355d03eaf7755f2e9d3e970305ecd
2019-01-07 12:45:56 -08:00
Treehugger Robot
34bd20fbdd Merge "Un-revert "Audit execution of app_data_file native code."" 2019-01-07 20:24:43 +00:00
Tri Vo
f1f1b4f063 Merge "sepolicy: Improve treble test error message." 2019-01-07 19:36:55 +00:00
Alex Buynytskyy
007586d92d Allow adbd to use a socket transferred from shell.
Used for e.g. abb.

Test: Build, flash and boot, use `adb abb` to verify

Change-Id: I4ad75498819edbcc0303f66420a58d06788ab5fb
2019-01-07 15:45:50 +00:00
Alan Stokes
c6cbeadb21 Un-revert "Audit execution of app_data_file native code."
This was originally implemented in commit
890414725f and reverted in commit
fa3eb773ce. This effectively reverts the
revert, with minimal changes to cope with the subsequent reversion of
commit b362474374.

Auditing is only enabled for apps targeting API <= 28.

Test: Compiles, audit messages are seen.
Bug: 121333210
Bug: 111338677
Change-Id: Ie38498a2b61f4b567902117f9ef293faa0e689dd
2019-01-07 14:08:11 +00:00
Tri Vo
1451938da0 sepolicy: Improve treble test error message.
Bug: 120080521
Test: removing a mapped type in the mapping file triggers new error
message
Change-Id: I04b21da7206777af8c281a843bd39ea5c4f0863a
2019-01-06 18:18:32 -08:00
David Anderson
6bde9cf665 Allow init to symlink userdata during first stage mounting.
In order to boot into GSI, we need init's first-stage block-device
machinery to find userdata. This will create its symlink before sepolicy
is loaded, leading to denials in the second stage.

Bug: 121209697
Test: device boots
Change-Id: Ibf3398c811016e09747116cf17393e8d22541bb2
2019-01-03 18:29:58 -08:00
Jiyong Park
048e136653 Label the dynamic linker in the runtime APEX correctly
e2bc9fe9d5ac82457bc6050bf705ff43a1b05cbf in platform/art project added
the dynamic linker to the runtime APEX. Since the dynamic linker has
been labeled as 'system_linker_exec' so does the linker in the APEX.

Bug: 120266448
Test: ls -Z /apex/com.android.runtime/bin/linker
u:object_r:system_linker_exec:s0 /apex/com.android.runtime/bin/linker

Change-Id: I243b86a74d94058b3283830c32232c6584639ff3
2019-01-04 01:19:44 +09:00