Commit graph

29125 commits

Author SHA1 Message Date
Satya Tangirala
0653374e71 Add convert_storage_key_to_ephemeral to keystore2_key access vector
Introduce the convert_storage_key_to_ephemeral permission to the
keystore2_key access vector and give vold permission to use it. This
permission must be checked when a caller wants to get a per-boot
ephemeral key from a long lived wrapped storage key.

Bug: 181806377
Bug: 181910578
Change-Id: I542c084a8fab5153bc98212af64234e62e9ad032
2021-03-21 14:14:28 -07:00
Treehugger Robot
158db41e21 Merge "Expose domain_verification_service" 2021-03-19 20:28:40 +00:00
Janis Danisevskis
b488a8fe1a Keystore 2.0: Remove keystore2.enable property.
Bug: 171563717
Test: N/A
Change-Id: I85819a71dc24777a9d54f0c83b8b29da9f48cec1
2021-03-19 10:07:49 -07:00
Kholoud Mohamed
bd0268c020 Merge "Add app_api_service to lock_settings_service" 2021-03-19 15:13:35 +00:00
Martijn Coenen
0b47552028 Merge "Add odsign status properties." 2021-03-19 10:30:20 +00:00
Inseob Kim
7a5febc2e9 Merge "Revert "Build platform side policy with Soong"" 2021-03-19 09:32:58 +00:00
Treehugger Robot
12f3121d79 Merge "Define ro.board.first_api_level property" 2021-03-19 08:50:36 +00:00
Inseob Kim
d869d02758 Revert "Build platform side policy with Soong"
This reverts commit 7629e86053.

Reason for revert: broke build

Change-Id: I97dc1ea78901cab62404780e7ee096ad45c0b21b
2021-03-19 07:04:51 +00:00
Inseob Kim
14a7b3a3f6 Merge changes from topic "sepolicy_android_bp"
* changes:
  Build platform side policy with Soong
  Add se_policy_cil module to build cil policy
  Add se_policy_conf module to build policy.conf
2021-03-19 04:20:12 +00:00
Wei Wang
cc01eb9d89 Merge "Grant access to cpuhp_pause trace point" 2021-03-18 23:49:14 +00:00
Hridya Valsaraju
1d1f2c257d Merge "Allow dumpstate to read /dev/binderfs/binder_logs/proc" 2021-03-18 21:17:43 +00:00
Orion Hodson
660cf864c8 Merge "Revert "Introduce derive_classpath."" 2021-03-18 19:18:02 +00:00
Orion Hodson
5fd85de907 Revert "Introduce derive_classpath."
Revert submission 1602413-derive_classpath

Bug: 180105615
Fix: 183079517
Reason for revert: SELinux failure leading to *CLASSPATH variables not being set in all builds

Reverted Changes:
I6e3c64e7a:Introduce derive_classpath service.
I60c539a8f:Exec_start derive_classpath on post-fs-data.
I4150de69f:Introduce derive_classpath.

Change-Id: I17e2cd062d8fddc40250d00f02e40237ad62bd6a
2021-03-18 17:00:43 +00:00
Inseob Kim
7629e86053 Build platform side policy with Soong
This replaces the following policy files with Android.bp modules:

  - reqd_policy_mask.cil
  - plat_sepolicy.cil
  - system_ext_sepolicy.cil
  - product_sepolicy.cil
  - plat_pub_policy.cil
  - system_ext_pub_policy.cil
  - pub_policy.cil
  - general_sepolicy.conf (for CTS)

Also microdroid's system policy now uses above.

Bug: 33691272
Bug: 178993690
Test: policy files stay same
Test: boot normal device and microdroid, see sepolicy works
Test: build CtsSecurityHostTestCases
Change-Id: I908a33badee04fbbdadc6780aab52e989923ba57
2021-03-18 19:54:35 +09:00
Inseob Kim
df1a0dee63 Add se_policy_cil module to build cil policy
This adds a new module se_policy_cil. It will consume the policy.conf
file (usually built with se_policy_conf) and outputs a compiled cil
policy file, which will be shipped to devices.

Bug: 33691272
Test: try building se_policy_cil from se_policy_conf
Change-Id: I7a33ab6cb5978e1a7d991be7514305c5e9f8159b
2021-03-18 19:54:30 +09:00
Inseob Kim
7e8bd1e657 Add se_policy_conf module to build policy.conf
This adds a new soong module that transforms selinux policy files to
policy.conf file. It uses m4 macro with various variables, and replaces
transform-policy-to-conf macro in system/sepolicy/definitions.mk.

The module will be used when building:
- policy cil files shipped to the device
- CTS tests that needs general_policy.conf

Bug: 33691272
Test: try building se_policy_conf with se_build_files
Change-Id: Ie1082a8193c2205992b425509b9d5bfa4b495b2f
2021-03-18 19:52:09 +09:00
Hridya Valsaraju
a758a5cc3b Allow dumpstate to read /dev/binderfs/binder_logs/proc
This patch fixes the following denial:
avc: denied { read } for name=\"1194\" dev=\"binder\" ino=1048790
 scontext=u:r:dumpstate:s0 tcontext=u:object_r:binderfs_logs_proc:s0 tclass=file permissive=0

Test: build
Bug: 182334323
Change-Id: I739f09f56763e3e7ac01dced6feda7a5a5fd2210
2021-03-17 22:47:43 -07:00
Wei Wang
0c032814b9 Grant access to cpuhp_pause trace point
Bug: 172971380
Test: Build
Change-Id: If09139990ef396c8de4d8990aae45ae483f2fb31
2021-03-17 16:43:53 -07:00
Peter Collingbourne
228c1c396c Merge "Add support for a hw_timeout_multiplier system property." 2021-03-17 18:18:51 +00:00
Treehugger Robot
baf84ee461 Merge "Add SELinux policy for using userfaultfd" 2021-03-17 15:04:51 +00:00
Treehugger Robot
e165cd486b Merge "Keystore 2.0: Allow apps to get the Keystore state." 2021-03-17 14:11:21 +00:00
Mohammad Islam
a3f3045f42 Merge "Relocate permission to reserve file from update_engine to apexd" 2021-03-17 12:50:15 +00:00
Lokesh Gidra
06edcd8250 Add SELinux policy for using userfaultfd
ART runtime will be using userfaultfd for a new heap compaction
algorithm. After enabling userfaultfd in android kernels (with SELinux
support), the feature needs policy that allows { create ioctl read }
operations on userfaultfd file descriptors.

Bug: 160737021
Test: Manually tested by exercising userfaultfd ops in ART
Change-Id: I9ccb7fa9c25f91915639302715f6197d42ef988e
2021-03-17 04:57:22 -07:00
satayev
ba22487f86 Merge "Introduce derive_classpath." 2021-03-17 10:58:30 +00:00
Justin Yun
0839607a0c Define ro.board.first_api_level property
When a device define BOARD_SHIPPING_API_LEVEL with an API level, it
sets a vendor property ro.board.first_api_level in vendor/build.prop.
This property is initiated by vendor_init and read-only.

Bug: 176950752
Test: getprop ro.board.first_api_level
Change-Id: Ia09d2e80f1ca4a79dbe4eb0dc11b189644819cad
2021-03-17 15:06:44 +09:00
Howard Chen
28003eeda4 Merge "Support copy-on-write persistent data block when running a DSU" 2021-03-17 02:07:03 +00:00
Maciej Żenczykowski
c23fb986cb update post bpf tethering mainline module split from netd
FYI: running networking tests needs extra privs:
  #============= su ==============
  allow su self:capability2 bpf;

  #============= untrusted_app ==============
  allow untrusted_app self:key_socket create;
  allow untrusted_app self:netlink_route_socket { bind nlmsg_readpriv };
  allow untrusted_app self:packet_socket create;

But obviously we can't add the last three, and not even sure about the first.

Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I778ccaf5d100cb26f167a0c690e0125594d477c3
2021-03-16 04:10:09 -07:00
Martijn Coenen
f2e4ee6498 Add odsign status properties.
These properties are used to communicate odsign status, and allow init
to evict keys and start zygote at the correct moments in time.

Bug: 165630556
Test: no denials from init/odsign
Change-Id: I813e5c1c93d6f00a251a9cce02d0b74e5372c1ce
2021-03-16 09:14:29 +01:00
Janis Danisevskis
ac4a6e75fc Keystore 2.0: Allow apps to get the Keystore state.
Bug: 171305684
Test: atest com.android.server.locksettings
Change-Id: I348e02704a0ddacb7859821149dc97df1d298758
2021-03-15 19:04:03 -07:00
Inseob Kim
619e4a7a82 Add se_build_files module
se_build_files module globs given srcs from sepolicy directories and
acts as a filegroup with the following tags, which can be used to build
system side policy files.

- plat
- plat_public
- system_ext
- system_ext_public
- product
- product_public
- reqd_mask

se_build_files module acts like the build_policy macro in Android.mk.
Normal genrule module can't easily handle that, because both file order
and directory order matter.

Support for vendor/odm is to be added in the future.

Bug: 33691272
Test: inspect se_build_files with above tags and compare it to ninja
Change-Id: Id7c57b01c78fc14ac5e8eeeb074a6fc21d271e84
2021-03-16 10:22:09 +09:00
kholoud mohamed
2a1682a797 Add app_api_service to lock_settings_service
This is needed to enable calls to KeyguardManager
APIs from clients e.g. CTS tests

Test: N/A
Bug: 182260585
Change-Id: Id8cf3f238f8ecab7c96a14d62003c85ab18e6ac0
2021-03-15 18:04:12 +00:00
Hasini Gunasinghe
a3031eccca Merge changes from topic "keystore_api_for_credstore"
* changes:
  Credstore: Add rules to allow credstore read keystore2_enable property.
  Add get_auth_token permission to allow credstore to call keystore2.
2021-03-15 16:02:20 +00:00
Neil Fuller
086a71e3b3 Merge "Add app_api_service to time_detector" 2021-03-15 13:25:47 +00:00
Nikita Ioffe
49505cdbc1 Merge "Add apexd_config_prop type" 2021-03-15 13:04:50 +00:00
Aaron Huang
68e7eaf35d Merge "Add selinux policies for pac_proxy_service" 2021-03-15 11:49:45 +00:00
Alex Hong
01cce002bf Merge "Support the dump of nfc service in incident reports." 2021-03-15 03:32:21 +00:00
Nikita Ioffe
360e0f91c3 Add apexd_config_prop type
This type is used for properties that provides per-device configuration
for apexd behaviour (so far - timeouts for creating/deleting dm device).

Test: builds
Bug: 182296338
Change-Id: Ib815f081d3ab94aa8c941ac68b57ebe661acedb9
2021-03-15 00:35:38 +00:00
Hasini Gunasinghe
1d34bd7fd3 Credstore: Add rules to allow credstore read keystore2_enable property.
This is temporary, until keystore2 lands.

Test: CtsVerifier.
Change-Id: I8335e0eb48da682e66fceff9e31696d61235424b
2021-03-12 20:32:06 +00:00
Hasini Gunasinghe
db88d1555f Add get_auth_token permission to allow credstore to call keystore2.
This CL adds a new keystore2 permission "get_auth_token"and grants this
permission to credstore which needs to call keystore2 to obtain
authtokens.

Bug: 159475191
Test: CtsVerifier
Change-Id: I1c02ea73afa6fe0b12a2d74e51fb4a8a94fd4baf
2021-03-12 20:32:06 +00:00
Robert Shih
76730064a4 Merge "Allow communication between mediametrics & statsd" 2021-03-12 18:21:34 +00:00
Tim Van Patten
d78fd554a2 Merge "Add ephemeral_app_api_service to game_service SEpolicy" 2021-03-12 17:29:11 +00:00
Neil Fuller
426d366e0d Add app_api_service to time_detector
Commit e4d26ca32c75619c0b208db869873efbbcae262c added some lines to the
constructor of TimeManager to obtain the time_detector. This broke
the TimeManagerTest test, which uses the TimeManager via
instrumentation. Unclear why it wasn't noticed immediately but it has
been broken since then.

The simplest thing is to add app_api_service to time_detector. The
intention is for at least one time_detector service call to be called
from priv-apps so this will be needed.

Bug: 181080343
Test: atest CtsTimeTestCases:android.time.cts.TimeManagerTest#testManageConfiguration -- --abi x86_64
Change-Id: I1072409559aec02a61549c5dedeb27264c43b74f
2021-03-12 14:31:29 +00:00
Robert Shih
d37ba7316c Allow communication between mediametrics & statsd
Bug: 141714243
Test: statsd_testdrive
Change-Id: I75fed754c04e3e031d5600d0487e83099402f814
2021-03-12 04:06:23 -08:00
Lajos Molnar
c0119885d6 Merge "Add media performance class property to sepolicy" 2021-03-12 01:31:08 +00:00
Treehugger Robot
dc94f8343c Merge "fastbootd: allow to fetch vendor_boot partition." 2021-03-11 23:06:30 +00:00
Winson Chiu
72e242f110 Expose domain_verification_service
There is a need to expose one of the methods as app API, so the SE
context needs to match.

Bug: 180955393
Change-Id: Id28f9b0dd5cfd760bbfdbd7c19cae5bedc22cbb1
2021-03-11 22:31:27 +00:00
Peter Collingbourne
01e58e0fe3 Add support for a hw_timeout_multiplier system property.
In order to test the platform in emulators that are orders of magnitude
slower than real hardware we need to be able to avoid hitting timeouts
that prevent it from coming up properly. For this purpose introduce
a system property, ro.hw_timeout_multiplier, which may be set to
an integer value that acts as a multiplier for various timeouts on
the system.

Bug: 178231152
Change-Id: I6d7710beed0c4c5b1720e74e7abe3a586778c678
Merged-In: I6d7710beed0c4c5b1720e74e7abe3a586778c678
2021-03-11 14:04:18 -08:00
Yifan Hong
cda79266ab fastbootd: allow to fetch vendor_boot partition.
vendor_boot is labeled as boot_block_device. With
fastboot fetch command, fastbootd needs to read
the vendor_boot device and return it to the host.

Test: pass
Bug: 173654501
Change-Id: I197e39c9e7572dc9a714f36637c02ee9ead2e5f3
2021-03-11 12:47:04 -08:00
Tim Van Patten
2155031b53 Add ephemeral_app_api_service to game_service SEpolicy
Add instant app support to game_service.

Bug: b/182342775
Test: atest CtsGameManagerTestCases --instant
Change-Id: I400f740a1aa0d8afa2d8f65499eb98e7589790d2
2021-03-11 12:04:18 -07:00
Alistair Delva
7e3a17fe31 Merge "Add kernel permission for bootconfig proc file" 2021-03-11 15:52:02 +00:00