Commit graph

33478 commits

Author SHA1 Message Date
Kedar Chitnis
3591bd6749 Merge "Update sepolicy to add dumpstate device service for AIDL HAL" am: bb0315bab9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1895075

Change-Id: I07009a4ecb9c6ab1712853b15ce6a10914b5babe
2021-12-01 12:30:31 +00:00
Kedar Chitnis
bb0315bab9 Merge "Update sepolicy to add dumpstate device service for AIDL HAL" 2021-12-01 12:16:33 +00:00
Inseob Kim
2df19cba08 microdroid: Run apk mount utils from MM
For now, the command for apkdmverity and zipfuse is hard-coded in the
init script file. To support passing extra APKs, microdroid_manager
needs to parse the vm config, and then manually run apkdmverity and
zipfuse with appropriate parameters.

Bug: 205224817
Test: atest MicrodroidHostTestCases ComposHostTestCases
Change-Id: I482b548b2a414f3b5136cea199d551cc88402caf
2021-12-01 19:46:33 +09:00
Chris Weir
7129b929e3 Give Netlink Interceptor route_socket perms
VTS for Netlink Interceptor needs access to netlink_route_socket, and
other services routing traffic to Netlink Interceptor may as well.

Bug: 201467304
Test: VtsHalNetlinkInterceptorV1_0Test
Change-Id: Ic52e54f1eec7175154d2e89e307740071b1ba168
2021-12-01 04:08:19 +00:00
Inseob Kim
bee558e4bb Add 32.0 mapping files
Steps taken to produce the mapping files:

1. Add prebuilts/api/32.0/plat_pub_versioned.cil from the
/vendor/etc/selinux/plat_pub_versioned.cil file built on sc-v2-dev with
lunch target aosp_arm64-eng. Add prebuilts/api/32.0/vendor_sepolicy.cil
as an empty file.

When adding plat_pub_versioned.cil, leave only type and typeattribute
statements, removing the other statements: allow, neverallow, role, etc.

2. Add new file private/compat/32.0/32.0.cil by doing the following:
- copy /system/etc/selinux/mapping/32.0.cil from sc-v2-dev
aosp_arm64-eng device to private/compat/32.0/32.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 32 sepolicy.
Find all such types using treble_sepolicy_tests_32.0 test.
- for all these types figure out where to map them by looking at
31.0.[ignore.]cil files and add approprite entries to 32.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_32.0 and installs
32.0.cil mapping file onto the device.

Bug: 206330997
Test: m treble_sepolicy_tests_32.0
Test: m 32.0_compat_test
Test: m selinux_policy
Change-Id: I8b2991e64e2f531ce12db7aaacad955e4e8ed687
2021-12-01 10:58:25 +09:00
Yifan Hong
0ad8b6a1d2 recovery: allow to talk to health HAL.
On non-A/B devices, recovery needs to check if battery
is okay before applying the update. This requires
talking to the AIDL health HAL if the device uses
AIDL health HAL.

Test: manually calling GetBatteryInfo and check for denials
Bug: 170338625
Bug: 177269435
Change-Id: Ia89353cfff023376a4176c0582312bdcab00b5e6
2021-11-30 16:44:42 -08:00
Treehugger Robot
5607594999 Merge "Restrict system_server_startup domain" am: 825936c473
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1903593

Change-Id: I8e77864d385f06e8151425cc72c277cb8d60df55
2021-11-30 10:42:59 +00:00
Treehugger Robot
825936c473 Merge "Restrict system_server_startup domain" 2021-11-30 10:29:10 +00:00
Inseob Kim
94fbbb68e7 Add SEPolicy prebuilts for Sv2 (API 32) am: 43b6a317bc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1906311

Change-Id: Ib4c30188bba177c551de8712b4a0cf684f937146
2021-11-30 07:17:40 +00:00
Jiyong Park
ff3048349a Add logd.ready
logd.ready is a system property that logd sets when it is ready to
serve incoming socket requests for reading and writing logs. Clients of
logd (e.g. logcat) can use this to synchronize with logd, otherwise they
may experience a crash due to the refused socket connection to logd when
they are started before logd is ready.

Bug: 206826522
Test: run microdroid. see logcat logs are shown immediately
Change-Id: Iee13485b0f4c2beda9bc8434f514c4e32e119492
2021-11-30 15:10:53 +09:00
Inseob Kim
43b6a317bc Add SEPolicy prebuilts for Sv2 (API 32)
Bug: 206330997
Test: Build
Change-Id: I26082be343b15c9d6c7cabf0acd44711fbcc8113
2021-11-30 12:04:43 +09:00
Treehugger Robot
2c95edf2af Merge "Grant BetterBug access ot WM traces attributes" am: 53b6de0642
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1903230

Change-Id: Iac94b461b51ad6373de2c7a35e04aaea3f554394
2021-11-29 18:53:37 +00:00
Treehugger Robot
53b6de0642 Merge "Grant BetterBug access ot WM traces attributes" 2021-11-29 18:38:12 +00:00
Nataniel Borges
6b624a5a0c Grant BetterBug access ot WM traces attributes
Currently BetterBug (privileged app) cannot access the details form
/data/misc/wmtrace.

Test: access a trace from /data/misc/wmtrace/ in betterbug
Change-Id: I4cf864ab4729e85f05df8f9e601a75ff8b92bdc8
2021-11-29 18:22:58 +01:00
Paul Lawrence
b669669504 Merge "Allow bpfloader to read fuse's bpf_prog number" am: 04cddf8af2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1894198

Change-Id: I04f766b5c312fb6b8c56e63ae9ed90a09e081baa
2021-11-29 16:33:03 +00:00
Paul Lawrence
04cddf8af2 Merge "Allow bpfloader to read fuse's bpf_prog number" 2021-11-29 16:18:42 +00:00
Treehugger Robot
7d68e1e458 Merge "Make 31.0 prebuilts and compat files up to date" am: 906797a9bc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1903979

Change-Id: I68bba8b9556c1f53e27b3b5a78886afc63f2dd23
2021-11-29 13:14:27 +00:00
Treehugger Robot
906797a9bc Merge "Make 31.0 prebuilts and compat files up to date" 2021-11-29 13:03:45 +00:00
sunliang
fd0be879cc Change the label of /product/overlay to u:object_r:system_file:s0 am: e8d1e97ef2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1903975

Change-Id: Iea550473af3cbfce4fead51e763b76ed316d6de4
2021-11-29 11:44:33 +00:00
Inseob Kim
5a8afdcfa6 Make 31.0 prebuilts and compat files up to date
Bug: 208126864
Test: m selinux_policy 31.0_compat_test treble_sepolicy_tests_31.0
Change-Id: Ic97d17b39f7307ed5af200c97c8c09ca0511c216
2021-11-29 19:40:59 +09:00
sunliang
e8d1e97ef2 Change the label of /product/overlay to u:object_r:system_file:s0
Overlayfs product/overlay in init first stage is allowed in AndroidS.
product/overlay directory contains RRO apks, it is plausible to allow
dumpstate to access it since dumpstate will call df command.
Or there will be an avc denial:
01-01 07:09:37.234 13582 13582 W df : type=1400 audit(0.0:1717): avc: denied { getattr } for path="/product/overlay"
dev="overlay" ino=2 scontext=u:r:dumpstate:s0 tcontext=u:object_r:vendor_overlay_file:s0 tclass=dir permissive=0

Actually, it is more reasonable to set /product/overlay to u:object_r:system_file:s0 since
there already had definiitions releated to /product/overlay
/mnt/scratch/overlay/(system|product)/upper u:object_r:system_file:s0
/(product|system/product)/vendor_overlay/[0-9]+/.*          u:object_r:vendor_file:s0

Bug: https://b.corp.google.com/u/0/issues/186342252

Signed-off-by: sunliang <sunliang@oppo.com>
Change-Id: I493fab20b5530c6094bd80767a24f3250d7117a8
2021-11-29 08:24:37 +00:00
Hungming Chen
ffa08bbd21 [NC#1] netd: allow netd to setup packet socket for clatd
Needed because the packet socket setup has been moved from clatd
to netd.

Test: manual test
    1. Connect to ipv6-only wifi.
    2. Try IPv4 traffic.
       $ ping 8.8.8.8
Change-Id: If6c3ba70cd7b3a44a31b8deab088303c22838da8
2021-11-26 20:28:29 +08:00
Alan Stokes
665c295efc Restrict system_server_startup domain
This seems like an oversight when system_server_startup was
introduced (commit caf42d615d).

Test: Presubmits
Change-Id: Ia371caa8dfc2c250d6ca6f571cf002e25703e793
2021-11-26 11:41:51 +00:00
Jiyong Park
7dec0b50f6 Merge "app_data_file is the only app_data_file_type that is allowed for crosvm" am: cc82a6ae89
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1903450

Change-Id: I6564c95e4d7a8463f43de0f610447650fdeb9617
2021-11-26 06:31:52 +00:00
Jiyong Park
cc82a6ae89 Merge "app_data_file is the only app_data_file_type that is allowed for crosvm" 2021-11-26 06:11:03 +00:00
Jiyong Park
028e722934 app_data_file is the only app_data_file_type that is allowed for crosvm
Bug: 204852957
Test: monitor TH
Change-Id: Ie92aa25336087519661002624b486cb35740cda6
2021-11-26 01:20:20 +09:00
Kedar Chitnis
a465cbc194 Update sepolicy to add dumpstate device service for AIDL HAL
- Add hal_dumpstate_service AIDL service to hal_dumpstate.te,
  service.te
- Add default example hal_dumpstate service to file_contexts,
  service_contexts
- Adde hal_dumpstate_service to API level 31 compatibility
  ignore list (31.0.ignore.cil)

Bug: 205760700
Test: VtsHalDumpstateTargetTest, dumpstate, dumpstate_test, dumpsys
Change-Id: If49fa16ac5ab1d3a1930bb800d530cbd32c5dec1
2021-11-25 07:52:32 +00:00
Thiébaud Weksteen
84c1556e0f Merge "Refactor fc_sort and add unit tests" am: 274636c958
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1901411

Change-Id: I45f758fe0e67d23b8cb98bbec87f218a8f0fafeb
2021-11-25 05:19:05 +00:00
Thiébaud Weksteen
274636c958 Merge "Refactor fc_sort and add unit tests" 2021-11-25 04:59:56 +00:00
Thiébaud Weksteen
b75b4d2477 Refactor fc_sort and add unit tests
Clean up fc_sort to facilitate the migration to Python3. Use PEP8 for
naming scheme.

Test: atest --host fc_sort_test
Bug: 200119288
Change-Id: Ia2c40a850a48ec75e995d5233b5abaae10917a89
2021-11-25 13:18:05 +11:00
Navinprashath
f924bd13f9 sepolicy: Add badge for gsm properties am: d35bd44109
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1901412

Change-Id: Ibba4fd2356c2b1870ac4a4a192f3608f126223c7
2021-11-24 11:23:22 +00:00
Navinprashath
d35bd44109 sepolicy: Add badge for gsm properties
Add badge for gsm.operator.iso-country and gsm.sim.operator.iso-country.

Test: Manual test
Bug: 205807505
Change-Id: If4f399cd97b2297094ef9431450f29e0a91e5300
2021-11-24 16:46:55 +08:00
Jack Yu
55cd3d5260 Merge changes from topic "OMAPI_VNTF" am: b25774f53c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1897109

Change-Id: I1002ca06bbe88b0977a78b7b2ae4900e239e84e1
2021-11-23 05:13:43 +00:00
Jack Yu
b25774f53c Merge changes from topic "OMAPI_VNTF"
* changes:
  Added sepolicy rule for vendor uuid mapping config
  Support for OMAPI Vendor stable interface
2021-11-23 04:54:02 +00:00
Richard Fung
4ead13bfc9 Merge "Support reading block apexes from system_server" am: 6d3bc08dbb
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1899604

Change-Id: I658d6283570a02f800f5c69f660a686b446e4420
2021-11-23 03:33:50 +00:00
Richard Fung
6d3bc08dbb Merge "Support reading block apexes from system_server" 2021-11-23 03:19:05 +00:00
Richard Fung
d34435c257 Support reading block apexes from system_server
This relaxes the neverallow so that it is possible to write a new
SELinux allow for system_server to read /dev/block/vd*. It still isn't
possible unless a vendor enables it.

Bug: 196965847
Test: m -j
local_test_runner arc.Boot.vm

Change-Id: Idad79284778cf02066ff0b982480082828f24e19
2021-11-22 21:18:54 +00:00
Akilesh Kailash
ec750298c3 Merge "New property to control virtual a/b user-space snapshots" am: b295d44694
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1885106

Change-Id: Ie804ed4155f4cb5cdfbe490f882f8215030aa63d
2021-11-22 20:31:36 +00:00
Akilesh Kailash
b295d44694 Merge "New property to control virtual a/b user-space snapshots" 2021-11-22 20:16:06 +00:00
Treehugger Robot
db3248e228 Merge "Mark safety_center_service as app_api_service in SELinux Policy." am: 441be957ca
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1899011

Change-Id: I82c98873787e229bd40b783fcc025d6a35ae1e26
2021-11-22 13:12:37 +00:00
Treehugger Robot
441be957ca Merge "Mark safety_center_service as app_api_service in SELinux Policy." 2021-11-22 12:54:32 +00:00
Treehugger Robot
c995fd7ac3 Merge "Split composd's service in two" am: 6d485dfd89
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1897594

Change-Id: I534d6a997f2d51745714e5a4467c2a1fd5129cca
2021-11-22 11:30:18 +00:00
Treehugger Robot
6d485dfd89 Merge "Split composd's service in two" 2021-11-22 11:19:40 +00:00
Alan Stokes
8788f7afe2 Split composd's service in two
They are served by the same process but have different clients:
- the main interface is exposed to system server;
- the internal interface is called by odrefresh when spawned by composd.

Test: compos_cmd forced-compile-test
Bug: 199147668
Change-Id: Ie1561b7700cf633d7d5c8df68ff58797a8d8bced
2021-11-22 09:36:45 +00:00
Rajesh Nyamagoud
ce542660c9 Added sepolicy rule for vendor uuid mapping config
New type added in sepolicy to restrict Vendor defined uuid mapping
config file access to SecureElement.

Bug: b/180639372
Test: Run OMAPI CTS and VTS tests
Change-Id: I81d715fa5d5a72c893c529eb542ce62747afcd03
2021-11-20 01:08:11 +00:00
Rajesh Nyamagoud
453dcf6752 Support for OMAPI Vendor stable interface
Label defined for OMAPI Vendor Stable Interface

Bug: b/180639372
Test: Run OMAPI CTS and VTS tests
Change-Id: Ifa67a22c85ffb38cb377a6e347b0e1f18af1d0f8
2021-11-20 01:05:07 +00:00
Elliot Sisteron
6703102c79 Mark safety_center_service as app_api_service in SELinux Policy.
This is to make the SafetyCenterManager usable in CTS tests.
Test: SafetyCenterManager CTS test in ag/16284943
Bug: 203098016

Change-Id: I28a42da32f1f7f93c45294c7e984e6d1fd2cdd8d
2021-11-20 00:14:50 +00:00
Treehugger Robot
5d0c815440 Merge "recovery init domain_trans to health HAL." am: d6c57bb99d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1893225

Change-Id: Iceea98db985774fff86dd6b8dec325b0de0e57c9
2021-11-20 00:09:03 +00:00
Yuntao Xu
ad7db61293 Merge "Split property/file/service contexts modules" am: 9fcf271f71
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1895249

Change-Id: Ied1686d81722a21c2288b70f9e11ed6638b72a50
2021-11-20 00:08:48 +00:00
Akilesh Kailash
8a9ec2a496 New property to control virtual a/b user-space snapshots
Bug: 193863443
Test: OTA on pixel
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I89e5d105071c2529c9ceb661c04588ff88ffdd76
2021-11-19 23:35:32 +00:00