Commit graph

38866 commits

Author SHA1 Message Date
Alessandra Loro
6ecd2077bc Merge "Drop back-compatibility for hiding ro.debuggable and ro.secure" 2022-09-08 09:51:22 +00:00
Sandro Montanari
f4943f510e Merge "Rename apex_sepolicy-decompiled.cil target" 2022-09-08 08:36:42 +00:00
Sophie Zheng
3c91a33774 Merge "Update prebuilts to fix sepolicy_freeze_test" into android12L-tests-dev am: a31ea3eb0c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2208095

Change-Id: I02d49c1617ec086df8817dbe3c144e9f1d6c1269
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-08 00:31:17 +00:00
Sophie Zheng
a31ea3eb0c Merge "Update prebuilts to fix sepolicy_freeze_test" into android12L-tests-dev 2022-09-08 00:14:55 +00:00
Sandro
3f5c18c213 Rename apex_sepolicy-decompiled.cil target
For symmetry with the apex_sepolicy-33.cil target

Bug: 218672709
Test: atest SeamendcHostTest
Change-Id: Iaec6eb4d5186ed0c7e872ef210ff572655e263b6
2022-09-07 15:04:59 +00:00
Sandro Montanari
3b94a3f3bc Revert^2 "Move allow rules of sdk_sandbox to apex policy"
Next attempt at rolling forward aosp/2200430. It appears the
first-stage-init did not create the /dev/selinux folder on GSI
instances, resulting in breakages when selinux.cpp tries to copy files
to that folder.

To verify these changes for b/244793900, follow
gpaste/4922166775644160

Bug: 243923977
Test: atest SeamendcHostTest
Change-Id: I2bc630cfaad697d44053adcfd639a06e3510cc72
2022-09-07 08:22:59 +00:00
sophiez
db3507dffc Update prebuilts to fix sepolicy_freeze_test
Bug: 243820875
Test: refactoring CL. Existing unit tests still pass.

Change-Id: I516aed92ad1c7cb4de796844402b3456dc625f94
2022-09-06 18:08:31 +00:00
Treehugger Robot
090f957d65 Merge "Fix io_uring permission denial for snapuserd" 2022-09-06 17:15:45 +00:00
Kelvin Zhang
aa3ac9fafd Fix io_uring permission denial for snapuserd
Starting with
91a9ab7c94
, calling io_uring_setup will need selinux permission to create anon
inodes.

Test: th
Bug: 244785938

Change-Id: I351983fefabe0f6fdaf9272506ea9dd24bc083a9
2022-09-06 17:11:54 +00:00
Kelvin Zhang
d87c1eb663 Merge "Fix selinux denials for fastbootd" 2022-09-06 05:50:57 +00:00
Kelvin Zhang
853085bd65 Fix selinux denials for fastbootd
Test: flash on O6, flash an image using git_master system + mainline
kernel
Bug: 244785938

Change-Id: I1b0e1ea0f1937abd2ad96a606b565812ee8096e1
2022-09-05 17:41:07 +00:00
Samiul Islam
b8650e82db Merge "Revert "Move allow rules of sdk_sandbox to apex policy"" 2022-09-05 11:45:44 +00:00
Sandro Montanari
8cce5b2ffb Revert "Move allow rules of sdk_sandbox to apex policy"
Revert "Add seamendc tests for sdk_sandbox in apex sepolicy"

Revert submission 2201484-sdk_sandbox

Note: this is not a clean revert, I kept the changes in aosp/2199179
and the changes to system/sepolicy/Android.mk. Those changes are already
part of internal, I do not want to put those files out of sync again.

Test: atest SeamendcHostTest
Reason for revert: b/244793900
Reverted Changes:
Ib14b14cbc:Add seamendc tests for sdk_sandbox in apex sepolic...
I27ee933da:Move allow rules of sdk_sandbox to apex policy

Change-Id: If225cdd090248e050d1f0b42f547a4b073bbafc6
2022-09-05 09:39:15 +00:00
Treehugger Robot
1896c039dd Merge "crosvm: dontaudit netlink perms for acpi" 2022-09-02 22:00:45 +00:00
Treehugger Robot
6eecd0a00c Merge "Allow installd delete staging folders." 2022-09-02 22:00:02 +00:00
Steven Moreland
fd59a2d46e crosvm: dontaudit netlink perms for acpi
Currently experiencing these neverallows, but they're intentional.

Fixes: 228077254
Test: N/A
Change-Id: I79f8caaf1695e91d695b8cecbc5f01df09e4e2d2
2022-09-02 20:41:56 +00:00
Alex Buynytskyy
37a0dcbbbc Allow installd delete staging folders.
Apparently readdir uses getattr and skips a folder if denied.

Bug: 244638667
Test: adb root; adb shell mkdir -p
/data/app-staging/session_917335144/lib; adb reboot; adb logcat | grep
session_917335144, check if the folder was removed

Change-Id: I39de49c77d3bf3428d75f0cf4d4c603ea7e03ed5
2022-09-02 13:16:24 -07:00
Treehugger Robot
455ae8adca Merge "Allow init to launch BootControlHAL in recovery" 2022-09-02 19:25:28 +00:00
Treehugger Robot
33a74d6881 Merge "Allow system_server to obtain verity root hash for install files." 2022-09-02 18:08:04 +00:00
Kelvin Zhang
19a5785522 Allow init to launch BootControlHAL in recovery
Test: install OTA with data wipe, reboot
Bug: 227536004
Change-Id: I3b76b054e67dcaee83ad330f9fcbcbd98bb6f1f7
2022-09-02 17:50:10 +00:00
Treehugger Robot
d7dfa043ab Merge "Rename migrate_legacy_obb_data.sh" 2022-09-02 17:38:43 +00:00
Alex Buynytskyy
aad4ae8a74 Allow system_server to obtain verity root hash for install files.
Bug: 160605420
Test: atest ChecksumsTest, check for selinux denials
Change-Id: I33b60d86317c37ef58a1be691d6a90dfef637db1
2022-09-02 09:30:21 -07:00
Treehugger Robot
3047b2ca12 Merge "Set apex. property as "system_restricted"" 2022-09-02 12:46:03 +00:00
Sandro Montanari
536babd22b Merge "Move allow rules of sdk_sandbox to apex policy" 2022-09-02 09:29:06 +00:00
Jooyung Han
cae2368d2d Set apex. property as "system_restricted"
Since the property is supposed to be used by vendor-side .rc file as
read-only (especially by vendor apex), it should be "system_restricted".

Also allow vendor_init to read the property.

Bug: 232172382
Test: boot cuttlefish (with vendor apex using the property)
Change-Id: I502388e550e0a3c961a51af2e2cf11335a45b992
2022-09-02 18:11:33 +09:00
Jooyung Han
ba80cd59a7 Merge changes from topics "apex-ready-prop", "apex-update-prop"
* changes:
  Modifed sepolicy for new apex ready prop
  Remove init.apex.<apex-name>.load/unload property
2022-09-02 06:46:54 +00:00
Cole Faust
a60a34cd79 Rename migrate_legacy_obb_data.sh
See other cl in this topic for more information.

Bug: 198619163
Test: adb root; adb shell /system/bin/migrate_legacy_obb_data; adb logcat | grep obb shows "migrate_legacy_obb_data: No legacy obb data to migrate."
Change-Id: Ic2fb4183f80b36463f279b818e90c203e9a51422
2022-09-01 18:11:56 -07:00
Deyao Ren
7848d3a437 Modifed sepolicy for new apex ready prop
Bug: 232172382
Test: atest ApexTestCases
Change-Id: I2947b2c9b1d983bdbc410e67509508f73efff1f4
2022-09-01 22:20:10 +00:00
Deyao Ren
3fab00fab2 Remove init.apex.<apex-name>.load/unload property
Bug: 240533726
Test: atest CtsInitTestCases ApexTestCases
Change-Id: Ibe4d1c199157397a747bb87918848917a24f0535
2022-09-01 16:24:55 +00:00
Sandro
084b41748d Move allow rules of sdk_sandbox to apex policy
Third attempt to roll-forward the apex_sepolicy changes from
aosp/2179294 and aosp/2170746.

I was finally able to figure out the likely root cause of the test
breakages in internal b/243971667. The related CL aosp/2199179 is making
the apex_sepolicy files mandatory for all AOSP builds.

Without the apex_sepolicy files, mixed GSI builds in internal using AOSP
as base would not implement the sdk_sandbox rules, causing breakages for
the SdkSandbox components.

Bug: 243923977
Test: atest SeamendcHostTest
Change-Id: I27ee933da6648cca8ff1f37bde388f72b4fe6ad6
2022-09-01 09:11:38 +00:00
Treehugger Robot
7bd59df9b7 Merge "Make sure only VS can access its data files" 2022-09-01 08:40:00 +00:00
Florian Mayer
2f2efbee52 Update prebuilts to fix sepolicy_freeze_test am: 5de1b2096d am: c84be7da03
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2199642

Change-Id: I7d4086acc6e13df2d0ab7f2ac423634ea7be2b84
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 23:11:00 +00:00
Florian Mayer
87337a27b5 Update prebuilts to fix sepolicy_freeze_test am: f99eeb6bd9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2201137

Change-Id: I42b988dfdb0cf41f7851d1b7793a72073fe6006c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 23:10:47 +00:00
Florian Mayer
c84be7da03 Update prebuilts to fix sepolicy_freeze_test am: 5de1b2096d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2199642

Change-Id: If6ed12e01659cb56b5b56d2f92f6c68b2d626880
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 23:10:38 +00:00
Alan Stokes
991087cb24 Make sure only VS can access its data files
Bug: 237054515
Test: Builds
Change-Id: Id207bfc3639254e63b00e2a9ac9780ab83a013ff
2022-08-31 17:39:59 +01:00
Alice Wang
c60552839b Merge "Allow getopt to eliminate warnings in MicrodroidBenchmarks tests" 2022-08-31 15:18:44 +00:00
Alice Wang
40718f45d6 Allow getopt to eliminate warnings in MicrodroidBenchmarks tests
This CL allows getopt in sepolicy to eliminate getopt denied
warnings in MicrodroidBenchmarks tests, e.g.

$ atest MicrodroidBenchmarks
W FinalizerDaemon: type=1400 audit(0.0:625): avc: denied
{ getopt } for scontext=u:r:untrusted_app:s0:c163,c256,c512,
c768 tcontext=u:r:virtualizationservice:s0 tclass=vsock_socket
permissive=0 app=com.android.microdroid.benchmark

Bug: 236123069
Test: atest MicrodroidBenchmarks
Change-Id: I2ed94ae6beab60176d9fac85a0b818089d563427
2022-08-31 13:21:46 +00:00
Florian Mayer
f99eeb6bd9 Update prebuilts to fix sepolicy_freeze_test
Bug: 243820875
Change-Id: I99c09ff00c1b47e9bc4e8175c9b3e34c7851d25d
2022-08-30 13:18:45 -07:00
Florian Mayer
5de1b2096d Update prebuilts to fix sepolicy_freeze_test
Bug: 243820875
Change-Id: I34e06a54a649e37b6ec051d20bf4cf904f69fd5e
2022-08-30 13:18:01 -07:00
Suren Baghdasaryan
f08bc50f9d sepolicy: Move proc_watermark_scale_factor mapping from ignore list
New label proc_watermark_scale_factor was mistakenly added into ignore
list. Fix this by moving the mapping into correct .cil files.

Fixes: 6988677f22 ("Allow init to execute extra_free_kbytes.sh script")
Bug: 241761479
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: If12cad2ed20504d374d77a68eaba1600d2768338
2022-08-29 18:17:37 +00:00
Sandro Montanari
618cc55a15 Merge "Revert "Move allow rules of sdk_sandbox to apex policy"" 2022-08-29 12:34:28 +00:00
Sandro Montanari
38f009ba13 Revert "Move allow rules of sdk_sandbox to apex policy"
Revert "Add seamendc tests for sdk_sandbox in apex sepolicy"

Revert submission 2182195-seamendc

Reason for revert: 243971667
Reverted Changes:
I59fda23d9:Add seamendc tests for sdk_sandbox in apex sepolic...
I4c4800418:Move allow rules of sdk_sandbox to apex policy

Change-Id: Icc3fff21aae23f24f37dbae6276699c56842f9a1
2022-08-29 09:03:18 +00:00
Yixiao Luo
aa98f8a58c Merge "TV Input HAL 2.0 sepolicy" 2022-08-26 23:19:24 +00:00
Sandro Montanari
d87f90f205 Merge "Move allow rules of sdk_sandbox to apex policy" 2022-08-26 09:07:27 +00:00
Treehugger Robot
c0499fd13d Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy" 2022-08-26 07:49:29 +00:00
Thiébaud Weksteen
c0fef5c1ae Merge "Remove wpantund and lowpan_service" 2022-08-25 23:57:20 +00:00
Yixiao Luo
e83ae791aa TV Input HAL 2.0 sepolicy
Bug: 227673740
Test: atest VtsHalTvInputTargetTest
Change-Id: I53f6537a8f911661e368824a5a5dc5db57413980
2022-08-25 14:31:49 -07:00
Bob Badour
087b849a4f [LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy
Added SPDX-license-identifier-Apache-2.0 to:
  mac_permissions/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Id66c4697d869ed5b5e36744deca5277064b07290
2022-08-25 09:28:32 -07:00
Sandro
3bb7bb2e70 Move allow rules of sdk_sandbox to apex policy
This is a roll-forward of a small chunk of aosp/2170746.
The previous CL was causing test breakages (b/240731742, b/240462388,
b/240463116).

This CL is smaller than the previous one, it only moves allow rules from
the platform policy to the apex policy (I believe the error was caused
by typeattribute rules). I also ran the closest approximation I could
find to the breaking environment, and it appears the tests are passing
https://android-build.googleplex.com/builds/abtd/run/L44100000955891118
https://android-build.googleplex.com/builds/abtd/run/L68000000955937148

Bug: 236691128
Test: atest SeamendcHostTest
Change-Id: I4c480041838c8c14011f099ba8295097fe9212db
2022-08-25 15:48:25 +00:00
Sandro Montanari
0e0fb33dd7 Merge "Add SeamendcHostTest to system/sepolicy presubmit checks" 2022-08-25 14:47:28 +00:00