Commit graph

28294 commits

Author SHA1 Message Date
ChengYou Ho
553afe7242 Add sepolicy for oemlock aidl HAL
Bug: 176107318
Change-Id: I26f8926401b15136f0aca79b3d5964ab3b59fbdd
2021-01-11 05:57:17 +00:00
Gavin Corkery
b46e956d97 Merge "Add sepolicy for /metadata/watchdog" 2021-01-08 08:20:45 +00:00
Chun-Wei Wang
e88e8a679e Merge "Relabel /data/rollback files as enabling rollback (4/n)" 2021-01-08 04:46:23 +00:00
Bob Badour
9b6eeb3307 Merge "Revert^2 "Export soong license data to make."" 2021-01-07 22:42:08 +00:00
Gavin Corkery
b0aae28b41 Add sepolicy for /metadata/watchdog
See go/rescue-party-reboot for more context.

One integer will be stored in a file in this
directory, which will be read and then deleted at the
next boot. No userdata is stored.

Test: Write and read from file from PackageWatchdog
Bug: 171951174

Change-Id: I18f59bd9ad324a0513b1184b2f4fe78c592640db
2021-01-07 19:42:56 +00:00
Shubang Lu
ba4e6b89aa Merge "SE policy for tuner service." 2021-01-07 18:34:36 +00:00
Nicolas Geoffray
f5891d67aa Merge "Add boot animation progress system property." 2021-01-07 09:23:35 +00:00
Bob Badour
4eeb6a2eac Revert^2 "Export soong license data to make."
56f419d6c8

Change-Id: I5eebdea9dc8b6f3be1cda23225733df0d78cbbdc
2021-01-06 20:50:49 -08:00
JW Wang
65480a460f Relabel /data/rollback files as enabling rollback (4/n)
We will link files under /data/apex/active and /data/app to
/data/rollback when enabling rollbacks to avoid copy.

When creating hard links, we have to enusre source and target have the
same label to avoid subtle bugs.

We will assign apk_data_file to *.apk files and
staging_data_file to *.apex files under /data/rollback.

Also allow system_server to link /data/apex/active files.

Bug: 168562373
Test: m
Change-Id: I4be38cc8c84494c4ddfa03e37f2af3958bff5dfb
2021-01-07 11:11:54 +08:00
Bob Badour
1135fd71cd Merge "Revert "Export soong license data to make."" 2021-01-06 19:17:44 +00:00
Jaegeuk Kim
dc00a31fe5 Merge "Allow vold to run make_f2fs" 2021-01-06 19:12:35 +00:00
Jerome Gaillard
56f419d6c8 Revert "Export soong license data to make."
Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I9af3727fba03f6b40cd6d77c7e259ef4c9b7f29d
2021-01-06 19:00:05 +00:00
Bob Badour
c182ed7f74 Merge "Export soong license data to make." 2021-01-06 18:08:06 +00:00
Inseob Kim
72351ce767 Merge "Support building mixed versions of sepolicy" 2021-01-06 05:07:05 +00:00
Jaegeuk Kim
dc16f6d896 Allow vold to run make_f2fs
type=1400 audit(1901536.380:4): avc: denied { ioctl } for comm="make_f2fs" path="/dev/block/dm-9" dev="tmpfs" ino=30744 ioctlcmd=0x1277 scontext=u:r:vold:s0 tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=0

Bug: 172378121
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Iff0ae7a8ff3dd1d4fa3fd29a4db218eaac9ba253
2021-01-05 18:06:18 -08:00
Inseob Kim
8ada8a7c1b Support building mixed versions of sepolicy
Now newer system policy and older vendor policy can be built together by
setting following variables:

- BOARD_SEPOLICY_VERS
- BOARD_REQD_MASK_POLICY (copy of older system/sepolicy/reqd_mask)
- BOARD_PLAT_VENDOR_POLICY (copy of older system/sepolicy/vendor)
- BOARD_(SYSTEM_EXT|PRODUCT)_(PUBLIC|PRIVATE)_PREBUILT_DIRS (copy of
  older system_ext and product policies)

Bug: 168159977
Test: try normal build and mixed build
Test: boot and check selinux denials
Change-Id: Ie239580433ffd293fa6891cd665fb5ef83c0a14f
2021-01-06 10:46:15 +09:00
Steven Moreland
4008d6242d Merge "hal_audiocontrol: use hal_attribute_service" 2021-01-05 18:12:56 +00:00
Bob Badour
bd8ca4af30 Export soong license data to make.
Bug: 151953481
Bug: 151177513
Bug: 67772237
Change-Id: I656486070103a2aeaab0e8cbfb3a0af097af8aa8
2021-01-05 08:42:48 -08:00
Inseob Kim
726dc022db Merge "Revert "Make default_prop only readable from coredomain"" 2021-01-05 08:56:07 +00:00
Jackal Guo
32fbfbc016 Revert "Make default_prop only readable from coredomain"
This reverts commit 082ced1951.

Reason for revert: b/176784961

Change-Id: Ia85667216d63084e9e23aefe1d3bfd7942d51a2a
2021-01-05 08:47:57 +00:00
Treehugger Robot
3acee7da98 Merge "Make default_prop only readable from coredomain" 2021-01-05 05:25:14 +00:00
Rick Yiu
0e90a98f18 sepolicy: Add uclamp file nodes to proc_sched
The uclamp file nodes will be standard, so add to proc_sched.

Bug: 176528637
Test: build pass
Change-Id: I3c8e540f3d4bae260322aa6954e09930ffb307b3
2020-12-31 08:15:32 +00:00
Nazanin Bakhshi
51872d888d Merge "Revert "hal_can_*: use hal_attribute_service"" 2020-12-29 22:57:03 +00:00
Nazanin Bakhshi
061b56b497 Revert "hal_can_*: use hal_attribute_service"
This reverts commit c8e937efe5.

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?build-cop=true, bug 176180039>

Change-Id: I0aff6ebba8b6a7a45af7229a0506f0426a8ebadf
2020-12-29 22:53:29 +00:00
Peiyong Lin
30b809bd97 Merge "Add SEPolicy rules for game service." 2020-12-29 22:18:24 +00:00
Steven Moreland
8e5c457f2e Merge "hal_can_*: use hal_attribute_service" 2020-12-29 20:43:20 +00:00
Chiachang Wang
bd15e9ac63 Merge "Add new selinux type for radio process" 2020-12-29 00:24:12 +00:00
Peiyong Lin
9449176122 Add SEPolicy rules for game service.
Bug: b/174956354
Test: manual
Change-Id: Ife1aac3435427f89f5701e4ead0763839f01d61b
2020-12-24 18:46:25 -08:00
Chiachang Wang
813c25fc91 Add new selinux type for radio process
ConnectivityService is going to become mainline and can not
access hidden APIs. Telephony and Settings were both accessing
the hidden API ConnectivityManager#getMobileProvisioningUrl.
Moving #getMobileProvisioningUrl method into telephony means
that there is one less access to a hidden API within the overall
framework since the Connectivity stack never needed this value.
Thus, move getMobileProvisioningUrl parsing to telephony surface
and provide the corresponding sepolicy permission for its access.

The exsting radio_data_file is an app data type and may allow
more permission than necessary. Thus create a new type and give
the necessary read access only.

Bug: 175177794
Test: verify that the radio process could read
      /data/misc/radio/provisioning_urls.xml successfully
Change-Id: I191261a57667dc7936c22786d75da971f94710ef
2020-12-24 15:11:15 +08:00
Steven Moreland
7042d472a7 Merge "hal_power_stats: use hal_attribute_service" 2020-12-23 20:18:03 +00:00
Treehugger Robot
9afb3747fe Merge "sepolicy: set expandattribute false for dmabuf_heap_device_type" 2020-12-23 09:16:42 +00:00
Hridya Valsaraju
eab2858649 sepolicy: set expandattribute false for dmabuf_heap_device_type
This is needed to avoid build failure in target bertha_arm64.

Test: make
Bug: 176124106
Change-Id: Id24eaa00dc5d601deb7533ac1d484a76535c8df0
2020-12-23 05:14:31 +00:00
Steven Moreland
bc2624a041 hal_power_stats: use hal_attribute_service
This macro creates the necessary neverallow to assert the
hal_power_stats_{client,server} attribute has exclusive ownership of
the service.

Bug: 176180039
Test: build/TH
Change-Id: I710eadc4c4f4642937aa16a25fe559e1cd3c9224
2020-12-23 01:38:03 +00:00
Steven Moreland
c8e937efe5 hal_can_*: use hal_attribute_service
This macro creates the necessary neverallow to assert the
hal_can_*_{client,server} attribute has exclusive ownership of
the service.

Bug: 176180039
Test: build/TH
Change-Id: I876b50e4184ef787117d5ca67c7fbd522d82687c
2020-12-23 01:36:02 +00:00
Steven Moreland
42a02d77ed hal_audiocontrol: use hal_attribute_service
This macro creates the necessary neverallow to assert the
hal_audiocontrol_{client,server} attribute has exclusive ownership of
the service.

Bug: 176180039
Test: build/TH
Change-Id: I2046e31f5cf04b560b842a03eafbec597443f15f
2020-12-23 01:26:58 +00:00
Kalesh Singh
24ada7dbee Reland: Memtrack HAL stable aidl sepolicy
Bug: 175021432
Test: Check logcat for denials
Change-Id: Id92fc543791072d8682e3a89cbf08370007108bf
2020-12-22 16:08:53 -05:00
Treehugger Robot
831fddd794 Merge "Allow coredomain access to only approved categories of vendor heaps" 2020-12-21 20:34:06 +00:00
Treehugger Robot
0afbe0eb98 Merge "Clean up keymint service policy." 2020-12-17 20:40:08 +00:00
Alan Stokes
c18e79e90c Add shared_relro dontaudit.
Use of StrictMode in framework code running in the app process can
generate a denial:

avc:  denied  { find } for pid=4050 uid=1037 name=network_management
 scontext=u:r:shared_relro:s0:c13,c260,c512,c768
 tcontext=u:object_r:network_management_service:s0
 tclass=service_manager permissive=0

But the code handles the failure properly so we suppress this.

Bug: 174750397
Test: Manual
Change-Id: I7b334db0dde4365ff19a7cf42a5139f35b5e6512
2020-12-17 14:10:07 +00:00
Hridya Valsaraju
8c9cf62edb Allow coredomain access to only approved categories of vendor heaps
One of the advantages of the DMA-BUF heaps framework over
ION is that each heap is a separate char device and hence
it is possible to create separate sepolicy permissions to restrict
access to each heap.
In the case of ION, allocation in every heap had to be done through
/dev/ion which meant that there was no away to restrict allocations in
a specific heap.

This patch intends to restrict coredomain access to only approved
categories of vendor heaps. Currently, the only identified category
as per partner feedback is the system-secure heap which is defined
as a heap that allocates from protected memory.

Test: Build, video playback works on CF with ION disabled and
without sepolicy denials
Bug: 175697666

Change-Id: I923d2931c631d05d569e97f6e49145ef71324f3b
2020-12-16 10:08:54 -08:00
Joel Galenson
1c7eb3c3bd Clean up keymint service policy.
Test: VtsAidlKeyMintTargetTest
Change-Id: Id6e83d63ffb1de7c48dbdf435fd9988e9174cfe2
2020-12-16 08:59:09 -08:00
Florian Mayer
ed3ad1d253 Allow heapprofd to read packages.list.
This is so it can check profileability.

Bug: 153139002
Change-Id: I3d3c23f8f8bc564bc1c2b3f7cdeab2d32f084917
2020-12-16 14:35:32 +00:00
shubang
f8ab3eb1bb SE policy for tuner service.
Test: make; acloud;  tuner sample input
Change-Id: I651632ec7f4ba79d94738c11c343f63510e59aa6
2020-12-16 06:05:04 +00:00
Janis Danisevskis
de98dd9726 Merge changes Icb1f60b3,I935f2383
* changes:
  Allow keystore to talk to keymint
  Add policy for the security compatibility hal service.
2020-12-16 01:24:33 +00:00
Kalesh Singh
3619437561 Merge "Revert "Memtrack HAL stable aidl sepolicy"" 2020-12-16 00:48:06 +00:00
Kalesh Singh
5db6857fe1 Revert "Memtrack HAL stable aidl sepolicy"
Revert "Add android.hardware.memtrack-unstable-ndk_platform"

Revert submission 1518702-memtrack-aidl

Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy

Change-Id: I0c55ee100c7fd8d09a5b188a39b17c95c8a43c39
2020-12-16 00:19:38 +00:00
Nicolas Geoffray
7c8073e175 Add boot animation progress system property.
Test: m
Bug: 175686819
Change-Id: I52bcd0b9f94d91e963620278042ba076215143db
2020-12-15 18:36:18 +00:00
Janis Danisevskis
bd464a9543 Allow keystore to talk to keymint
Test: None
Change-Id: Icb1f60b3c2971488a6a890c063d4e4babab2b2f2
2020-12-15 08:25:42 -08:00
Janis Danisevskis
191940036b Add policy for the security compatibility hal service.
This service manager is registered by Keystore 2.0 to lookup legacy
wrapper services.

Keystore 2.0 is now written in rust. We have AIDL binding for rust but
no HIDL binding. Keystore 2.0 has to support legacy HIDL based
interfaces. So we implement the AIDL KeyMint interface in terms of the
legacy HIDL Keymaster <=  V4.1 devices in C++. This wrapper is linked
into the Keystore 2.0 process but it cannot be called directly but must
be treated like a remote binder instead. However, we cannot register
these wrappers directly, because a) we are not a vendor component, and
b) it would conflict with genuine KeyMint devices on newer devices. So
Instead we register Keystore 2.0 itself as a legacy service provider.
Which it can query itself for the legacy wrappers if it does not find
a genuine KeyMint implementation to connect to.

Bug: 171351607
Test: Keystore 2.0 can register this Service and lookup legacy wrapper
      services.
Change-Id: I935f23837721ce126531236f4920dba469a47be4
2020-12-15 08:23:52 -08:00
Alan Stokes
63d875612f Merge "Split user_profile_data_file label." 2020-12-15 14:25:51 +00:00