Commit graph

17858 commits

Author SHA1 Message Date
Treehugger Robot
37ab42e542 Merge "Label APEX files correctly when TARGET_FLATTEN_APEX=true" 2019-01-30 15:06:21 +00:00
felkachang
0c402012e6 add create link permission for platform_app
To create symbolic link by unstrusted app raise the security
issue. To allow platform_app to create symbolic link prevent
the functionality from not working.

Fixes: 123555031
Test: atest DocumentsUITests
Bug: 123350324

Change-Id: Idb23c3e813c66bd284d42b8040deeea762f99a0f
2019-01-30 16:03:27 +08:00
Shuzhen Wang
410a5f08d3 Allow cameraserver to access tmpfs
am: 248633385e

Change-Id: I988a34b8c28fb44ddf723cf74ef6beb4a2487350
2019-01-29 21:46:16 -08:00
Shuzhen Wang
e588655bb9 Revert "Cameraserver: Allow cameraserver to access /data/misc/cameraserver"
am: 6b4caaa3e8

Change-Id: I5544b92d58ba992dd24c354d4c801f6891204b35
2019-01-29 21:45:53 -08:00
Shuzhen Wang
248633385e Allow cameraserver to access tmpfs
Bug: 79465976
Test: testHeic CTS test
Change-Id: I51eb485dc29d869c5d35fc317b0e008d04bdcbad
2019-01-30 05:31:42 +00:00
xunchang
0ad3e4f4dd Allow update engine to write to statsd socket
Update_engine reports metrics with libmerticslogger, which switches to
write to statsd recently. Add the permission to update_engine_common so
that both the daemon and recovery sideload tool can report the metrics.

update_engine: type=1400 audit(0.0:47): avc: denied { write } for name="statsdw" dev="tmpfs" ino=26257 scontext=u:r:update_engine:s0 tcontext=u:object_r:statsdw_socket:s0 tclass=sock_file permissive=0
update_engine: type=1400 audit(0.0:54): avc: denied { write } for name="statsdw" dev="tmpfs" ino=26257 scontext=u:r:update_engine:s0 tcontext=u:object_r:statsdw_socket:s0 tclass=sock_file permissive=0

Bug: 120623435
Test: the denial message disappear
Change-Id: Ie6a7a179b4291ef8209c99de758862b25df2a02f
2019-01-29 16:07:39 -08:00
Shuzhen Wang
6b4caaa3e8 Revert "Cameraserver: Allow cameraserver to access /data/misc/cameraserver"
This reverts commit 4e1497c7c0.

Reason for revert: Write temporary file to in-memory tmpfs instead

Test: testHeic CTS test
Bug: 123526741
Change-Id: Ifa7f5a0b50c46ee3e1a5695595233b17adc99222
2019-01-29 23:29:05 +00:00
Mathieu Chartier
a35beeb6f3 Merge "Rename runtime -> runtime_native property namespace"
am: 91b0ef13d8

Change-Id: Idfa6c810d540332c44ba997ec2a061efabdb6903
2019-01-29 14:48:03 -08:00
Isabelle Taylor
edcf56ec71 Merge "Fix perfetto CTS test"
am: 13fdfa44cd

Change-Id: I987f6089184ff64b8e7766355349ea2b77614e82
2019-01-29 14:47:37 -08:00
Mathieu Chartier
91b0ef13d8 Merge "Rename runtime -> runtime_native property namespace" 2019-01-29 22:44:36 +00:00
Treehugger Robot
13fdfa44cd Merge "Fix perfetto CTS test" 2019-01-29 22:31:31 +00:00
Roland Levillain
9ae5d888eb Introduce a postinstall_apex_mnt_dir label for /postinstall/apex.
am: a42ebf4128

Change-Id: I52a7240c6d852b20bde14a269ebccec46e53b5ea
2019-01-29 10:21:02 -08:00
Mathieu Chartier
669cef88a3 Rename runtime -> runtime_native property namespace
The convention for native properties is to use _native suffix.

Bug: 123524494
Bug: 120794191
Test: set a property and ensure it can be read in AndroidRuntime.cpp

Change-Id: I69feab9be78f24d812b8f953d3ec06a5d8d18f15
2019-01-29 10:20:36 -08:00
Roland Levillain
a42ebf4128 Introduce a postinstall_apex_mnt_dir label for /postinstall/apex.
Directory `/postinstall/apex` is used as a mount point for a tmpfs
filesystem during A/B OTA updates. APEX packages from the new system
partition are mounted ("activated") in subdirectories of
`/postinstall/apex`, so that they are available when `otapreopt` is
running.

Directory `/postinstall/apex` used to be of type `tmpfs` for SELinux
purposes. The new `postinstall_apex_mnt_dir` label is more
restrictive, and tightens permissions granted to `otapreopt_chroot`,
`otapreopt` (running as `postinstall_dexopt`), and `dex2oat`,
regarding the apexd logic recently added to `otapreopt_chroot`.

Test: A/B OTA update test (asit/dexoptota/self_full).
Bug: 113373927
Bug: 120796514
Change-Id: I03f0b0433d9c066a0c607f864d60ca62fc68c990
2019-01-29 10:09:50 +00:00
Mathieu Chartier
01a1ca2d55 Merge "Add runtime property permissions for experiments"
am: 2c92514304

Change-Id: I024ecbbbc7da3d0089ba2427b70daaf044b3e084
2019-01-28 21:34:29 -08:00
Remi NGUYEN VAN
27902606e3 Merge "Add NetworkStack policies for netd and netlink"
am: a579a99d31

Change-Id: Id9ea589714f9757c7d5d61ca2efa867006569077
2019-01-28 21:28:53 -08:00
Carmen Jackson
e5a0ba256d Merge "Ensure that memory and binder_driver tracepoints are available in user builds"
am: df44eca185

Change-Id: I5864081c22d734d8d751f44f8307e9c0bf84aae7
2019-01-28 20:57:01 -08:00
Alan Stokes
b13066993b Merge "Audit native code loading on user builds."
am: c5f6cd22fd

Change-Id: Ie0f757ac468def8405ce3bc6fc72d40f8e83f399
2019-01-28 20:56:35 -08:00
Jiyong Park
e7fab1859f Label APEX files correctly when TARGET_FLATTEN_APEX=true
When TARGET_FLATTEN_APEX=true, APEX files are not packaged in *.apex
files but flattened to the system partition under /system/apex/<name>
directories. There was a bug that those flattened files are not labeled
because the per-APEX file_contexts were applied only when building
*.apex. Fixing this by converting the file_contexts files so that
/system/apex/<name> path is prepended and applying the generated
file_contexts file for system.img when TARGET_FLATTEN_APEX=true.

Bug: 123314817
Test: TARGET_FLATTEN_APEX=true m
ls -alZ /system/apex/*/* shows that the files are correctly labeled

Change-Id: Ia82740a1da0083d5bcfd71354a6d374d2a918342
2019-01-29 10:07:54 +09:00
Mathieu Chartier
2c92514304 Merge "Add runtime property permissions for experiments" 2019-01-29 00:43:43 +00:00
Remi NGUYEN VAN
a579a99d31 Merge "Add NetworkStack policies for netd and netlink" 2019-01-28 23:13:08 +00:00
Treehugger Robot
df44eca185 Merge "Ensure that memory and binder_driver tracepoints are available in user builds" 2019-01-28 22:04:58 +00:00
Mathieu Chartier
05ad04dd91 Add runtime property permissions for experiments
Bug: 120794191
Bug: 123524494
Test: set a property and ensure it can be read in AndroidRuntime.cpp

Change-Id: Ib37102f35e9987d3d9baff83c45571a5d632ad50
2019-01-28 12:39:23 -08:00
Treehugger Robot
c5f6cd22fd Merge "Audit native code loading on user builds." 2019-01-28 17:52:32 +00:00
Shuzhen Wang
33898587ef Cameraserver: Allow cameraserver to access /data/misc/cameraserver
am: 4e1497c7c0

Change-Id: I9da56e7216e5b303bccf561814ef0ce409561bbc
2019-01-28 08:20:44 -08:00
Shuzhen Wang
b1a7f25f58 Cameraserver: Allow camera server to talk to MediaCodec
am: 8db7e4a7fa

Change-Id: Icdd5c65ee33472cf54790afdc57db336d0e342fd
2019-01-28 08:20:31 -08:00
Shuzhen Wang
4e1497c7c0 Cameraserver: Allow cameraserver to access /data/misc/cameraserver
Test: Cameraserver writes/reads/overwrites files in the folder
Bug: 79465976
Change-Id: I76460844a8e02e4c6ce704b85c72e57f861f5b18
2019-01-28 07:32:00 -08:00
Shuzhen Wang
8db7e4a7fa Cameraserver: Allow camera server to talk to MediaCodec
Test: Verify that cameraserver can call MediaCodec functions
Bug: 79465976
Change-Id: I145d2aac5004bf0d9432c3d5dd4d6dcd672374be
2019-01-28 07:32:00 -08:00
Alan Stokes
3f63dbf372 Audit native code loading on user builds.
Extend the auditing of native code loading from non-priv app home
directories to user builds. Only applies to apps targeting SDK <= 28.

Bug: 111338677
Test: Builds
Change-Id: I6fbbd80626a1c87dd7ece689f9fecd7c0a1a59d6
2019-01-28 14:15:48 +00:00
Roland Levillain
f988c51e41 Fix comment about transition from otapreopt_chroot to postinstall_dexopt.
am: 9f28f8b360

Change-Id: I9350d0625bbcfe15bcc7c6efa2befab9757e7543
2019-01-28 04:50:42 -08:00
Roland Levillain
9f28f8b360 Fix comment about transition from otapreopt_chroot to postinstall_dexopt.
Test: n/a
Change-Id: Id29de05c9dc4cf6771292050bbd8946bbb939cdd
2019-01-28 12:40:12 +00:00
SzuWei Lin
2d3075de4c Define rcs to be a radio_service
am: d97c99e4aa

Change-Id: I07639726752b25c7a16331b16f4bf4bcd3f7c546
2019-01-28 02:42:23 -08:00
Isabelle Taylor
19f4998480 Fix perfetto CTS test
The test was failing because of a selinux denial.
This adds the required rule.

Test: atest (previously failing CTS test passed)
Change-Id: Ieb99f9ab4c6014a3d0aa1fe6c6fb6b82fa9b7631
2019-01-28 10:18:16 +00:00
SzuWei Lin
d97c99e4aa Define rcs to be a radio_service
RcsService will die continously without the setting.

Bug: 123325711
Test: boot aosp_arm64_ab-userdebug on a blueline device
Change-Id: Ic140cb3e6466428bf62f0065c78aaf16f957f4d5
2019-01-28 07:00:10 +00:00
Remi NGUYEN VAN
780fbadf08 Add NetworkStack policies for netd and netlink
Allow netd to send network events to the NetworkStack, and allow the
NetworkStack to interact with netlink_route_socket for neighbor
monitoring.

Test: built, booted, WiFi works, no more violations
Bug: 112869080
Change-Id: If212b2897e37e9d249f81ba8139461bce461528e
2019-01-28 14:40:52 +09:00
Jeff Vander Stoep
cad5b92413 Merge "iorapd: add tmpfs type"
am: 063022a6ec

Change-Id: I04c61ac958d4d6f1df6d0aede2079794f2be0999
2019-01-26 23:53:29 -08:00
Jeff Vander Stoep
5e05eb6584 Merge "Properly Treble-ize tmpfs access"
am: df88d3faee

Change-Id: Ia466de350f93ed9798301cd35d890ed9912c6efd
2019-01-26 23:53:11 -08:00
Treehugger Robot
063022a6ec Merge "iorapd: add tmpfs type" 2019-01-27 07:46:14 +00:00
Treehugger Robot
df88d3faee Merge "Properly Treble-ize tmpfs access" 2019-01-27 07:46:14 +00:00
Joe Onorato
553be3816c Add incidentcompanion service.
am: 5536a08be3

Change-Id: I9364474f9d00893c81534042b4af8cc2e91f5e49
2019-01-26 18:52:46 -08:00
Joe Onorato
5536a08be3 Add incidentcompanion service.
It is a side channel for dumpstate and incidentd to communicate
status and get user authorization to share bugreports by calling
system_server.

Test: atest PermissionControllerTest / atest GooglePermissionControllerTest
Change-Id: I995a43a25f375e5c97dba1deb92ebe893ca8585d
2019-01-26 13:15:45 -08:00
Jeff Vander Stoep
6742ab4e4e iorapd: add tmpfs type
Fixes build breakage:
system/sepolicy/private/traced.te:36:ERROR 'unknown type iorapd_tmpfs' at token ';' on line 43166:

Bug: 123445058
Test: build marlin-userdebug
Change-Id: Iefeba03ed2efee92fb0d61214514338c6d999bd1
(cherry picked from commit 426ff11951)
2019-01-26 12:55:13 -08:00
Jeffrey Vander Stoep
33f3e04705 Merge "runtime_event_log_tags_file: dontaudit map permission"
am: 0e48c3bcdd

Change-Id: I9738e6e1feb10063e4485074b105780dedabfd24
2019-01-26 09:35:43 -08:00
Jeff Vander Stoep
41a2abfc0d Properly Treble-ize tmpfs access
This is being done in preparation for the migration from ashmem to
memfd. In order for tmpfs objects to be usable across the Treble
boundary, they need to be declared in public policy whereas, they're
currently all declared in private policy as part of the
tmpfs_domain() macro. Remove the type declaration from the
macro, and remove tmpfs_domain() from the init_daemon_domain() macro
to avoid having to declare the *_tmpfs types for all init launched
domains. tmpfs is mostly used by apps and the media frameworks.

Bug: 122854450
Test: Boot Taimen and blueline. Watch videos, make phone calls, browse
internet, send text, install angry birds...play angry birds, keep
playing angry birds...

Change-Id: I20a47d2bb22e61b16187015c7bc7ca10accf6358
Merged-In: I20a47d2bb22e61b16187015c7bc7ca10accf6358
(cherry picked from commit e16fb9109c)
2019-01-26 17:30:41 +00:00
Jeffrey Vander Stoep
0e48c3bcdd Merge "runtime_event_log_tags_file: dontaudit map permission" 2019-01-26 17:28:51 +00:00
Jeff Vander Stoep
929cf94b31 Merge "Require equivalence for mls restrictions on symlinks"
am: 1934af2cf2

Change-Id: I0e4f7f42daf7d625e1168385af9f6e17940b97ea
2019-01-25 22:35:22 -08:00
Primiano Tucci
a1150133af Merge "Allow iorapd to access perfetto"
am: 3698256b63

Change-Id: I6f91ac68da4ef21f9be0a3efaa5a747b0ff6296e
2019-01-25 22:31:22 -08:00
Treehugger Robot
1934af2cf2 Merge "Require equivalence for mls restrictions on symlinks" 2019-01-26 06:30:46 +00:00
Treehugger Robot
3698256b63 Merge "Allow iorapd to access perfetto" 2019-01-26 06:18:32 +00:00
Victor Hsieh
3b3843f048 Merge "Allow system_server to search su:key in debuggable build"
am: 565cbe2140

Change-Id: Iad7e8e7a291a9391a7581295b762ea80f13b9a76
2019-01-25 21:51:08 -08:00