Commit graph

41874 commits

Author SHA1 Message Date
Jaewan Kim
4183cbb63c Label hypervisor test properties
Bug: 298306391
Change-Id: I160101325989f58ef3403ec5be20895468c2ccbb
Test: TH, atest CustomPvmfwHostTestCases
2023-09-01 02:43:38 +00:00
Inseob Kim
726bcb500c Merge "Remove code about mixed sepolicy build" into main 2023-09-01 01:06:38 +00:00
Pawan Wagh
2eb2d1c80b Merge "Adding ro.product.build.16k_page.enabled to property contexts" into main 2023-09-01 00:26:13 +00:00
Daeho Jeong
e7a31d52c7 Merge "compress logcat files" into main 2023-08-31 22:46:43 +00:00
Kean Mariotti
b378302763 Merge "Allow traceur_app to access winscope traces" into main 2023-08-31 22:05:35 +00:00
Pawan Wagh
60cc0b3a39 Adding ro.product.build.16k_page.enabled to property contexts
This property will be used to set 16k dev options on device.
This will be product specific property and will be added on
specific devices.

Test: m, booted device with PRODUCT_16K_DEVELOPER_OPTION ON/OFF and
verified option visibility.
Bug: 297922563

Change-Id: I2be5e7236eb8259ef6d5893e70712a5c89aaad52
2023-08-31 20:30:04 +00:00
Devin Moore
424c64de83 Merge "Moving hwservicemanager and allocator to system_ext" into main 2023-08-31 15:51:14 +00:00
Inseob Kim
6c6aa01ae4 Remove code about mixed sepolicy build
There is no one actively using mixed sepolicy build, and it made
sepolicy codes too complicated. As we are deprecating mixed build,
removing such code for cleanup.

Bug: 298305798
Test: boot cuttlefish
Change-Id: I8beedd5a281fa957532deecb857da4e1bb66992a
2023-08-31 16:54:17 +09:00
Treehugger Robot
40c32c1b91 Merge "Allow VS to read vendor cfg for assignable devices" into main 2023-08-30 16:14:34 +00:00
Inseob Kim
d61618bcb6 Allow VS to read vendor cfg for assignable devices
Bug: 297313212
Test: add /vendor/etc/avf/assignable_devices.xml and run vm info
Change-Id: I602be057b118ac68a59e6c4f5f7fce17685cd7ae
2023-08-30 14:14:51 +09:00
Treehugger Robot
b30f713bd4 Merge "Reland "Make coredomain violation as a build error"" into main 2023-08-30 01:47:46 +00:00
Inseob Kim
e65098d4a7 Reland "Make coredomain violation as a build error"
This reverts commit 3bda1c9761.

Reason for revert: The fix ag/24590089 is verified with ABTD and merged

Change-Id: I17124df1ddfd52cbd2a17b1a90e0f332eb4e41f9
2023-08-30 00:24:06 +00:00
Samuel Wu
0bbc9270e0 Merge "Revert "Make coredomain violation as a build error"" into main 2023-08-29 23:41:19 +00:00
Samuel Wu
3bda1c9761 Revert "Make coredomain violation as a build error"
This reverts commit 9289cf6fa7.

Reason for revert:
DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=cf_x86_64_auto-trunk_staging-userdebug&lkgb=10733608&lkbb=10733914&fkbb=10733779, bug b/298102197

Bug: 298102197

Change-Id: Ia68dc64d3a7b02195e72d1c85ae8c9280fa665cc
2023-08-29 23:40:24 +00:00
Thiébaud Weksteen
69a9189ddf Merge "Update documentation on binderservicedomain" into main 2023-08-29 23:27:50 +00:00
Thiébaud Weksteen
9432227844 Merge "Grant dumpstate access to artd service" into main 2023-08-29 23:20:27 +00:00
Inseob Kim
9289cf6fa7 Make coredomain violation as a build error
Also add how to fix the volations.

Bug: 280547417
Test: m selinux_policy with violations
Change-Id: Icdce73bf0c3b3d98297606958e45e5dd9192f8a0
2023-08-29 01:15:14 +00:00
Thiébaud Weksteen
5e9b88f739 Update documentation on binderservicedomain
The binderservicedomain attribute grants further permissions than its
name suggests. Update the documentation to avoid its usage.

Bug: 297785784
Test: build, documentation update only.
Change-Id: I41bc6f32cf4d56bde320261fe221c3653cda945a
2023-08-28 12:22:17 +10:00
Thiébaud Weksteen
8a250b9099 Grant dumpstate access to artd service
The artd daemon is not always active. When running, it exposes a binder
service which may be dumped when a bug report is triggered. The current
policy did not fully grant access which resulted in spurious denials if
a bugreport was triggered when the daemon was running.

Test: Run bugreport; observe correct dump of artd service
Bug: 282614147
Bug: 192197221
Change-Id: Ie0986d7716de33ec38ae09cfee14c629f5a414a6
2023-08-28 10:53:58 +10:00
Daeho Jeong
6ac8e4cf00 compress logcat files
Change selinux policy to compress logcat files.

Test: check whether logcat files are compressed
Bug: 295175795
Change-Id: Ib120700c6dab4b1d0e29f0e19e55793bfb7a1675
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2023-08-25 15:02:34 -07:00
Inseob Kim
06518b14f7 Use board api level for seapp coredomain check
Rather than PRODUCT_SHIPPING_API_LEVEL, use board api level
(BOARD_API_LEVEL or BOARD_SHIPPING_API_LEVEL) to determine whether we
check coredomain violations or not.

Bug: 280547417
Test: see build command of vendor_seapp_contexts
Change-Id: I20859d6054ab85f464b29631bdfd55ade3e78f53
2023-08-25 21:20:08 +09:00
Yu Shan
3734f169ca Merge "Allow remoteaccess V2 and VHAL v2/v3." into main 2023-08-24 17:39:08 +00:00
Treehugger Robot
33a68d6284 Merge "Policy changes for running payloads not as root" into main 2023-08-24 08:07:21 +00:00
Treehugger Robot
171a6fbca2 Merge "Allow init to access user mode helpers" into main 2023-08-24 08:06:42 +00:00
Kangping Dong
5e82983ee4 Merge "[Thread] add sepolicy rules for Thread system service" into main 2023-08-24 06:42:08 +00:00
Yu Shan
df5cd6fe19 Allow remoteaccess V2 and VHAL v2/v3.
Test: None
Bug: 297271235
Change-Id: Icc6dbb007c50db6d8adf492726365fdc34a60e78
2023-08-23 17:20:15 -07:00
Eric Biggers
f1de111fe9 Merge "Remove all module_request rules" into main 2023-08-23 17:29:10 +00:00
Alan Stokes
3105e3ef43 Allow init to access user mode helpers
This is in host sepolicy, looked like we pruned it because we didn't
need it - but now we do.

Bug: 297019386
Test: Run VM with encrypted storage, no denials
Change-Id: I6cd5f6bf98e9089ef7c3945c29242daea527592f
2023-08-23 16:25:50 +01:00
Treehugger Robot
ff9b6459f9 Merge "Skip building compat files if REL" into main 2023-08-23 14:19:45 +00:00
Alfred Piccioni
ee7e77ba63 Merge "Revert ntfs file context changes" into main 2023-08-23 12:47:58 +00:00
Alan Stokes
76fb93871d Policy changes for running payloads not as root
Allow Microdroid Manager to setuid/setgid when spawning Microdroid
Launcher.

Allow encryptedstore binary to chmod the root directory.

Also added some neverallow rules, because I was surprised that I
didn't trigger one.

Bug: 296393106
Test: atest MicrodroidTests
Change-Id: I1f224d59548162d0b36c2c9f32710db2c2da5869
2023-08-23 13:44:40 +01:00
Alfred Piccioni
33ebe0ef1b Revert ntfs file context changes
Partial revert of:

commit 3e1dc57bf4

commit 30ae427ed0

The current file contexts could break potential implementations of NTFS
by partners in future. I am not rolling back the adjoining
fuseblkd_exec andfuseblkd_untrusted_exec code, because secure
implementations of fuseblk drivers should still endeavour to use the
more compartmentalised policies.

However, as we don't support NTFS officially, we should give
implementors the choices whether to use it or not, even if it will open
the door to potentially less secure implementations.

NTFS Context: http://b/254407246,
https://docs.google.com/document/d/1b5RjdhN2wFFqmLCK0P_chVyiEhiYqNlTn52TFBMNwxk

Bug: 294925212
Test: Builds and boot.
Change-Id: I6d3858517e797b3f7388f9d3f18dd4a11770d5bc
2023-08-23 11:42:20 +00:00
Kangping Dong
45efca84e5 [Thread] add sepolicy rules for Thread system service
Add SEPolicy for the ThreadNetworkService
Add Fuzzer exception, thread_network service is java only

FR: b/235016403

Test: build and start thread_network service
bug: 262683651
Change-Id: Ifa2e9500dd535b0b4f2ad9af006b8dddaea900db
2023-08-23 17:08:58 +08:00
Inseob Kim
61d6beb39e Skip building compat files if REL
Bug: 296780580
Test: build with next
Change-Id: I588d249f35fc7049d0db3b64692ed818050af0ed
2023-08-23 08:41:44 +00:00
Treehugger Robot
90bf7fe34c Merge changes from topic "revert-2715179-BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN-HHKXHMATFW" into main
* changes:
  Don't check seapp violations for U or prior
  Revert "Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN"
2023-08-23 06:34:30 +00:00
Inseob Kim
76d9f26019 Don't check seapp violations for U or prior
Bug: 280547417
Test: build
Change-Id: Ie71d7b4884f4e6981bd1d78bb0586111dc4fc72a
2023-08-23 12:54:10 +09:00
Inseob Kim
d7b381caca Revert "Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN"
Revert submission 2715179-BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN

Reason for revert: not needed

Reverted changes: /q/submissionid:2715179-BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN

Change-Id: I4595a648691e11b0f3860b0d1414fbc9b9c94791
2023-08-23 02:07:47 +00:00
Eric Biggers
448bd57181 Remove all module_request rules
Starting in Android 11, Android unconditionally disables kernel module
autoloading (https://r.android.com/1254748) in such a way that even the
SELinux permission does not get checked.  Therefore, all the SELinux
rules that allow or dontaudit the module_request permission are no
longer necessary.  Their presence or absence makes no difference.

Bug: 130424539
Test: Booted Cuttlefish, no SELinux denials.
Change-Id: Ib80e3c8af83478ba2c38d3e8a8ae4e1192786b57
2023-08-22 16:56:04 +00:00
Kangping Dong
d7ef12ca36 Merge "[Thread] add missing ioctl permission for ot_rcp" into main 2023-08-22 08:01:26 +00:00
Kangping Dong
fce4ea7adf [Thread] add missing ioctl permission for ot_rcp
Otherwise, it throws permission denied error:
```
avc:  denied  { ioctl } for  path="/dev/pts/0" dev="devpts" ino=3 ioctlcmd=0x5401 scontext=u:r:ot_rcp:s0 tcontext=u:object_r:devpts:s0 tclass=chr_file permissive=0
```

Test: locally tested that this can fix the denied issue
Bug: 296969044
Change-Id: Ica28214693794b969138212ddb3d19f0dcc34bcf
2023-08-22 07:46:35 +00:00
Treehugger Robot
54bacb776d Merge "Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN" into main 2023-08-22 02:09:45 +00:00
Eran Messeri
8330358c5d Merge "Add remaining attestation properties to selinux" into main 2023-08-21 14:34:49 +00:00
Kean Mariotti
7cce6f5ea0 Allow traceur_app to access winscope traces
Bug: 295816837
Test: capture winscope traces with Traceur
Change-Id: I22a89578ed8f192764b832789f2a2f5f012d77b1
2023-08-21 07:13:42 +00:00
Inseob Kim
d8de8757ae Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN
Starting from Android V, vendor seapp_contexts files can't assign
coredomain to vendor apps, as it's Treble violation. This build broken
variable is to suppress the enforcement for devices launching with U or
prior.

Bug: 280547417
Test: set BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN := true and build
Change-Id: I7b91db8183a867aa490e490e56cb872ea830b21f
2023-08-21 15:15:34 +09:00
Jeff Pu
5a70ae0fc8 Merge "Add biometric face virtual hal service" into main 2023-08-18 12:51:11 +00:00
Treehugger Robot
6d6183a709 Merge "Add rules for reading VM DTBO by vfio_handler" into main 2023-08-18 08:56:17 +00:00
Inseob Kim
292f22a33b Start tracking vendor seapp coredomain violations
As part of Treble, enforce that vendor's seapp_contexts can't label apps
using coredomains. Apps installed to system/system_ext/product should be
labeled with platform side sepolicy.

This change adds the violators attribute that will be used to mark
violating domains that need to be fixed.

Bug: 280547417
Test: manual
Change-Id: I64f3bb2880bd19e65450ea3d3692d1b424402d92
2023-08-18 15:24:59 +09:00
Seungjae Yoo
1b2d9de08d Add rules for reading VM DTBO by vfio_handler
Bug: 291191362
Test: m

Merged-In: I0b38feb30382c5e6876e3e7809ddb5cf9034e4fd
Change-Id: I0b38feb30382c5e6876e3e7809ddb5cf9034e4fd
2023-08-18 01:17:23 +00:00
Victor Hsieh
aecd87d3dd Merge "Remove shell from neverallow of frp_block_device access" into main 2023-08-17 15:26:55 +00:00
wufei3
50a326d04a Add remaining attestation properties to selinux
Add "ro.product.device_for_attestation" and
"ro.product.manufacturer_for_attestation" prop to selinux permissions.

Bug:294190893
Test: atest CtsKeystoreTestCases:android.keystore.cts.DeviceOwnerKeyManagementTest#testAllVariationsOfDeviceIdAttestation

Change-Id: I71ee17ab59838680199acc9a7c209deba756f603
Signed-off-by: wufei3 <wufei3@xiaomi.corp-partner.google.com>
2023-08-17 11:41:07 +00:00