Commit graph

32918 commits

Author SHA1 Message Date
Inseob Kim
dd654ff844 microdroid: Narrow property permissions am: 5ee61a7628
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1830052

Change-Id: Ia084ebe4fcb23366a6d513f25a3ff116b4c9e2b2
2021-09-23 09:45:15 +00:00
Inseob Kim
5ee61a7628 microdroid: Narrow property permissions
microdroid's domains have been able to read/write any properties. That's
just for convenience while bringing up microdroid. This cleans up such
global permission and grants minimal access.

Bug: 194447534
Test: atest MicrodroidHostTestCases ComposHostTestCases
Test: run microdroid demo app
Change-Id: I09ce1174d4af9c228b788a522a6ab845cafd4505
2021-09-23 17:23:28 +09:00
Arthur Ishiguro
e310e59585 Allow dumpstate to dump Context Hub HAL am: 876ded0bf8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1833654

Change-Id: I13e5d45df4881c39ef65fc69bc2609f0aad9ff86
2021-09-22 23:18:11 +00:00
Arthur Ishiguro
876ded0bf8 Allow dumpstate to dump Context Hub HAL
Bug: 194285834
Test: adb bugreport
Change-Id: I6cd7efddf207b896303278539ddb824ad2e4c454
2021-09-22 18:44:49 +00:00
Thiébaud Weksteen
7e83cf42eb Merge "Revert "Use cil_write_build_ast"" am: 284d756b20
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1832308

Change-Id: I0302538d3960f8b3f1bc3a277f9e9c77f37f8081
2021-09-22 10:49:26 +00:00
Thiébaud Weksteen
284d756b20 Merge "Revert "Use cil_write_build_ast"" 2021-09-22 10:38:02 +00:00
Thiébaud Weksteen
bde09de39f Revert "Use cil_write_build_ast"
Revert submission 1827311-update_libselinux

Reason for revert: b/200771997 
Reverted Changes:
I088d1e94c:Fix build and use new cil_write_build_ast
I14dc4dc58:Merge remote-tracking branch 'aosp/upstream-master...
I7b77f4469:Use cil_write_build_ast

Change-Id: Ib4983288feb0139ed12cb3a07edd60d2d457022f
2021-09-22 09:15:53 +00:00
Thiébaud Weksteen
59b8a5055a Merge "Use cil_write_build_ast" am: 136b7f9cc4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1827239

Change-Id: I8dc6fe27910605bfd979f80e552b81fcb34b60c5
2021-09-22 08:25:47 +00:00
Thiébaud Weksteen
136b7f9cc4 Merge "Use cil_write_build_ast" 2021-09-22 08:10:12 +00:00
Howard Chen
255301c153 Merge "Allow vold to get the DSU status" am: 10461af50d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1828113

Change-Id: Iae7c8b045955af5d26e62c3f7e3824d4fc2c0d70
2021-09-22 04:22:35 +00:00
Howard Chen
10461af50d Merge "Allow vold to get the DSU status" 2021-09-22 04:09:18 +00:00
Treehugger Robot
dca210652e Merge "Revert "Add userspace_panic_device and userpanic_use"" am: a122abab14
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1830054

Change-Id: I4edb6b900482530a984b31fd389a6e0ceef2d2c3
2021-09-20 07:02:12 +00:00
Treehugger Robot
a122abab14 Merge "Revert "Add userspace_panic_device and userpanic_use"" 2021-09-20 06:46:29 +00:00
Woody Lin
6ad56599a2 Revert "Add userspace_panic_device and userpanic_use"
This reverts commit 7ed2456b45.

Reason for revert: /dev/userspace-panic is discarded (b/188777408#comment13)
Bug: 188777408
Change-Id: I98b0159890ee755ffaefc5533f9c40d54f8f26d2
2021-09-18 03:03:36 +00:00
Nikita Ioffe
c0cac4114c Cleanup sepolicy related to APEX pre/post-install hooks
The pre/post-install hook functionality has been deprecated and removed.

Bug: 172606645
Test: atest ApexTestCases
Test: atest CtsStagedInstallHostTestCases
Change-Id: I8a5f726a0c8f005654d0430b5a4598e416ff9c28
2021-09-17 17:55:12 +01:00
Treehugger Robot
d3c15334bb Merge "Allow composd to run odrefresh" am: ad48d3e9f1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1827881

Change-Id: I8bed3def64f192d2148816204c8a37c4c58d1348
2021-09-17 12:39:02 +00:00
Yi-Yo Chiang
814f3deb94 Add system_ext_userdebug_plat_sepolicy.cil for GSI
system_ext_userdebug_plat_sepolicy.cil is a copy of
userdebug_plat_sepolicy.cil (debug_ramdisk) that's installed in the
system_ext partition.
The build rule is gated by a BoardConfig variable, so products other
than GSI cannot accidentally install this module.

Bug: 188067818
Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash
  gsi_arm64-user from master, device can boot and `adb root` works
Change-Id: I43adc6adad5e08dcc8e106d18fdacef962310883
2021-09-17 20:27:28 +08:00
Treehugger Robot
ad48d3e9f1 Merge "Allow composd to run odrefresh" 2021-09-17 12:22:57 +00:00
Jiyong Park
a0bac44805 Add virtualizationservice.state.last_cid am: b804de2943
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1827500

Change-Id: I007226b8d1a64f162f65bf49eb929b7dc7ed1658
2021-09-17 09:14:09 +00:00
Jiyong Park
b804de2943 Add virtualizationservice.state.last_cid
It is a system property that keeps the last CID used by the
virtualizationservice. Although the information is local to the
process, a new system property is justified because the information has
to be kept across multiple runs of the process. A file however is not
desirable because the information shouldn't be persisted.

Bug: 196015427
Test: atest MicrodroidHostTestCases
Change-Id: If8ca4b6ad8d9c8cb3bb33dc9ef45de0ae6481d15
2021-09-17 09:35:58 +09:00
Alan Stokes
d3438b0f3c Allow composd to run odrefresh
Also allow odrefresh to run pvm_exec to talk to the CompOS VM.

And I moved the dontaudit & neverallow rules to the bottom while I was here.

Bug: 186126194
Test: adb shell apex/com.android.compos/bin/composd_cmd
Change-Id: I6f06dd6467a8eb59123d06c7179a86d9287e7f2f
2021-09-16 11:14:54 +01:00
Alan Stokes
4cb59e4221 Merge "compos_verify_key no longer creates a vsock" am: e494c51bc9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1827214

Change-Id: Ie1f78f588961fe6efc553e38effe34174bf3fac0
2021-09-16 08:24:04 +00:00
Alan Stokes
e494c51bc9 Merge "compos_verify_key no longer creates a vsock" 2021-09-16 08:07:18 +00:00
Inseob Kim
d58166165a Migrate freeze test to Soong
Bug: 33691272
Test: m selinux_policy on sc-dev
Change-Id: Ie536d885034e5d888f1329ac189fd0bf9723a6c4
2021-09-16 05:08:56 +00:00
Howard Chen
8720492f2e Allow vold to get the DSU status
Currently, the vold detects the factory reset by checking the
metadata encryption key. This logic is only valid when the
device is not in DSU mode. This CL allows vold to get the DSU
status.

Test: run DSU installation on a Pixel device
Bug: 199222795
Change-Id: Ia6ca3b27afd52347b132d7e2d8be244fb9f15e7d
2021-09-16 09:58:43 +08:00
Thiébaud Weksteen
8e057d189a Use cil_write_build_ast
libsepol now provides its own function to output the AST.

Bug: 190808996
Change-Id: I7b77f446972b42eca63c2ef7c18dff01508014e8
2021-09-15 16:21:46 +02:00
Alan Stokes
6c00021051 compos_verify_key no longer creates a vsock
Instead it gets it from virtualization_service, so this TODO is now
done.

Test: Manually run comps_verify_key
Test: Trigger odsign to run compos_verify_key at boot
Bug: 186126194
Change-Id: I705e7fd43b853a19c928ab76209ec321f10ec2d7
2021-09-15 11:22:47 +01:00
Inseob Kim
957b2c8437 microdroid: Remove default_prop access am: e17b985e1c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1826060

Change-Id: I8508d05b33f661fa9aae8e95f2afa24c2f82b984
2021-09-15 06:50:14 +00:00
Inseob Kim
e17b985e1c microdroid: Remove default_prop access
This adds properties necessary to run microdroid to property_contexts,
and then removes default_prop access to all domains except for init, as
init should be able to write all properties.

Bug: 194447534
Test: atest MicrodroidHostTestCases ComposHostTestCases
Change-Id: I2f80c71ce257613b3c3b019a3e988a5a0653d879
2021-09-15 05:26:03 +00:00
Treehugger Robot
c7801169d8 Merge "Bundle proc_bootconfig permission into read_fstab" am: 855f16dd87
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1826536

Change-Id: I93104b7549a3596ad62a37f80ab747f8cc770a90
2021-09-15 03:51:17 +00:00
Treehugger Robot
855f16dd87 Merge "Bundle proc_bootconfig permission into read_fstab" 2021-09-15 03:36:24 +00:00
Kelvin Zhang
2b5f108143 Bundle proc_bootconfig permission into read_fstab
fs_mgr::ReadDefaultFstab calls fs_mgr:ReadFstabFromDt() which eventually
calls fs_mgr_get_boot_config_from_bootconfig_source to read boot config.
Therefore bundle permission to read proc_bootconfig. This resolves some
selinux denials for update_engine

Test: th
Change-Id: Ia8bd94eb33a38ccd939577b54910645fec4ccda8
2021-09-14 18:44:42 -07:00
Changyeon Jo
ca6e41f061 Allow automotive_display_service to use EGL files am: c5e8db55f9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1825635

Change-Id: I537ebd4304348d6f9b02749a0ed39a18c6380814
2021-09-14 01:03:58 +00:00
Changyeon Jo
c5e8db55f9 Allow automotive_display_service to use EGL files
Bug: 199739880
Test: m -j selinux_policy and run evs_app
Change-Id: If0df74ad4708b00f213c42516eb404b98873cf4f
2021-09-13 17:35:46 +00:00
Treehugger Robot
62858f1178 Merge "Initial sepolicy for composd" am: 0bbfc68a49
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1824054

Change-Id: I52b316146c7c3c9ee234fcd11f2a80b5abada3ad
2021-09-13 11:59:14 +00:00
Treehugger Robot
0bbfc68a49 Merge "Initial sepolicy for composd" 2021-09-13 11:47:21 +00:00
Alan Stokes
d376e2041f Initial sepolicy for composd
Add what we need to allow composd to run and expose an AIDL service.

Also delete the policy for compsvc; we never access it in the host
now, and the real policy is in microdroid. Retain the compos_exec
type, since it is referenced in the APEX sepolicy.

Bug: 186126194
Test: adb shell cmd -w android.system.composd; no denials.
Change-Id: I5f06b2b01852cdebd2d67009b363ec08b17ce33a
2021-09-13 10:33:53 +01:00
Jooyung Han
55bac72d44 Allow microdroid_manager to create a /apex/* file am: 6e60287a1f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1823813

Change-Id: Ia41ec5bb715be17ae031786fd1de454a0be81e06
2021-09-10 14:58:58 +00:00
Jooyung Han
6e60287a1f Allow microdroid_manager to create a /apex/* file
Microdroid_manager needs to pass APEX pubkeys to APEXd. Since the data
is too big for a system property, it creates a file
/apex/vm-payload-metadata so that APEXd reads/uses it.

Bug: 199371341
Test: MicrodroidHostTestCases
Change-Id: Iaf2b4fc08b36610032d9c339f787e5e34994448b
2021-09-10 17:35:26 +09:00
Jooyung Han
2e80ad5fd9 Merge "make zipfuse a bootstrap process" am: f19cd64a0e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1821986

Change-Id: I96cd2336ab637726e900d1760a4ee7d6c143a60d
2021-09-10 08:27:25 +00:00
Jooyung Han
f19cd64a0e Merge "make zipfuse a bootstrap process" 2021-09-10 08:16:31 +00:00
Treehugger Robot
77b9fbf4c0 Merge "Add the 'bdev_type' attribute to all block device types" am: 68e5958902
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1821935

Change-Id: Ifb345fe53482c49b370ea71e787601d7ff35769b
2021-09-10 01:41:23 +00:00
Treehugger Robot
68e5958902 Merge "Add the 'bdev_type' attribute to all block device types" 2021-09-10 01:27:48 +00:00
Treehugger Robot
b7f4c1a252 Merge "allow system server to read extcon state and type from sysfs" am: a37bf10692
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1821341

Change-Id: Ib1f53e2e731c875ac3d5e78bec28fd958cc7d671
2021-09-10 01:14:37 +00:00
Gregory Montoir
505fc17f35 Merge "Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6}" am: 2881a253da
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1821714

Change-Id: I1f8438ef4f5119b63a4b99e4cf8f2026dc4ce5c8
2021-09-10 01:13:52 +00:00
Treehugger Robot
a37bf10692 Merge "allow system server to read extcon state and type from sysfs" 2021-09-10 01:12:49 +00:00
Gregory Montoir
2881a253da Merge "Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6}" 2021-09-10 00:47:09 +00:00
Jooyung Han
53c773a3fd make zipfuse a bootstrap process
Bug: n/a
Test: MicrodroidHostTestCases
Change-Id: Ia2ad615e919f4fcb0452d8458e505ecfbdd5818f
2021-09-10 08:56:08 +09:00
Christopher Ferris
a325b5c195 Merge "Allow crash_dump to read from /data/local/tests." am: adaabe529c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1821636

Change-Id: Id23835b202676224eac8c57b1322d55df28cd87f
2021-09-09 23:43:49 +00:00
Christopher Ferris
adaabe529c Merge "Allow crash_dump to read from /data/local/tests." 2021-09-09 23:20:41 +00:00