Commit graph

7566 commits

Author SHA1 Message Date
Steven Moreland
c3802445d0 Merge "sepolicy for SE HAL" 2022-11-29 22:30:40 +00:00
Sandeep Dhavale
b59723691a Merge "Allow hal_fastboot_server to have access to metadata partition" 2022-11-28 22:26:29 +00:00
Keir Fraser
84bb5eeccb Adjust policy for hypervisor system properties
1. Allow them to be configured by vendor_init.
2. Introduce a new system property
   hypervisor.memory_reclaim.supported, which is configured by
   vendor_init and accessed only by virtualizationservice, and is not
   as widely accessible as the existing hypervisor sysprops.

Bug: 235579465
Test: atest MicrodroidTests
Change-Id: I952432568a6ab351b5cc155ff5eb0cb0dcddf433
2022-11-24 10:23:58 +00:00
Sandeep Dhavale
b1524d7116 Allow hal_fastboot_server to have access to metadata partition
With AIDL fastboot, wiping partition will be handled by new service.
Allow hal_fastboot_server to the exception to neverallow rule.

Bug: 260140380
Test: th
Test: fastboot -w
Change-Id: Ic38ad715cb097ccd9c8936bb8e2a04e3e70b3245
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
2022-11-24 04:35:15 +00:00
Ray Essick
1ff668ae62 mediaserver needs package_native access
when recording, the encoders need access to determine if on
a handheld and enable some quality standards.

Bug: 251205971
Test: atest android.media.recorder.cts.MediaRecorderTest
Change-Id: I534a6aa24c188002ab0baab9d891e07db0af81f2
2022-11-19 09:59:57 -06:00
Devin Moore
45d8baf70d Merge "Add sepolicy for new AIDL sensorservice" 2022-11-18 19:21:47 +00:00
Seth Moore
dcef71f890 Merge "Add new appdomain for RKPD mainline app" 2022-11-17 15:45:18 +00:00
Seth Moore
71fa94edae Add new appdomain for RKPD mainline app
This app talks to the remote provisioning HALs, and therefore requires
access to the tee_device domain.

Bug: 254112668
Test: Manually verify rkpd can run and find remote provisioning hals
Change-Id: I876b0890f3d4e8956406d73e956084b99488ce56
2022-11-16 12:55:31 -08:00
Steven Moreland
4c6586817a sepolicy for SE HAL
Bug: 205762050
Test: N/A
Change-Id: I76cd5ebc4d0e456a3e4f1aa22f5a932fb21f6a23
2022-11-15 22:41:09 +00:00
Sandro
bcc04e69fc Move get_prop rules from public/domain.te to private/domain.te
This way we can prevent private types (e.g., sdk_sandbox) from accessing
those properties.

Bug: 210811873
Test: m -j, boot device
Change-Id: Idbcc4928c8d0d433f819d8b114e84a5f09466ad0
2022-11-15 17:05:11 +00:00
Devin Moore
e714ba95ed Add sepolicy for new AIDL sensorservice
Test: boot cuttlefish and check for avc denials
Bug: 205764765
Change-Id: Ie9d02b43250ca3c5f642b2d87d2a5b532a9b5195
2022-11-14 17:26:24 +00:00
Treehugger Robot
bc37c334e5 Merge "Add adaptive haptics restricted system property" 2022-11-14 10:52:56 +00:00
Chris Paulo
ad2f883271 Add adaptive haptics restricted system property
Create adaptive haptics system property to store adaptive haptics enable
state.

Bug: 198239103
Test: Verified system property usage
Change-Id: I5d4f0a5c8ec4a5b0ce18bc03a6d30879dd76d58b
Signed-off-by: Chris Paulo <chrispaulo@google.com>
2022-11-14 09:20:56 +00:00
Jooyung Han
01e9b4d5d0 Merge "Allow dumpstate to read apex-info-list.xml" 2022-11-14 02:23:23 +00:00
Max Bires
37992dce8d Merge "Allow shell to call IRemotelyProvisionedComponent" 2022-11-12 00:20:34 +00:00
Jooyung Han
1802a16336 Allow dumpstate to read apex-info-list.xml
Bug: 254486775
Test: sesearch --allow -s dumpstate -t apex_info_file policy
Change-Id: I52cc2ed2fcb0cf969009e323300741169d8e6d8a
2022-11-11 11:30:20 +09:00
Tri Vo
9f4f08291b Merge "Allow KeyMint HAL to read serialno" 2022-11-10 20:41:55 +00:00
Sandeep Dhavale
d64fb55474 Merge "Fastboot AIDL Sepolicy changes" 2022-11-10 18:29:00 +00:00
Sandeep Dhavale
f0ea953e60 Fastboot AIDL Sepolicy changes
Bug: 205760652
Test: Build & flash
Change-Id: I2709c5cc2ca859481aac6fecbc99fe30a52a668b
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
2022-11-09 22:21:27 +00:00
Lakshman Annadorai
9691a41b0a Merge "Revert "Add sepolicies for CPU HAL."" 2022-11-09 20:57:15 +00:00
Max Bires
4d3dcd64d3 Allow shell to call IRemotelyProvisionedComponent
This change gives the shell process the needed permissions to call the
rkp_factory_extraction_tool without also granting the ability to access
the KeyMint HAL service.

To run the tool from a shell accessible folder, push
rkp_factory_extraction_tool to /data/local/tmp with:

adb push out/target/product/<path/to/tool>/rkp_factory_extraction_tool \
/data/local/tmp

Test: the tool can be executed in SELinux enforcing mode
Change-Id: Idebebffa9bb405d527ab37c17030db3999efe3d1
2022-11-09 12:42:28 -08:00
Lakshman Annadorai
4d277b7baa Revert "Add sepolicies for CPU HAL."
This reverts commit f4ab6c9f3c.

Reason for revert: CPU HAL is no longer required because the CPU frequency sysfs files are stable Linux Kernel interfaces and could be read directly from the framework.

Change-Id: I8e992a72e59832801fc0d8087e51efb379d0398f
2022-11-09 16:47:07 +00:00
Tri Vo
6ac74e8051 Allow KeyMint HAL to read serialno
Test: VtsAidlKeyMintTargetTest
Change-Id: Ifb1c55b73f869b531dbef600df03fb95cd343cd0
2022-11-08 10:50:57 -08:00
Changyeon Jo
0dd6bc0c5e Allow dumpstate to signal evsmanagerd
This CL allows dumpstate to signal evsmanagerd, which is another
android.hardware.automotive.evs.IEvsEnumerator implementation, to dump
its stack.

Fix: 243335867
Test: atest android.security.cts.SELinuxHostTest#testNoBugreportDenials
Change-Id: I37b4cf0ae45f8196f92088cf07a2b45c44f50ee8
2022-11-08 12:53:50 +00:00
Lakshman Annadorai
f4ab6c9f3c Add sepolicies for CPU HAL.
Change-Id: Ia091bf8f597a25351b5ee33b2c2afc982f175d51
Test: Ran `m; emulator; adb logcat -b all -d > logcat.txt;`
      and verified CPU HAL is running without any sepolicy violation.
Bug: 252883241
2022-11-04 18:13:00 +00:00
Sandro
080c579d47 Move get_prop rules from public/app.te to private/app.te
This way we can prevent private types (e.g., sdk_sandbox) from accessing
those properties.

Bug: 210811873
Test: m -j, boot device
Change-Id: I55e3a4b76cabb6f47cee0972e6bad30565f0db7a
2022-11-04 09:34:22 +00:00
Alfred Piccioni
8a909eb966 Merge "Add NTFS support in sepolicy." 2022-11-04 09:22:51 +00:00
Alfred Piccioni
3e1dc57bf4 Add NTFS support in sepolicy.
This CR, when paired with a functional NTFS implementation and the
corresponding vold updates, will allow NTFS USB drives to be mounted
on Android.

Bug: 254407246

Test: Extensive testing with NTFS USB drives.
Change-Id: I259882854ac40783f6d1cf511e8313b1d5a04eef
2022-11-03 16:02:51 +01:00
Seth Moore
970cfa5674 Limit special file permissions to the keymint server domain
There are still some paths (potentially obsolete) on non-treble devices
where hal_keymint_client domains have the hal_keymint typeattribute
applied. In these cases, those domains also pick up the file access
permissions currently granted to hal_keymint.

Clean this up by limiting the permissions to hal_keymint_server only.

Test: VtsAidlKeyMintTargetTest
Change-Id: If1a437636824df254da245e7587df825b6963ed9
2022-11-03 05:30:01 +00:00
Andrew Scull
2c818d9b32 Merge "Revert "Allow vendors to set remote_prov_prop properties"" 2022-11-01 13:11:03 +00:00
Andrew Scull
edba76d514 Revert "Allow vendors to set remote_prov_prop properties"
This reverts commit a87c7be419.

Reason for revert: I was mistaken and this isn't a property that the vendor should set, but the OEM should override from the product partition. That doesn't require sepolicy changes.

Bug: 256109167
Change-Id: Idebfb623dce960b2b595386ade1e4c4b92a6e402
2022-10-31 18:27:29 +00:00
Andrew Scull
c347dc28fa Merge "Allow vendors to set remote_prov_prop properties" 2022-10-28 11:35:49 +00:00
Andrew Scull
a87c7be419 Allow vendors to set remote_prov_prop properties
Vendors should be able to set the `remote_provisioning.tee.rkp_only` and
`remote_provisioning.strongbox.rkp_only` properties via
PRODUCT_VENDOR_PROPERTIES so grant `vendor_init` the permission to set
them.

The property wasn't able to use `system_vendor_config_prop()` as
`remote_prov_app` has tests which override the properties.

Bug: 256109167
Test: manual test setting the property from device.mk for cuttlefish
Change-Id: I174315b9c0b53929f6a11849efd20bf846f8ca29
2022-10-28 10:07:54 +00:00
Treehugger Robot
8718b20689 Merge "Grant dumpstate access to update engine prefs" 2022-10-28 07:54:29 +00:00
Thiébaud Weksteen
0596a47aae Grant dumpstate access to update engine prefs
aosp/2215361 added the collection of update_engine preferences by
dumpstate. Add the corresponding policy. The /data/misc/update_engine
directory only contains the prefs/ subdirectory (see
DaemonStateAndroid::Initialize in update_engine).

Bug: 255917707
Test: m selinux_policy
Change-Id: I8c80f319d97f22f29158dd67352c3429d3222a35
2022-10-28 14:36:31 +11:00
Treehugger Robot
e6a43ec4c9 Merge "Add selinux rules for android.hardware.usb.gadget.IUsbGadget AIDL migration" 2022-10-27 14:03:48 +00:00
Ricky Niu
fc1463c164 Add selinux rules for android.hardware.usb.gadget.IUsbGadget AIDL migration
Covers the rules needed for the default AIDL implementation.

10-26 10:22:42.408   448   448 I auditd  : type=1400 audit(0.0:95): avc: denied { read } for comm="android.hardwar" name="interrupts" dev="proc" ino=4026531995 scontext=u:r:hal_usb_gadget_default:s0 tcontext=u:object_r:proc_interrupts:s0 tclass=file permissive=0

Bug: 218791946
Test: reboot and check if AIDL service is running.

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I8bdab3a682398f3c7e825a8894f45af2a9b6c199
2022-10-27 15:42:56 +08:00
Alan Stokes
c69ad27186 Fix VS denials on fifo_file
While running the MicrodroidTests I noticed denials like these:
 avc: denied { getattr } for comm="virtualizations" path="pipe:[86794]"
 dev="pipefs" ino=86794 scontext=u:r:virtualizationservice:s0
 tcontext=u:r:untrusted_app:s0:c122,c256,c512,c768 tclass=fifo_file
 permissive=0

These are harmless, so we could dontaudit them, but it is also fine
to simply allow getattr.

Test: atest MicrodroidTests, no denials seen
Change-Id: I53a2967eb6e396979a86715b3d5a7681f48dcb63
2022-10-26 11:26:58 +01:00
Gabriel Biren
b7e21bcfe7 Merge "Add SeLinux policy for WiFi Vendor HAL AIDL service." 2022-10-25 17:03:10 +00:00
Henry Fang
0c3f615602 Merge "Allow CAS AIDL sample HAL" 2022-10-25 16:38:20 +00:00
Jiakai Zhang
1b89f6370a Merge "Update SELinux policy to allow artd to perform secondary dex compilation" 2022-10-25 13:12:16 +00:00
Jiakai Zhang
2ffeca72a6 Update SELinux policy to allow artd to perform secondary dex compilation
Secondary dex files are in app data directories. In order to perform
secondary dex compilation, artd needs permissions to:
- Read secondary dex files
- Create "oat" dir
- Create a reference profile in "oat" dir
- Rename the reference profile
- Delete the reference profile
- Read the current profile in "oat" dir
- Delete the current profile
- Create compilation artifacts in "oat" dir
- Rename compilation artifacts
- Delete compilation artifacts

Bug: 249984283
Test: -
  1. adb shell pm art optimize-package --secondary-dex -m speed-profile -f com.google.android.gms
  2. See no SELinux denial.
Change-Id: I19a0ea7895a54c67959b22085de27d1d0ccc1efc
2022-10-24 16:07:01 +01:00
Reema Bajwa
7e707248b2 Merge "Add app_api_service and ephemeral_app_api to credential_service selinux policy to allow regular apps and instant apps to access credential manager Test: Built & deployed locally Bug: 253155284 Feature Bug: 241268646" 2022-10-22 00:41:37 +00:00
Gabriel Biren
e310ef8163 Add SeLinux policy for WiFi Vendor HAL AIDL service.
Bug: 205044134
Test: Manual - reboot phone and check if AIDL
      service is running.
Change-Id: I242e6ef860d2defdb0ab0a3d649b2a4e3f0de5a6
2022-10-19 16:34:56 +00:00
Reema Bajwa
d151d63fa0 Add app_api_service and ephemeral_app_api to credential_service selinux policy to allow regular apps and instant apps to access credential manager
Test: Built & deployed locally
Bug: 253155284
Feature Bug: 241268646

Change-Id: I6cf6738858bccfbb07f0cf2e92fcbd472b4c56ce
2022-10-19 14:50:46 +00:00
Treehugger Robot
4a5c2dee68 Merge "Add policies for new services HDMI and HDMICEC" 2022-10-19 02:58:03 +00:00
Steven Moreland
586703a90c Merge "servicemanager: kernel log perms" 2022-10-18 20:06:41 +00:00
Steven Moreland
5c3f315771 servicemanager: kernel log perms
Bug: 210919187
Fixes: 235390578
Test: boot (logs still only show up sometimes)
Change-Id: I16b9814260103ce550836655d0409d43b8850ea0
2022-10-17 21:30:50 +00:00
Rob Seymour
9833c60b35 Merge "Allow service managers access to apex data." 2022-10-14 18:04:46 +00:00
Shraddha Basantwani
bacf949002 Allow CAS AIDL sample HAL
Bug: 230377377, 227673974
Test: manual
Change-Id: Ied6822d8114404b85dbed56ae4806de1bfb43e54
2022-10-12 19:42:20 +05:30