Commit graph

1176 commits

Author SHA1 Message Date
52542bfa6a fixup! sepolicy: Allow fsck_untrusted to be sys_admin 2024-09-08 22:47:09 +02:00
Michael Bestas
caa5a8a29e Exempt data_between_core_and_vendor_violators from vold neverallow
Commit 9a5992336e changed the label of
/data/vendor_de. Unfortunately some devices with very old tz applets
store fingerprint configuration directly in /data/vendor_de.

Since we do not have source code access and we cannot modify/hex patch
the tz applet because it is signed, use the existing
data_between_core_and_vendor_violators attribute to make fingerprint
work again on these devices.

Test: m
Change-Id: Ibb78f837ff808fc5e15c4b790105c07f4501a08b
2024-09-08 22:29:04 +02:00
Nolen Johnson
43c750d477 Add property to workaround M_RELEASE rsp len issues
* Needed after Ibbf81e922fe75bf0ef5b8cd7197c812348063db5.

Change-Id: I03bbf44429b095844e0004fcef238213610c7cce
2024-09-08 22:28:57 +02:00
Nolen Johnson
00206e09fd private: Exempt system_app from adbd_config_prop neverallow
* ATV can't use the newer mobile method for ADB over Wi-Fi
  as ethernet is a massive usecase for us, and that implementation
  refuses to play nicely with any interface but Wi-Fi.

* Therefore, to avoid having to carry the crappy intermediate prop
  solutions in device/lineage/atv, relax this, as it's still a
  system namespace and still a limited context that is allowed to
  set the property.

Change-Id: Id87ebae6d0552bb8b9faac3114dca42128eaf5b0
2024-09-08 22:28:43 +02:00
Michael Bestas
6f0a3fe12b Label system properties to config audio codec priority
bluetooth.a2dp.source.sbc_priority.config
bluetooth.a2dp.source.aac_priority.config
bluetooth.a2dp.source.aptx_priority.config
bluetooth.a2dp.source.aptx_hd_priority.config
bluetooth.a2dp.source.ldac_priority.config
bluetooth.a2dp.source.lc3_priority.config

Bug: 270032693
Test: manually test in local build
Change-Id: I328e2d6ef0ba277f4eb2c132db8ae22539c1a91d
2024-09-08 22:25:05 +02:00
me-cafebabe
3135a20175 Add property to disable APCF extended features
* Required for change I4b1764b7551150e78dd8e2dfc99a6472c1293c2b

Change-Id: I895c7c81b55eff7137b6c558e3a66d57f2406a30
2024-09-08 22:24:51 +02:00
Thiébaud Weksteen
6e61786a46 Ignore access to /proc/pagetypeinfo for Settings
avc:  denied  { read } for  comm="pool-3-thread-6" name="pagetypeinfo"
dev="proc" ino=4026531857 scontext=u:r:system_app:s0
tcontext=u:object_r:proc_pagetypeinfo:s0 tclass=file permissive=0

Bug: 312375728
Test: m selinux_policy
Change-Id: Ic2946e181d3a0af65a6ebe093ef7f257c75a1c22
2024-09-08 22:24:40 +02:00
LuK1337
06fc187771 Label wifi.interface.
This lets us override AIDL WiFi HAL interfaces.

Bug: 313385486
Change-Id: I3bb0c274f5fb6f709d09b67deff2df7229e04369
2024-09-08 22:24:27 +02:00
Alexei Nicoara
91baf8e19b Making sys.boot.reason.last restricted
sys.boot.reason.last needs to be readable by SysUI to correctly display the reason why authentication is required to unlock the phone.

Bug: 299327097
Test: presubmit
Change-Id: I9f83ade92858056609bc665ecb6ce9b93eb051e4
2024-09-08 22:24:13 +02:00
HeroBuxx
a2a71a5525 fixup! sepolicy: Allow recovery to alter /
Signed-off-by: HeroBuxx <me@herobuxx.me>
2024-09-08 22:22:19 +02:00
HeroBuxx
cbf3df362f fixup! sepolicy: whitelist recovery from node creation neverallow
Signed-off-by: HeroBuxx <me@herobuxx.me>
2024-09-08 22:22:19 +02:00
HeroBuxx
2d19253baa fixup! sepolicy: Add sdcard_posix_contextmount_type attribute
Signed-off-by: HeroBuxx <me@herobuxx.me>
2024-09-08 22:22:08 +02:00
someone5678
8f5689a655 sepolicy: Allow fsck_untrusted to be sys_admin
* Needed for custom filesystem support

Change-Id: I98a6116cf2a3c06eb2de599bbaf1a77373fa0a23
Signed-off-by: zlewchan <zlewchan@icloud.com>
2024-09-08 13:04:54 +02:00
Gabriele M
91c3bb434f sepolicy: Allow recovery to alter /
This is needed for /etc/fstab, /adb_keys and volmgr

Change-Id: I53332a57ce7879d7ba63c4ea3e27add01f5a3a90
2024-09-07 23:28:22 +02:00
Alessandro Astone
7ab2f8088f sepolicy: whitelist recovery from node creation neverallow
Change-Id: If91584e58f3709c0b18eaf9ee12a0c057716f9f3
2024-09-07 23:28:09 +02:00
LuK1337
c90dc61dc6 sepolicy: Add sdcard_posix_contextmount_type attribute
* Since we can't use contextmount_type for sdcard_posix
  due to contextmount_type being read only by design we
  need to declare our own attribute to bypass relabelto
  neverallow. That way we can mount external ext4/f2fs
  SD with sdcard_posix context and write permissions.

Test: m -j selinux_policy
Change-Id: I0dfe49cc0b34dfcce2840198843bde1272cbc61c
2024-09-07 23:27:52 +02:00
Inseob Kim
ff2018fa84 Fix bpfmt
Bug: N/A
Test: N/A
Flag: NONE trivial format change
Change-Id: I8f6293dcc47a4ead347c4861ba929d4b3042c311
2024-04-17 09:55:49 +09:00
Inseob Kim
4b9929e2fc Finalize prebuilt CTS artifacts
These three files, general_sepolicy.conf / mapping.cil /
plat_sepolicy.cil will be used to test vendor sepolicy's neverallow
rules.

Bug: 330671085
Test: build
Change-Id: I763c9a1e647d614b84c0f7fe3d69affbe64f6153
Merged-In: I763c9a1e647d614b84c0f7fe3d69affbe64f6153
(cherry picked from commit 6f18a17ff8)
2024-04-16 16:18:01 +09:00
Inseob Kim
e972e936da Revert^2 "Add pm.archiving.enabled system property"
This reverts commit 840041d5d2.

Reason for revert: 202404 prebuilts must not be changed since freeze.

Change-Id: I320fde8de611ad4ae1546f4ce754871a0646dcc4
2024-04-11 00:56:13 +00:00
Song Chun Fan
840041d5d2 Revert "Add pm.archiving.enabled system property"
This reverts commit 32ab868eac.

Reason for revert: no longer needed

Change-Id: I2ce46773503d39f843038fca3bb8527eb5bb53eb
BUG: 331165939
2024-04-10 17:39:43 +00:00
Inseob Kim
c35639d615 Sync 202404 prebuilts
Unfortunately 202404 sepolicy changed a little after vendor API freeze.

Bug: 279809333
Test: build
Change-Id: Ib690abbe0cf04cd3bd55b7a82124a284782ed335
2024-03-13 13:18:05 +09:00
Devin Moore
1f93d9bca5 Vendor API level 202404 is now frozen
Bug: 279809333
Test: build
Change-Id: If6ef4c3b02d06212923e757fb68aa74e38c68db3
(cherry picked from commit 39dd515546)
2024-03-11 14:30:35 +09:00
Jooyung Han
c6d23b47d8 Merge "Relax neverallows for vendor to use /system/bin/sh" into android14-tests-dev am: a1260cfa21
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2988072

Change-Id: If21747c23ef463345f1f2e19e0c389e084b2fd90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 06:58:55 +00:00
Jooyung Han
a1260cfa21 Merge "Relax neverallows for vendor to use /system/bin/sh" into android14-tests-dev 2024-03-06 06:18:53 +00:00
Treehugger Robot
9dba1b8892 Merge "Grant lockdown integrity to all processes" into android14-tests-dev 2024-03-06 06:18:07 +00:00
Jooyung Han
6ece857f4f Relax neverallows for vendor to use /system/bin/sh
Since 202404, vendor components will use /system/bin/sh for system(3),
popen(3), etc.

Bug: 324142245
Test: system("readlink /proc/$$/exe") in vendor HALs
Change-Id: I521499678e87a7d0216a276e014888867f495803
(cherry picked from commit f0ba322926)
2024-03-05 19:09:05 +09:00
Thiébaud Weksteen
c1b65e5d53 Grant lockdown integrity to all processes
The default policy for the "lockdown" access vector on Android was
introduced in commit bcfca1a6. While the "confidentiality" permission
was granted to all processes, the "integrity" was marked as
neverallowed.

Upstream, the support for that access vector was removed from kernel
5.16 onwards.

It was found that the "integrity" permission either does not apply to
Android or duplicates other access control (e.g., capabilities
sys_admin).

Instead of simply removing the neverallow rule, the access is granted to
all processes. This will prevent the proliferation of references to this
access vector in vendors' policies and ultimately facilitate its
removal.

Test: presubmit
Bug: 285443587
Bug: 269377822
Bug: 319390252
Change-Id: If2ad34fbbf2c0d29ac54ab5d1be430623f86f1f7
(cherry picked from commit 99a4cbcee7)
Merged-In: If2ad34fbbf2c0d29ac54ab5d1be430623f86f1f7
2024-02-28 18:10:29 -08:00
Carmen Jackson
77b2e52f74 Add rules for Perfetto to be used from system_server
This includes rules for starting Perfetto as well as rules for
communicating over stdio between Perfetto and system_server.

This is a cherrypick of aosp/2958867 with prebuilts updated.

Bug: 325709490
Test: Presubmit
Change-Id: I7e4c044a6a2afb48c33d65cc421e797d77aacc12
Merged-In: I7e4c044a6a2afb48c33d65cc421e797d77aacc12
2024-02-27 04:22:31 +00:00
Seungjae Yoo
c3052c9ab0 Introduce vendor_microdroid_file for microdroid vendor image
In AVF, virtualizationmanager checks the selinux label of given disk
image for proving whether the given image is edited maliciously.
Existing one(vendor_configs_file, /vendor/etc/*) was too wide to
use for this purpose.

Bug: 325709490
Bug: 285854379
Test: m
Merged-In: I6c966c92b238a2262d2eb7f41041ed4c359e9e0a
Change-Id: I6c966c92b238a2262d2eb7f41041ed4c359e9e0a
(cherry picked from commit d2a0892121)
2024-02-23 11:36:29 +09:00
Changyeon Jo
d16bdc461f [RESTRICT AUTOMERGE] Allow dumpstate to make binder IPC to automotive display service
Bug: 280837170
Bug: 313360015
Test: atest android.security.cts.SELinuxHostTest#testNoBugreportDenials
Change-Id: I8239ba23bb60b95e7dd07a4c8a99167f1e08192b
(cherry picked from commit 152a2f1755)
2024-02-13 05:16:32 +00:00
Peter Lee
d3db89de5b Modify SELinux rules to allow vold to use the keymaster HAL directly. am: b1c857c824 am: 769bbce026
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2929772

Change-Id: I6d9e77b0889fad22a6006972a1ba90ecd87fba8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01 23:08:23 +00:00
Peter Lee
769bbce026 Modify SELinux rules to allow vold to use the keymaster HAL directly. am: b1c857c824
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2929772

Change-Id: I89c192fc02b8bb215cc52b8a4091930896595b21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01 22:24:27 +00:00
Peter Lee
b1c857c824 Modify SELinux rules to allow vold to use the keymaster HAL directly.
Description:
Since the Android N project uses Keymaster 1.5 and added full disk encryption support in vold when upgrading to Android T, the SELinux rules need to allow vold to use the keymaster HAL directly.

Bug: 319506037

Change-Id: Ib21c59156a6de0c2b148e33de2fe8efb3606e697
2024-02-01 06:32:23 +00:00
Inseob Kim
f447f4a624 Remove hal_face_service virtual entry
Bug: 317187030
Test: TH
Change-Id: I309eb8091532a88ecd0af354399437fec3bcfa25
Merged-In: I1f61b687be4abe53c62c21769fb57dc9cf9daf45
2024-01-30 10:08:04 +09:00
Inseob Kim
4a14ebeb3e Remove vfio_handler entry
Bug: 313817413
Test: TH
Change-Id: I2f68b85f3b91e687eb1f885023d374869d0a7ce5
Merged-In: I5559dfca1a29852b65481c95f37edc9977ee9d7d
2023-12-14 18:06:19 +09:00
Brian Lindahl
46668eaca7 Merge "Allow for server-side configuration of libstagefright" into android14-tests-dev 2023-12-13 06:00:07 +00:00
Treehugger Robot
5732cf8282 Merge "Introduce vendor_apex_metadata_file" into android14-tests-dev 2023-12-11 23:48:39 +00:00
Brian Lindahl
660e460e8c Allow for server-side configuration of libstagefright
Relaxation of SELinux policies to allow users of libstagefright and
MediaCodec to be able to query server-side configurable flags.

Bug: 301372559
Bug: 301250938
Bug: 308043377
Fixes: 308043377
Test: run cts -m CtsSecurityHostTestCases
Change-Id: I72670ee42c268dd5747c2411d25959d366dd972c
Merged-In: I95aa6772a40599636d109d6960c2898e44648c9b
(cherry picked from commit 1b32bccc1a)
2023-12-11 23:02:32 +00:00
Treehugger Robot
8deb864534 Merge "Making sys.boot.reason.last restricted" into android14-tests-dev 2023-12-06 12:53:05 +00:00
Jooyung Han
157848354e Introduce vendor_apex_metadata_file
A new label for ./apex_manifest.pb and ./ entries in vendor apexes. This
is read-allowed by a few system components which need to read "apex" in
general. For example, linkerconfig needs to read apex_manifest.pb from
all apexes including vendor apexes.

Previously, these entries were labelled as system_file even for vendor
apexes.

Bug: 285075529
Bug: 308058980
Test: m && launch_cvd
Test: atest VendorApexHostTestsCases
Change-Id: Icc234bf604e3cafe6da81d21db744abfaa524dcf
Merged-In: Icc234bf604e3cafe6da81d21db744abfaa524dcf
2023-12-05 15:42:14 +11:00
Alexei Nicoara
c2af2e2ec4 Making sys.boot.reason.last restricted
sys.boot.reason.last needs to be readable by SysUI to correctly display the reason why authentication is required to unlock the phone.

Bug: 299327097
Bug: 308058980
Test: presubmit
Change-Id: I9f83ade92858056609bc665ecb6ce9b93eb051e4
Merged-In: I9f83ade92858056609bc665ecb6ce9b93eb051e4
2023-12-05 14:56:03 +11:00
Jeff Pu
e0755e0d68 Add biometric face virtual hal service
Bug: 228638448
Bug:313817413
Test: Manually following face virtual hal provisioning procedure
Change-Id: I1f61b687be4abe53c62c21769fb57dc9cf9daf45
Merged-In: I1f61b687be4abe53c62c21769fb57dc9cf9daf45
2023-12-01 03:16:38 +00:00
Thiébaud Weksteen
efa4cf8469 Prebuilt updates am: 448968a6d1 am: 084b293596
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2848878

Change-Id: If8cc1dbc910cb2fec2d4996c1a2f8fef602472cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 06:56:58 +00:00
Thiébaud Weksteen
084b293596 Prebuilt updates am: 448968a6d1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2848878

Change-Id: I991e63e36e9e680edfd21e4a20293ae779caffcb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 06:25:40 +00:00
Yu-Ting Tseng
086e1f0eaa Revert "Revert "SELinux policy changes for uprobe.""
This reverts commit e2bd44d48d.

Reason for revert: 2nd attempt to add the policy change

Bug: 308058980
Test: m selinux_policy
Change-Id: I5b9a102879a65917d496ba2194187ddd2b4545d1
Merged-In: I5b9a102879a65917d496ba2194187ddd2b4545d1
2023-11-29 06:12:36 +00:00
Thiébaud Weksteen
448968a6d1 Prebuilt updates
Bug: 308058980
Test: m selinux_policy
Change-Id: I23b2265340002b4b9f8d15ad0a8e8324aa0f94e1
2023-11-29 06:01:56 +00:00
Thiébaud Weksteen
fa2999a627 Revert^2 "Add permission for VFIO device binding"
This reverts commit c6227550f7.

Reason for revert: Faulty merging paths have been removed

Change-Id: Icf56c2e977c5517af63e206a0090159e43dd71eb
Merged-In: Ie947adff00d138426d4703cbb8e7a8cd429c2272
2023-11-21 02:18:30 +00:00
Thiébaud Weksteen
90945326cd Revert "Prebuilt updates for aosp/2827450" am: b460885e50 am: c541c1eb80
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2830890

Change-Id: I6d5f197c9cb4a1728e0bd6bc9acf220f05ed05de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 03:34:07 +00:00
Thiébaud Weksteen
c541c1eb80 Revert "Prebuilt updates for aosp/2827450" am: b460885e50
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2830890

Change-Id: Ief55d435dff2e58e463d4498fb3cf5740af8d21d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 03:02:23 +00:00
Thiébaud Weksteen
b460885e50 Revert "Prebuilt updates for aosp/2827450"
This reverts commit 74ec7d8343.

Reason for revert: Tests are still failing

Change-Id: Ic7dcd5fb4703cfe476f74835782b99d5848ed738
2023-11-14 23:37:47 +00:00