Commit graph

22618 commits

Author SHA1 Message Date
Treehugger Robot
4f0bf97b41 Merge "Add policies for permission APEX data directory." 2020-01-17 23:45:54 +00:00
Jing Ji
d1b9526ea0 Merge "Add rules for an unix domain socket for system_server" 2020-01-17 18:53:19 +00:00
Lee Shombert
2af7e0a1fb Merge "Rename the binder cache key for hasSystemFeature()" 2020-01-17 15:24:59 +00:00
Treehugger Robot
2e5ce26f17 Merge "priv_app: Remove permission to read from /data/anr/traces.txt" 2020-01-17 01:10:45 +00:00
Treehugger Robot
71be259d73 Merge "priv_app: Remove rules for ota_package_file" 2020-01-17 00:57:15 +00:00
Justin Yun
291d6b379d Use vndk_prop for old vndk properties
For vndk related properties, use vndk_prop context.
vndk_prop can be defined by 'init' and 'vendor_init', but free to
read by any processes.

Bug: 144534640
Test: check boot to see if the VNDK properties are readable
Change-Id: Ifa2bb0ce6c301ea2071e25ac4f7e569ea3ce5d83
2020-01-17 00:24:20 +00:00
Treehugger Robot
abba8e600e Merge "access_vectors: remove incorrect comment about mac_admin" 2020-01-17 00:22:26 +00:00
Jing Ji
2b12440ff7 Add rules for an unix domain socket for system_server
System_server will listen on incoming packets from zygotes.

Bug: 136036078
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I42feaa317615b90c5277cd82191e677548888a71
2020-01-16 16:09:48 -08:00
Hai Zhang
f301cd299b Add policies for permission APEX data directory.
Bug: 136503238
Test: presubmit
Change-Id: I636ab95070df4c58cf2c98b395d99cb807a7f243
2020-01-16 16:08:55 -08:00
Lee Shombert
d3625cdcec Rename the binder cache key for hasSystemFeature()
The code that uses the property has not been committed, so this change
has no impact on the codebase.

Bug: 140788621

Test: build an image that combines this change with the client code
and boot a phone.  Verify that there are no policy violations.

Change-Id: Ie6c1a791578c61adae5b71a38e61a2f5b20bb817
2020-01-16 14:56:27 -08:00
Ashwini Oruganti
565c685b35 priv_app: Remove permission to read from /data/anr/traces.txt
We added an auditallow for this permission on 12/17/2019, and have not
seen any recent logs for this in go/sedenials. No other priv-app should
rely on this now that gmscore is running in its own domain.

Bug: 147833123
Test: TH
Change-Id: I96f810a55e0eb8f3778aea9598f6437de0f65c7f
2020-01-16 14:42:43 -08:00
Treehugger Robot
13722174b7 Merge "Add selinux contexts for system_config_service" 2020-01-16 22:41:42 +00:00
Wei Wang
fbe4afa7aa Merge "stable aidl Power HAL policy" 2020-01-16 22:35:42 +00:00
Ashwini Oruganti
d61b0ce1bc priv_app: Remove rules for ota_package_file
We added auditallows for these permissions on 12/16/2019, and have not
seen any recent logs for this in go/sedenials. No other priv-app should
rely on this now that gmscore is running in its own domain.

Bug: 147833123
Test: TH
Change-Id: I4789b29462ef561288aeaabbdb1e57271d5fcd2a
2020-01-16 14:20:12 -08:00
Collin Fijalkovich
fc52615d13 Merge "Configure SELinux for PowerManager Caches" 2020-01-16 19:34:10 +00:00
Treehugger Robot
89277a412d Merge "Fix spelling of 'system' for android.hardware.identity@1.0-service.example" 2020-01-16 18:43:34 +00:00
Joshua Duong
bda9c33ab1 Merge "Allow adbd to set/get persist.adb props, system_server to get." 2020-01-16 17:43:39 +00:00
Treehugger Robot
834c964d66 Merge "system_server: TelephonyManager reads /proc/cmdline" 2020-01-16 15:52:02 +00:00
Stephen Smalley
871546058d access_vectors: remove incorrect comment about mac_admin
CAP_MAC_ADMIN was originally introduced into the kernel for use
by Smack and not used by SELinux. However, SELinux later appropriated
CAP_MAC_ADMIN as a way to control setting/getting security contexts
unknown to the currently loaded policy for use in labeling filesystems
while running a policy that differs from the one being applied to
the filesystem, in
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=12b29f34558b9b45a2c6eabd4f3c6be939a3980f
circa v2.6.27.

Hence, the comment about mac_admin being unused by SELinux is inaccurate.
Remove it.

The corresponding change to refpolicy is:
5fda529636

Test: policy builds

Change-Id: Ie3637882200732e498c53a834a27284da838dfb8
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2020-01-16 10:29:15 -05:00
Treehugger Robot
8943f24f02 Merge "llkd: requires sys_admin permissions" 2020-01-16 12:57:26 +00:00
Treehugger Robot
a1f829d3f8 Merge "Add sepolicy for usb gadget hal v1.1" 2020-01-16 11:01:35 +00:00
Howard Chen
8b5a90a5e4 Merge "Allow gsid to create subdirectories under /metadata/gsi/dsu" 2020-01-16 05:33:09 +00:00
Wei Wang
32b24c0f0b stable aidl Power HAL policy
Test: boot and dumpsys -l
Change-Id: I58022c9e0c24ba4e2d695acf63375c9f74c51b22
2020-01-15 16:53:40 -08:00
Treehugger Robot
1145b90b69 Merge "Add rebootescrow default HAL rules" 2020-01-16 00:24:59 +00:00
David Zeuthen
05ade22c65 Fix spelling of 'system' for android.hardware.identity@1.0-service.example
Bug: 111446262
Test: Manually
Change-Id: I37764f0ed580b4242e02c1958eabed88957adfd1
2020-01-15 19:05:24 -05:00
Treehugger Robot
a5527b4e46 Merge "Add SELinux policy for Identity Credential HAL" 2020-01-15 23:19:03 +00:00
Treehugger Robot
f644c547ad Merge "perf_event: rules for system and simpleperf domain" 2020-01-15 22:07:24 +00:00
Kenny Root
70c40e05f3 Add rebootescrow default HAL rules
Bug: 63928581
Test: build and check HAL label
Change-Id: I057b26eb20c5a6b022c7f391a6c8535f2953051c
2020-01-15 13:14:35 -08:00
Hall Liu
719bf1b8ca Add selinux contexts for system_config_service
Add selinux contexts for the new system config service.

Test: atest -it -w SystemConfigTest
Bug: 143112379
Change-Id: Ibe67acb404b6951e1fda9ce28bd50a0efdd44c5f
2020-01-15 11:15:29 -08:00
Joshua Duong
4bec0691d8 Allow adbd to set/get persist.adb props, system_server to get.
Bug: b/111434128

Test: getprop persist.adb.wifi.guid
Change-Id: If211c2d00724f62a201dd9c19afc9e894001069f
2020-01-15 10:38:11 -08:00
Treehugger Robot
41a1b4af9c Merge "[SfStats] sepolicy for SfStats' global puller" 2020-01-15 17:25:54 +00:00
Ryan Savitski
ffa0dd93f3 perf_event: rules for system and simpleperf domain
This patch adds the necessary rules to support the existing usage of
perf_event_open by the system partition, which almost exclusively
concerns the simpleperf profiler. A new domain is introduced for some
(but not all) executions of the system image simpleperf. The following
configurations are supported:
* shell -> shell process (no domain transition)
* shell -> debuggable app (through shell -> runas -> runas_app)
* shell -> profileable app (through shell -> simpleperf_app_runner ->
                            untrusted_app -> simpleperf)
* debuggable/profile app -> self (through untrusted_app -> simpleperf)

simpleperf_app_runner still enters the untrusted_app domain immediately
before exec to properly inherit the categories related to MLS. My
understanding is that a direct transition would require modifying
external/selinux and seapp_contexts as with "fromRunAs", which seems
unnecessarily complex for this case.

runas_app can still run side-loaded binaries and use perf_event_open,
but it checks that the target app is exactly "debuggable"
(profileability is insufficient).

system-wide profiling is effectively constrained to "su" on debug
builds.

See go/perf-event-open-security for a more detailed explanation of the
scenarios covered here.

Tested: "atest CtsSimpleperfTestCases" on crosshatch-user/userdebug
Tested: manual simpleperf invocations on crosshatch-userdebug
Bug: 137092007
Change-Id: I2100929bae6d81f336f72eff4235fd5a78b94066
2020-01-15 16:56:41 +00:00
Treehugger Robot
679b417ccd Merge "access_vectors: re-organize common file perms" 2020-01-15 16:49:04 +00:00
Mark Salyzyn
37daf9f48e llkd: requires sys_admin permissions
As a result of commit f8a00cef17206ecd1b30d3d9f99e10d9fa707aa7
("proc: restrict kernel stack dumps to root")
the userdebug feature where llkd can monitor for live lock
signatures in the stack traces broke.

So now userdebug variant of llkd requires sys_admin permissions.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: llkd_unit_test
Bug: 147486902
Change-Id: I31572afa08daa490a69783855bce55313eaed96c
2020-01-15 08:08:59 -08:00
Nikita Ioffe
edc513c8c1 Merge "Allow apps to read ro.init.userspace_reboot.is_supported" 2020-01-15 14:14:08 +00:00
Treehugger Robot
4d33dc28e7 Merge "Allow init to configure dm_verity kernel driver." 2020-01-15 13:13:01 +00:00
Howard Yen
a98cdefad6 Add sepolicy for usb gadget hal v1.1
Bug: 147645728
Test: build pass and service running correctly
Change-Id: I52b6bcae2c05998e3f22c39998597e2ecef55036
2020-01-15 16:44:39 +08:00
Treehugger Robot
f9d45fc447 Merge "Allow zygote to bind mount /data/misc/profiles/cur" 2020-01-15 05:18:44 +00:00
Yifan Hong
3914147f3a Merge "Give fastbootd permission to mount and write to /metadata/gsi." 2020-01-15 01:31:59 +00:00
David Zeuthen
b8b5da4305 Add SELinux policy for Identity Credential HAL
Bug: 111446262
Test: VtsHalIdentityCredentialTargetTest
Change-Id: Icb5a0d8b24d463a2f1533f8dd3bfa84bf90acc6f
2020-01-14 20:13:39 -05:00
Stephen Smalley
cd62a4a56a access_vectors: re-organize common file perms
The open, audit_access, execmod, and watch* permissions
are all defined in the COMMON_FILE_PERMS in the kernel
classmap and inherited by all the file-related classes;
we can do the same in the policy by putting them into the
common file declaration.

refpolicy recently similarly reorganized its definitions and added the
watch* permissions to common file, see:
e5dbe75276
c656b97a28
3952ecb4dd

Adding new permissions to the end of the existing classes was only
required for kernels that predate the dynamic class/perm mapping
support (< v2.6.33).

Test: policy still builds

Change-Id: I44a2c3a94c21ed23410b6f807af7f1179e2c1747
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2020-01-14 14:59:08 -05:00
Nikita Ioffe
32e7ea0096 Allow apps to read ro.init.userspace_reboot.is_supported
This property essentially implements
PowerManager.isRebootingUserspaceSupported[0] public API, hence apps
should be able to read it.

[0]: 73cab34d9f:core/java/android/os/PowerManager.java;l=1397

Test: m checkbuild
Test: atest CtsUserspaceRebootHostSideTestCases
Test: adb shell getprop ro.init.userspace_reboot.is_supported
Bug: 135984674
Change-Id: I09cab09735760529de81eb6d5306f052ee408a6e
2020-01-14 12:39:23 +00:00
Ricky Wai
ca6e01aa53 Allow zygote to bind mount /data/misc/profiles/cur
Bug: 143937733
Test: No denials at boot
Test: No denials seen when creating moun
Change-Id: Ia6b196dde6ed511ebff53b03891122b1120fec07
2020-01-14 11:34:15 +00:00
Treehugger Robot
184fe45549 Merge "perf_event: define security class and access vectors" 2020-01-13 23:10:54 +00:00
Collin Fijalkovich
8496548b38 Configure SELinux for PowerManager Caches
Setup SELinux to allow the world to read, and system_server to write, a
property used as an indicator that we need to refresh local caches
for PowerManager.isPowerSaveMode and PowerManager.isInteractive.

Bug: 140788621
Test: Flashed build and tested that phone boots and does not crash
as PowerManager operations take place.

Change-Id: I3e7e513756c8d881295721c2729cd37ad3bec8b8
2020-01-13 14:01:11 -08:00
Lee Shombert
bafd0c762a SELinux changes for the hasSystemFeature() binder cache property.
The binder_cache_system_server_prop context allows any user to read the
property but only the system_server to write it.  The only property with
this context is currently binder.cache_key.has_system_feature but users
will be added.

Bug: 140788621

Test: this was tested on an image with a binder cache implementation.  No
permission issues were found.  The implementation is not part of the current
commit.

Change-Id: I4c7c3ddf809ed947944408ffbbfc469d761a6043
2020-01-13 10:21:54 -08:00
Ryan Savitski
80640c536c perf_event: define security class and access vectors
This patch allows us to write SELinux policies for the
perf_event_open() syscall LSM hooks added to the kernel in the following
commit:
da97e18458

Bug: 137092007
Change-Id: I0005759eb7a487faebe94a4653e3865343eb441e
2020-01-13 14:56:54 +00:00
Ashwini Oruganti
65d6fd48c8 Merge "priv_app: Remove rules for system_update_service" 2020-01-11 00:49:14 +00:00
Alec Mouri
f5df7b4467 [SfStats] sepolicy for SfStats' global puller
Bug: 119885568
Bug: 136597024
Test: adb shell cmd stats pull-source 10062
Test: statsd_testdrive 10062
Change-Id: Ide8ecd2683b3ea29a3207f89d35d7067490dabb1
2020-01-10 16:34:48 -08:00
Zimuzo Ezeozue
34a19b76ce Merge "Revert "Allow MediaProvider to host FUSE devices."" 2020-01-10 21:17:15 +00:00