Commit graph

22607 commits

Author SHA1 Message Date
Treehugger Robot
abba8e600e Merge "access_vectors: remove incorrect comment about mac_admin" 2020-01-17 00:22:26 +00: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
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
Treehugger Robot
623fb38952 Merge "priv_app: Remove rules allowing a priv-app to ptrace itself" 2020-01-10 20:23:06 +00:00
Ashwini Oruganti
a40840daa8 priv_app: Remove rules for system_update_service
We added an auditallow for these permissions on 11/26/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: 142672293
Test: TH
Change-Id: Ic2f68b3af861e0c00e2dea731c4d6b3255ab5175
2020-01-10 11:17:00 -08:00
Treehugger Robot
1f9ecdc894 Merge "Allow zygote to relabel CE and DE dirs from tmpfs to system_data_file" 2020-01-10 19:11:33 +00:00
Treehugger Robot
6df27928dd Merge "priv_app: Remove rules for storaged" 2020-01-10 14:49:32 +00:00
Ricky Wai
b2b7c02e7d Allow zygote to relabel CE and DE dirs from tmpfs to system_data_file
Also, allow zygote to scan dirs in /mnt/expand and relabel.

Test: No denials at boot
Test: No denials seen when creating mounts
Bug: 143937733
Change-Id: I86e77d27f5e9fb2f5852f787c7e5d9179c7404aa
2020-01-10 14:26:40 +00:00
Luke Huang
ddbfce2080 Merge "Make cronet file_contexts as "android:path" property" 2020-01-10 13:43:57 +00:00
Luke Huang
a63ba2a0a1 Make cronet file_contexts as "android:path" property
It follows examples of other APEX to make file_contexts of cronet
module as "android:path" property

Bug: 146416755
Test: atest cronet_e2e_tests
Test: atest CronetApiTest
Change-Id: I0608eb4bb43cee50f49217f19fb53f297fbf5ead
Merged-In: I0608eb4bb43cee50f49217f19fb53f297fbf5ead
2020-01-10 13:15:07 +00:00
Treehugger Robot
1fbac29eba Merge "Using macro "rx_file_perms" instead of "execute_no_trans"." 2020-01-10 09:23:21 +00:00
Treehugger Robot
88f2ed8186 Merge "Add Selinux rule to allow iorapd to execute compiler." 2020-01-10 08:27:26 +00:00
Ashwini Oruganti
2ba18e99d8 priv_app: Remove rules allowing a priv-app to ptrace itself
We added an auditallow for these permissions on 12/11/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: 142672293
Test: TH
Change-Id: Iaeaef560883b61644625b21e5c7095d4d9c68da9
2020-01-09 13:37:30 -08:00
Ashwini Oruganti
75ccb46de7 priv_app: Remove rules for keystore
We added an auditallow for these permissions on 11/26/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: 142672293
Test: TH
Change-Id: I18f99f54385b7c4e7c2ae923eff4c76800323a73
2020-01-09 13:23:40 -08:00