Commit graph

41939 commits

Author SHA1 Message Date
Wonsik Kim
a981983e70 C2 AIDL sepolicy update
Bug: 251850069
Test: presubmit
Change-Id: Ica39920472de154aa01b8e270297553aedda6782
2023-09-06 14:30:26 -07:00
Kangping Dong
0c9f48d6ef [Thread] move ot-daemon to the tethering module
The com.android.threadnetwork module is merged into
the com.android.tethering module now.

Bug: 296211911
Change-Id: I9fec91fff4e2ae4be26da4b0f52e739c4a251cd2
2023-09-06 14:07:14 +08:00
Kangping Dong
fd10f344dc [Thread] move ot-ctl to vendor
"ot-ctl" is a command line tool which is useful for debugging or
testing with "ot-daemon". It's not required to be part of the
system image. It was previously added to the com.android.threadnetwork
apex package, and this commits removes it from the apex.

Test: ot-ctl is removed from /apex/com/android/threadnetwork/bin
Bug: 299224389
Change-Id: I607a02c9efb26f404ea9da2e5b7109094d3232b6
2023-09-06 14:07:02 +08:00
Inseob Kim
eb0d40aa85 Move tests from treble_sepolicy_tests
Contrast to its name, sepolicy_tests also contains tests related to
Treble. Also tests other than the compat mapping test in
treble_sepoliy_tests don't need to be run several times.

Moving tests except for compat mapping test to sepolicy_tests to
simplify treble_sepolicy_tests and to reduce build time.

Bug: 288807412
Test: m selinux_policy
Test: atest SELinuxHostTest
Change-Id: I102fa48faf49b7028dc1bb5f21de65fa99babe6f
2023-09-06 14:26:25 +09:00
Treehugger Robot
0acb54ce2c Merge "Allow crash_dump to read vendor apex dir." into main 2023-09-05 12:04:20 +00:00
Jooyung Han
18a42afb49 Allow crash_dump to read vendor apex dir.
Bug: 298699169
Test: crash dumps from a binary in vendor apex
Change-Id: I4eb2c4162ae2e78ef126987e7de0f838b6db205c
2023-09-05 17:51:38 +09:00
Treehugger Robot
b316f8bf95 Merge "Relax freeze_test to check only compatibility" into main 2023-09-05 06:29:39 +00:00
Thiébaud Weksteen
70dc0bb5dc Merge "Remove SeamendcHostTest from TEST_MAPPING" into main 2023-09-05 05:10:01 +00:00
Inseob Kim
36d9d39e6e Relax freeze_test to check only compatibility
For now, freeze_test compares prebuilts against sources with diff, to
ensure that sources are identical to prebuilts. However, it could be the
case that the branch should be able to build both REL and ToT. In that
case, changes to the sources are inevitable and the freeze test will
fail.

To fix the issue, freeze_test will now only check compatibility. To be
specific, it will check if any public types or attributes are removed.
Contexts files and neverallow rules are not checked, but they may be
added later. Also to support the new freeze_test

- build_files module is changed to use glob (because REL version won't
  be in compat versions list)
- plat_pub_policy modules are added under prebuilts/api (because
  freeze_test needs that)

Bug: 296875906
Test: m selinux_policy
Change-Id: I39c40992965b98664facea3b760d9d6be1f6b87e
2023-09-05 03:37:18 +00:00
Treehugger Robot
3e4b7bf2ce Merge "[service-vm] Adjust sepolicy for running service VM" into main 2023-09-04 17:10:03 +00:00
Alice Wang
e1bb7d02e1 Merge "[avf] Fix warning when runnning Microdroid" into main 2023-09-04 15:18:49 +00:00
Alice Wang
40519f79dc [service-vm] Adjust sepolicy for running service VM
Bug: 278858244
Test: Runs the ServiceVmClientApp in VM
Test: atest MicrodroidHostTests
Change-Id: Ia59fe910edc0826aa5866468c27558e9d190b58d
2023-09-04 13:01:53 +00:00
Alice Wang
ea51816b10 [avf] Fix warning when runnning Microdroid
This cl fixes the following selinux denial:

09-04 10:15:34.544  3393  3393 W binder:3393_2: type=1400 audit(0.0:17): avc:  denied  { getattr } for  path="socket:[99352]" dev="sockfs" ino=99352 scontext=u:r:virtualizationmanager:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0

Test: Runs the ServiceVmClientApp
Change-Id: I5f69bc966f8e136dab19d1fdc0bc79190bef5ca5
2023-09-04 12:26:03 +00:00
Jaewan Kim
796ec5f0cb Set neverallow for hypervisor test properties
Bug: 298306391
Change-Id: I754af47d063bb26549cd1793951b09262cadd95a
Test: TH
2023-09-01 07:55:09 +00:00
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
Thiébaud Weksteen
9547e81612 Remove SeamendcHostTest from TEST_MAPPING
Bug: 297794885
Test: TH
Change-Id: I9f508b1cab5a8e386457cc645b2ef7d0897b8692
2023-08-31 14:20:59 +10: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