Commit graph

33545 commits

Author SHA1 Message Date
Alan Stokes
67a8605deb Remove obsolete ioctl allow
No longer used, so remove the allow.

Bug: 199259751
Test: Presubmits
Change-Id: Iea61d29d14b13de86f7fbd6b6e416eea745b615e
2022-01-07 10:42:17 +00:00
Treehugger Robot
46680d001f Merge "Allow VS to run derive_classpath" 2022-01-07 09:11:08 +00:00
Bob Badour
ada5f690db Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy" 2022-01-07 01:49:45 +00:00
Xinyi Zhou
b6a6ff20ef Merge "Allow system app to find NearbyManager" 2022-01-06 19:28:05 +00:00
Alan Stokes
3fad86bb8a Allow VS to run derive_classpath
We run it in our domain since it requires fairly minimal access.

Bug: 210472252
Test: atest virtualizationservice_device_test
Test: composd_cmd test-compile
Change-Id: Ia770cd38bda67f79f56549331d3a36d7979a5d5b
2022-01-06 15:58:59 +00:00
Alan Stokes
3b0f637ad0 Merge "Allow compos to run derive_classpath" 2022-01-06 15:57:33 +00:00
Josh Yang
0d721a105f Merge "Label /data/bootanim with bootanim_data_file." 2022-01-06 03:17:58 +00:00
Treehugger Robot
f650c54ee1 Merge "Allow untrusted apps to access incidentcompanion" 2022-01-05 21:10:55 +00:00
Xinyi Zhou
e9857ab5cf Allow system app to find NearbyManager
Bug: 189954300
Test: -build, flash, boot
Change-Id: Ia21b10213311b0639f320b559e78963d562f30a3
2022-01-05 11:57:44 -08:00
Bob Badour
048e48cbed [LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy
Added SPDX-license-identifier-Apache-2.0 to:
  compat/Android.bp
  contexts/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Ie1f38c4f255b6c0b3d2351638cfa3a43e6cf130c
2022-01-05 11:14:44 -08:00
Alan Stokes
d313282433 Allow compos to run derive_classpath
We run it in the compos domain, since it doesn't require very much
additional access.

Bug: 189164487
Test: composd_cmd test-compile
Change-Id: I9ef26dd60225505086e45185289e3e03d0a8de8e
2022-01-05 18:06:27 +00:00
Treehugger Robot
ee113cf132 Merge "Rename neverallow_test.go to sepolicy_neverallow" 2022-01-05 03:46:50 +00:00
Treehugger Robot
3a7e19c3d4 Merge "Allow composd to delete ART staging files" 2022-01-04 11:13:55 +00:00
Andrew Walbran
d020fc05f3 Merge "Add comment explaining why crosvm shouldn't be allowed to open files." 2022-01-04 10:40:23 +00:00
Alan Stokes
ce6e2987de Allow composd to delete ART staging files
If the directory is non-empty when we start we need to delete
everything in it, but didn't have enough access:

avc: denied { getattr } for
path="/data/misc/apexdata/com.android.art/staging/boot-framework.art"
dev="dm-37" ino=57755 scontext=u:r:composd:s0
tcontext=u:object_r:apex_art_staging_data_file:s0 tclass=file
permissive=0

Bug: 205750213
Test: create files in staging/, composd_cmd test-compile
Change-Id: I3a66db7f5fbff82abcf547cb1c2b24e9c53ab158
2022-01-04 09:14:05 +00:00
Jiyong Park
0878ac4c47 Merge "Allow virtualizationservice to check for PKVM extension" 2022-01-03 09:30:05 +00:00
Jiyong Park
2dd48d0400 Allow virtualizationservice to check for PKVM extension
Bug: 210803811
Test: watch TH for all our tests
Change-Id: Iac4528fa2a0dbebeca4504469624f50832689f43
2022-01-03 14:59:58 +09:00
Maciej Żenczykowski
0f1b55ee24 Merge "[NC#3] clatd: remove raw and packet socket creation privs" 2021-12-30 19:50:00 +00:00
Inseob Kim
24401df041 Rename neverallow_test.go to sepolicy_neverallow
Because Go command line tooling assumes *_test.go files are tests and
not package sources.

Test: build
Change-Id: Ie332b89140b93c4ea448009cafa2556ef888497c
2021-12-29 04:58:17 +00:00
Inseob Kim
893eef25ab Remove redundant lines
Test: build
Change-Id: I809874900835503a41117d3f8971d72718d4a075
2021-12-29 13:53:38 +09:00
Inseob Kim
5bbcd68dcc Build recovery policy with Android.bp
Bug: 33691272
Test: enter recovery mode
Change-Id: Ifc38ed99e6615431d81ade76ec10ea4d34fbbf90
2021-12-28 17:51:51 +09:00
Treehugger Robot
ca043d348f Merge "Migrate neverallow tests to Android.bp" 2021-12-28 03:16:58 +00:00
Inseob Kim
9d7e9a3491 Merge "Allow app to get dck_prop" 2021-12-28 01:55:30 +00:00
Inseob Kim
0de7fcc33a Migrate neverallow tests to Android.bp
A new module type se_neverallow_test is added, to migrate
sepolicy_neverallow modules. se_neverallow_test is affected by
SELINUX_IGNORE_NEVERALLOWS.

Bug: 33691272
Test: m selinux_policy
Test: intentionally create neverallow violations and m selinux_policy
Change-Id: I1582353f99f064ff78f3c547a0c13f2b772d54df
2021-12-28 10:23:22 +09:00
Treehugger Robot
96c5222c94 Merge "Make surface_flinger_native_boot_prop a system_restricted_prop for ADPF" 2021-12-28 00:54:22 +00:00
Matt Buckley
964c68b02d Make surface_flinger_native_boot_prop a system_restricted_prop for ADPF
Test: manual
Bug: b/195990840
Change-Id: Icb758c48a1faa8901a1d2c2c442451c42fc3b5b1
2021-12-27 18:24:12 +00:00
Andrew Walbran
8191dc07cc Add comment explaining why crosvm shouldn't be allowed to open files.
Bug: 192453819
Test: No code change
Change-Id: Iebaa1db2e8eed81122e64999ef58b728e1bf95cc
2021-12-24 13:13:53 +00:00
Treehugger Robot
2e5ec904a3 Merge "Split compat and contexts part in Android.bp" 2021-12-24 07:45:37 +00:00
Inseob Kim
514d49a3b7 Merge "Fix contexts modules to use android:"path"" 2021-12-24 07:33:47 +00:00
Thierry Strudel
195149fcf8 Allow app to get dck_prop
Bug: 208742539
Test: gts-tradefed run gts -m GtsDckTestCases --log-level-display DEBUG
Merged-In: Ie3f7c54805b9947fd43fe5118fd4808b4744664d
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Change-Id: Ie3f7c54805b9947fd43fe5118fd4808b4744664d
2021-12-24 06:50:53 +00:00
Inseob Kim
81cd51ae15 Revive sepolicy module
Although it's not needed for Treblized devices, some targets are still
requiring it due to PRODUCT_SEPOLICY_SPLIT := false. To mitigate build
breakage, this change revives the sepolicy module.

Bug: 211936491
Test: build/soong/soong_ui.bash --make-mode dist \
    TARGET_PRODUCT=bertha_x86_64 ndk_translation_all
Change-Id: Ie64c223db8900967cfb54897f5366ad5ef13d4d9
2021-12-24 12:56:09 +09:00
Josh Yang
1d967dd697 Label /data/bootanim with bootanim_data_file.
Bug: 16529906
Test: /data/bootanim is labeled correctly. BootAnimation can access this
folder.

Change-Id: Ic6a438d7a139b4864c4795dcac613cb819a81631
2021-12-23 15:00:31 -08:00
Inseob Kim
baee4a2cb6 Split compat and contexts part in Android.bp
Because Android.bp is getting bigger and bigger.

Test: build and boot
Test: set OVERRIDE_TARGET_FLATTEN_APEX=true and build
Change-Id: I397ce084bfbc98449d177dd553ff73fdfbdddcaf
2021-12-23 21:36:56 +09:00
Inseob Kim
6d3d5a6daf Fix contexts modules to use android:"path"
For now, contexts modules have been using se_filegroup modules, which
makes the build system logic unnecessarily complex. This change
refactors it to se_build_files modules and normal `android:"path"`
logic.

Test: build and boot
Change-Id: I52e557e2dc8300186869a97fddfd3a74183473f7
2021-12-23 21:36:27 +09:00
Inseob Kim
3d5f9256a4 Perform permissive check on se_policy_binary
sepolicy is a module which outputs precompiled sepolicy and performs
permissive domain check on user builds. se_policy_binary module is
updated so it checks permissive domain in user builds.

sepolicy module is removed since we don't need it anymore. Instead,
precompiled_sepolicy is used.

Bug: 33691272
Test: build
Test: add "permissive adbd;" and build on aosp_arm64-user
Change-Id: I3dcf0c32d2fc1312dfceeee74894c08b38395d19
2021-12-23 21:34:29 +09:00
Devin Moore
4f85138c08 Merge "Add policy for new AIDL IR hal" 2021-12-22 21:44:17 +00:00
Treehugger Robot
801ee7aa9f Merge "zygote: Add setattr permission to cgroup" 2021-12-21 20:33:22 +00:00
Inseob Kim
d144fa0333 Fix precompiled_sepolicy neverallow flag
Because we should ignore neverallow when SELINUX_IGNORE_NEVERALLOWS is
true.

Test: add a fake rule and build with/without SELINUX_IGNORE_NEVERALLOWS
Change-Id: I7811f5cef2243dae5b5de1154a36ab167871dc4f
2021-12-21 20:38:44 +09:00
Inseob Kim
ee71cf7283 Merge "Build vendor/odm sepolicies with Android.bp" 2021-12-21 07:09:58 +00:00
Greg Kaiser
2b95a08c99 zygote: Add setattr permission to cgroup
Credit to Himanshu Agrawal <quic_hagraw@quicinc.com> for this fix.

Like we do with cgroup_v2, we set attribute permission to cgroup
as well.

This is the same fix as
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1927857/
but it applies it to the prebuilts for api 32.0.

Test: On a Go device, which uses cgroup instead of cgroup_v2
Bug: 211037424, 211514318
Change-Id: Ib57c94d72d50317619aa513e9f784582e0c45862
2021-12-20 15:21:26 -08:00
Inseob Kim
3ac62fe9f6 Build vendor/odm sepolicies with Android.bp
The following files are built with Android.bp:
- vendor_sepolicy.cil
- odm_sepolicy.cil
- prebuilt_sepolicy

Also, prebuilt_policy.mk is removed as it's now redundant.

Bug: 33691272
Test: build and compare artifacts
Test: build with rvc-dev sepolicy
Change-Id: I7bf79c9c85c63cd942b36f7cf5ddda1860626c0b
2021-12-20 21:16:39 +09:00
Treehugger Robot
76867eabd1 Merge "Remove inaccurate comment" 2021-12-20 10:59:29 +00:00
Treehugger Robot
1d06dc2811 Merge "Use se_build_files for technical_debt.cil" 2021-12-20 01:02:21 +00:00
Hui Wu
c66fb7aefc Merge "Changes in SELinux Policy for cloudsearch API" 2021-12-17 03:04:08 +00:00
Treehugger Robot
d831f2a2f5 Merge "zygote: Add setattr permission to cgroup" 2021-12-17 00:10:25 +00:00
Greg Kaiser
f62ef0d798 zygote: Add setattr permission to cgroup
Credit to Himanshu Agrawal <quic_hagraw@quicinc.com> for this fix.

Like we do with cgroup_v2, we set attribute permission to cgroup
as well.

Test: On a Go device, which uses cgroup instead of cgroup_v2
Bug: 209933729
Change-Id: I5d58c9f549d205f1a8bdce6c5fba1cc833f2b492
2021-12-16 14:14:29 -08:00
Victor Hsieh
048866ca7d Remove inaccurate comment
... from 14f188718a

Bug: None
Test: None
Change-Id: I133bc96f4cf7ae4092fef8ee4eac9533524a71b1
2021-12-16 13:56:48 -08:00
Victor Hsieh
5601d70743 Merge "Allow composd to delete odrefresh target files" 2021-12-16 21:45:43 +00:00
Devin Moore
978b9e5d1c Add policy for new AIDL IR hal
IR interface is converted to AIDL and this contains the necessary
permissions for the default service to serve the interface.

Test: atest VtsHalIrTargetTest hal_implementation_test
Test: check for permission issues after tests
Bug: 205000342
Change-Id: I8d9d81d957bf6ef3c6d815ce089549f8f5337555
2021-12-16 20:24:27 +00:00
Hui Wu
f3e29c7066 Changes in SELinux Policy for cloudsearch API
Bug: 210528288
Test: Presubmit Tests

Change-Id: I344d28a95bf7d466620fced9cc85b50bbfcd1947
2021-12-16 19:31:53 +00:00