Commit graph

2953 commits

Author SHA1 Message Date
Annie Meng
9e332a59b2 Merge "Add initial sepolicy for app data snapshots." 2019-01-17 11:01:00 +00:00
Frank Li
2d86b6502d Merge "Allow netd to write to statsd" 2019-01-17 04:15:00 +00:00
Treehugger Robot
938d0c2bf6 Merge "Allow the kernel to read staging_data_file." 2019-01-17 01:18:47 +00:00
Martijn Coenen
b85acbb889 Allow the kernel to read staging_data_file.
These are APEX files in /data/staging, and will be accessed by the loop
driver in the kernel.

Bug: 118865310
Test: no denials on emulator
Change-Id: I5c849b6677566cb00d28011352b9dc6b787a0bc4
2019-01-16 21:05:26 +01:00
Nick Kralevich
80eec389e2 rs.te: Remove dontaudit statements
These dontaudit rules were in place to suppress SELinux denials due to
file descriptor leakage. The file descriptor leakage has been fixed, so
these rules are no longer necessary. Delete.

Fixes: 120983106
Test: cts-tradefed run cts-dev -m CtsRenderscriptTestCases
Change-Id: I5cad79c3526583bd2b65bd089fee9c490f6beb5e
2019-01-16 10:54:16 -08:00
Narayan Kamath
2ad229c788 Add initial sepolicy for app data snapshots.
Define a rollback_data_file label and apply it to the snapshots
directory. This change contains just enough detail to allow
vold_prepare_subdirs to prepare these directories correctly.

A follow up change will flesh out the access policy on these
directories in more detail.

Test: make, manual
Bug: 112431924

Change-Id: I4fa7187d9558697016af4918df6e34aac1957176
2019-01-16 15:22:51 +00:00
lifr
980c08c999 Allow netd to write to statsd
config sepolicy to allow netd to write to statsd.

Test: run runtests.sh, make sure no missing test and get all pass
      run /out/host/linux-x86/bin/statsd_testdrive 82
      Got following metric data dump:pass for local test
Bug: 119862317

Change-Id: Ieff5ca55de46715d54ef57c4a6d144fd7d03e4b7
2019-01-16 13:33:18 +00:00
David Anderson
6d53efcf46 sepolicy for gsid
Bug: 122556707
Test: gsid starts
Change-Id: Ib05ddb79051436f51cd236de04027a3b12ee87a9
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-01-15 20:43:33 -08:00
Remi NGUYEN VAN
a2e024f890 Merge "Allow NetworkStack to find the telephony service" 2019-01-16 01:29:10 +00:00
Remi NGUYEN VAN
fd758cbddb Allow NetworkStack to find the telephony service
The network stack needs access to TelephonyManager#getAllCellInfo to
send network conditions broadcasts.

Bug: 122843997
Test: Flashed, verified violation not shown and cell info obtained
properly.

Change-Id: I6ef2858c9a2d1fbbb993164a93bd985e0eee8887
2019-01-15 16:57:32 +09:00
chenbruce
e3d625b72e SEPolicy updates for adding native flag namespace(netd).
For experiment flag testing, we add a flag netd and have
SEPolicy updates.

Test:  add sepolicy, m -j, check GetServerConfigurableFlag function in netd
Bug:122050512
Change-Id: I21c844c277afc358085d80447f16e4c0d4eba5b3
2019-01-15 02:47:57 +00:00
Jiwen Cai
53f5375824 Merge "Allow app to conntect to BufferHub service" 2019-01-14 21:58:15 +00:00
Treehugger Robot
146be01a0f Merge "Add selinux rules for detachable perfetto process." 2019-01-14 20:24:32 +00:00
Dario Freni
0eb6bff5f3 Merge "Allow apexd to also create dirs/files in its storage." 2019-01-14 19:41:15 +00:00
Jiwen 'Steve' Cai
e17b293528 Allow app to conntect to BufferHub service
Bug: 112940221
Test: AHardwareBufferTest
Change-Id: I1fd065844e03c7e079dc40b7f7dbb8968f1b00bc
2019-01-14 10:49:35 -08:00
Joel Fernandes
2075608582 Merge changes from topic "bpf-init"
* changes:
  Add permissions for bpf.progs_loaded property
  Allow executing bpfloader from init and modify rules
  Assign bpfloader with CAP_SYS_ADMIN
2019-01-14 18:34:19 +00:00
Jeff Vander Stoep
036090d203 netdomain: allow node_bind for ping sockets
Grant for icmp_socket for devices with 4.14 or greater kernel, and
rawip_socket for devices with earlier kernels.

Bug: 122572608
Test: build
Change-Id: I1c9d2ce6761dbd2c4db3635600c5f5c335461083
2019-01-14 16:59:03 +00:00
Jeffrey Vander Stoep
75448f8316 Merge "netdomain: move to public policy" 2019-01-14 16:58:50 +00:00
Joel Fernandes
b76a639956 Add permissions for bpf.progs_loaded property
Change-Id: If4e550e4186415c5a1088bb53b0755b69f92560a
Signed-off-by: Joel Fernandes <joelaf@google.com>
2019-01-14 10:59:10 -05:00
Joel Fernandes
147cf6482e Allow executing bpfloader from init and modify rules
init needs to execute bpfloader as a one-shot service. Add sepolicy for
the same. Also update old rules allowing init to fork/exec bpfloader and
remove rules allowing netd to do so.

Bug: 112334572
Change-Id: Ic242cd507731ed8af3f8e94d4fccc95819831d37
Signed-off-by: Joel Fernandes <joelaf@google.com>
2019-01-14 10:59:10 -05:00
Joel Fernandes
4bf478828f Assign bpfloader with CAP_SYS_ADMIN
bpfloader needs to load bpf programs with tracepoints in them. The
tracepoint programs are not activated but are just loaded and pinned.
The kernel expects the process doing this to have CAP_SYS_ADMIN. Since
bpfloader was intended to be a 1-shot run and exit process with security
privileges, lets assign it CAP_SYS_ADMIN so that it is able to load the
tracepoint programs.

Bug: 112334572
Change-Id: Icf9b5d95615e69f5c28dc28f021b07f49710c97d
Signed-off-by: Joel Fernandes <joelaf@google.com>
2019-01-14 10:59:10 -05:00
Martijn Coenen
179ada913c Allow apexd to also create dirs/files in its storage.
Bug: 118865310
Test: no denials when running ApexServiceTest#SubmitSessionTestSuccess
Change-Id: I9a309fca99c23ca7db4af58db782a2bd6a83d829
2019-01-14 09:15:46 +01:00
Martijn Coenen
cb691fbcfd Merge "Add persist.apexd. property context." 2019-01-14 07:59:12 +00:00
Sooraj Sasindran
2968496e2c Merge "Rename ANS to ONS" 2019-01-12 19:11:52 +00:00
Treehugger Robot
9c654b7ca1 Merge "Allow fs-verity setup within system_server" 2019-01-12 06:03:26 +00:00
Jeff Vander Stoep
937f256b2d netdomain: move to public policy
Vendor domains may use net_domain() so it should be moved to public
policy. This will allow removal of permissions such as rawip_socket
in future releases without breaking Treble compatiblity.

Bug: 122572608
Test: build
Change-Id: Id84feb11587d305334cd9dbbc6e4f6f71ffff6f2
2019-01-12 04:31:41 +00:00
Nick Kralevich
ef6f1b52ad Merge "rename rs_data_file to app_exec_data_file" 2019-01-12 01:51:47 +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
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
Sooraj Sasindran
2cf336bf31 Rename ANS to ONS
Rename AlternativeNetworkService to OpportunisticNetworkService
Bug: 118347827
Test: compile
Merged-In: I23b0caadd1801c104806fa438fc9054d8a31962e
Change-Id: I23b0caadd1801c104806fa438fc9054d8a31962e
2019-01-11 17:46:04 +00:00
Martijn Coenen
97650f5032 Add persist.apexd. property context.
For persistent properties related to apexd.

Bug: 121302351
Test: apexd can get the prop
Change-Id: Id9fd25923385188f46a9804155168c52f6b1187e
2019-01-11 16:09:10 +00:00
Primiano Tucci
985cb4a96a Merge "Allow perfetto to ingest logs on userdebug/eng" 2019-01-11 14:06:42 +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
Carmen Jackson
9678e079ac Add selinux rules for detachable perfetto process.
This appears to be the minimum change required to accommodate Traceur
running the detachable Perfetto process.

Bug: 116754732
Test: Started a perfetto trace using --detach and it started
successfully.

Change-Id: I12881ae343389abdcc74af5f11ecbac99b03ef7c
2019-01-10 12:18:24 -08: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
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
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
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