Commit graph

24225 commits

Author SHA1 Message Date
Treehugger Robot
142d16a964 Merge "Allow dumpstate to dump auto hal servers" 2020-08-04 17:28:41 +00:00
Jooyung Han
45c59f1d15 Merge "Allow linkerconfig to read apex-info-file.xml" 2020-08-04 03:11:49 +00:00
Danning Chen
3ecbc38868 Merge "Add sepolicy for people service" 2020-08-03 18:54:31 +00:00
Inseob Kim
4ae7ec1915 Remove exported3_radio_prop
It's renamed to radio_control_prop

Bug: 162214733
Test: boot
Change-Id: Idede1a1ab471a354a6f5df12b6889abc7c1ad869
2020-08-03 09:23:39 +00:00
Inseob Kim
acd02fc5e4 Rename exported3_radio_prop to radio_control_prop
The context name exported3_radio_prop is ambiguous and does not reflect
the usage and role of the properties. This changes its name to
radio_control_prop.

Some downstream branches are still using exported3_radio_prop, so
get_prop(domain, radio_control_prop) is added to avoid regression. It's
just a workaround and to be removed soon, after all exported3_radio_prop
are cleaned up.

Bug: 162214733
Test: boot a device with a sim and see basic functions work
Change-Id: If5fe3be7c64b36435c4ad0dc9a8089077295d502
Merged-In: If5fe3be7c64b36435c4ad0dc9a8089077295d502
2020-08-03 09:23:02 +00:00
Treehugger Robot
2da4fe7673 Merge "Allow dumpstate to getattr apex_info_file:file" 2020-07-31 21:46:01 +00:00
Treehugger Robot
9892a59ca6 Merge "Allow dumpstate to dump hal_light" 2020-07-31 21:44:39 +00:00
Danning Chen
134ac19776 Add sepolicy for people service
This is to allow people service to publish a binder service that expose
system private APIs to retrive and manage the recent cached
conversations.

Test: build and run on a test device
Bug: 162593584
Change-Id: I31b5d8bc851ea7225e215b3f86ed6d47b32b1ba4
2020-07-31 14:37:47 -07:00
Roman Kiryanov
b76d0b3060 Allow dumpstate to getattr apex_info_file:file
required by the CTS test.

Bug: 162594434
Test: atest android.security.cts.SELinuxHostTest#testNoBugreportDenials
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Ic9962415d740e300ceb418b3265c24433a9e4f4c
2020-07-31 13:39:11 -07:00
Roman Kiryanov
83b88d5d61 Allow dumpstate to dump hal_light
Bug: 162594434
Test: atest android.security.cts.SELinuxHostTest#testNoBugreportDenials
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I440b5627abe0127324679fcb54bc52a68c44bea4
2020-07-31 13:37:59 -07:00
Jeff Sharkey
a0e7a6da28 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: I0caf39b349c48e44123775d98c52a773b0b504ff
2020-07-31 12:28:11 -06:00
Yiming Jing
2fd322f630 Allow dumpstate to dump auto hal servers
audiocontrol_hal, vehicle_hal and evs_hal were added to dump_util.cpp in
b/148098383. But the coresponding dumpstate.te is not updated to relfect
the changes, causing denials when dumpstate attempts to dump auto hal servers.

This CL updates dumpstate.te to allow dumpstate to access auto hal servers.

Bug: 162537916
Test: sesearch -A -s dumpstate -t hal_audiocontrol_server -p signal sepolicy
Test: sesearch -A -s dumpstate -t hal_vehicle_server -p signal sepolicy
Test: sesearch -A -s dumpstate -t hal_evs_server -p signal sepolicy
Change-Id: If6d6e4d9c547da17817f2668dc4f2a093bddd632
2020-07-31 10:19:22 -07:00
Wei Wang
bbc3cc33fc label cpuhp trace points
Bug: 162568440
Test: Build
Change-Id: Id8ed398b3fffd678fff253289674f8e2b9e906c1
2020-07-31 01:20:57 -07:00
Treehugger Robot
a9e195943c Merge "Allow vendor_init to set service.adb.tcp.port" 2020-07-31 04:54:38 +00:00
Jooyung Han
86f2284fcd Allow linkerconfig to read apex-info-file.xml
Linkerconfig reads apex-info-list.xml to distinguish vendor apexes.

Bug: 159576928
Test: build & device boots
Change-Id: I1b791f9c03bbdfa5258eea5e7cb0896168beb114
2020-07-30 01:11:15 +09:00
Tom Cherry
c0dd641a80 Merge "Allow logd to set logd_prop" 2020-07-29 14:38:57 +00:00
Nathalie Le Clair
5a1b882e56 Merge "Add ro.hdmi.cec.source.send_standby_on_sleep" 2020-07-29 08:10:04 +00:00
Tom Cherry
9949bba70a Allow logd to set logd_prop
Test: logd sets ro.logd.kernel successfully
Change-Id: Ia0afd81627f344f525ac1e26028181f41084485d
2020-07-28 11:26:01 -07:00
Nathalie Le Clair
8f443b82c8 Add ro.hdmi.cec.source.send_standby_on_sleep
Bug: 161205654
Test: manually tested that system property takes effect.

Change-Id: I0e6eb8048f05de91d96680ff1a64ce142a2f5c94
2020-07-28 09:17:36 +02:00
Hongguang Chen
67c3688497 Allow vendor_init to set service.adb.tcp.port
adbd and apps (SystemUI and CTS test apps) need to read it.

BUG: 162205386
Test: Connect to device which sets service.adb.tcp.port in vendor
      partition through TCP adb.

Change-Id: Ia37dd0dd3239381feb2a4484179a0c7847166b29
2020-07-28 02:13:03 +00:00
Joel Galenson
b0d74a1f5b Update sepolicy to use inclusive language
See https://source.android.com/setup/contribute/respectful-code for reference

#inclusivefixit

Bug: 161896447
Test: Build
Change-Id: If612f2270c8ba1d7fc2cbda3b2e8ca3818c0a1be
2020-07-27 16:52:04 +00:00
Inseob Kim
c66c822416 Merge "Remove exported2_default_prop" 2020-07-27 06:02:50 +00:00
Wei Wang
998bc373d5 Allow init.svc.bugreportd to be vendor readable
Export the new bugreport entry which was added in b/111441001, similarly
to previously exported properties.

Bug: 161999587
Test: m selinux_policy
Change-Id: I139567ba028e90d3e07df94f57ccf7d5d5225209
2020-07-26 22:20:12 -07:00
Inseob Kim
40c67b20f6 Remove exported2_default_prop
This cleans up remaining exported2_default_prop. Three properties are
changed.

- ro.arch
It becomes build_prop.

- hal.instrumentation.enable
It becomes hal_instrumentation_prop.

- ro.property_service.version
It becomes property_service_version_prop.

Bug: 155844385
Test: selinux denial test on Pixel devices
Change-Id: I7ee0bd8c522cc09ee82ef89e6a13bbbf65291291
2020-07-25 01:06:13 +09:00
Inseob Kim
bd13f1fefc Merge "Move ro.boot related properties to bootloader_prop" 2020-07-24 14:54:18 +00:00
Inseob Kim
68d6146fc5 Move ro.boot related properties to bootloader_prop
These 5 properties are all set by property_service, and their values are
same as ro.boot.X.

Bug: 155844385
Test: m selinux_policy
Change-Id: I98fdee73684dc670f61ecef83d6a749b4f24ff54
Merged-In: I98fdee73684dc670f61ecef83d6a749b4f24ff54
2020-07-24 12:58:52 +00:00
Treehugger Robot
3f2236042a Merge "Add dependencies on M4" 2020-07-24 09:19:38 +00:00
Dan Willemsen
081b164ad2 Add dependencies on M4
Most of the users already added dependencies when it was used, but a
couple didn't. These broken when I converted $(M4) into a built
artifact, as the artifact wasn't created before use.

Test: treehugger
Change-Id: Ic5c18131de84747e8b96413f61993fa777cb9d2c
2020-07-23 18:00:47 -07:00
Inseob Kim
8c34247c7f Add bootloader_prop for ro.boot. properties
ro.boot. properties assigned as "exported2_default_prop" are now
"bootloader_prop", to remove bad context name "exported2_default_prop".

Two things to clarify:

1) We have both the prefix entry and the exact entries. Although the
exact entries may be redundant, we may want to keep them. Vendors are
still allowed to have properties starting with "ro.boot." on
vendor_property_contexts file. The exact entries can prevent vendors
from modifying them to random contexts.

2) ro.boot. is special as it is originally for kernel command line
"androidboot.". But some ro.boot. properties are being used as if they
were normal. To avoid regression, ro.boot. properties having contexts
other than "exported2_default_prop" are not changed here. They will be
tracked later.

Bug: 155844385
Test: m selinux_policy
Change-Id: Ic0f4117ae68a828787304187457b5e1e105a52c7
Merged-In: Ic0f4117ae68a828787304187457b5e1e105a52c7
2020-07-24 00:15:23 +00:00
Alan Stokes
bd397a14b4 Merge "Make cross-user apps mlstrustedsubject." 2020-07-23 08:35:43 +00:00
Inseob Kim
79bd33a8d5 Allow init.svc.statsd to be world readable
Instead of having hacky entry "init.svc." in vendor's sepolicy, this
adds init.svc.statsd explicitly which should be readable by CTS.

Bug: 161922998
Test: m selinux_policy
Change-Id: I3fd3bab40d2ccf2581bd7ab55894a693cdf446b2
Merged-In: I3fd3bab40d2ccf2581bd7ab55894a693cdf446b2
(cherry picked from commit 116190b004)
2020-07-23 12:37:33 +09:00
Alan Stokes
81e4e877f3 Make cross-user apps mlstrustedsubject.
We have various apps which inherently work across all users,
configured in seapp_contexts with levelFrom=None (usually implicitly).

This change marks those apps, where they have private data files, as
mlstrustedsubject, to allow us to increase restrictions on cross-user
access without breaking them.

Currently these apps are granted full access to [priv_]app__data_file
via TE rules, but are blocked from calling open (etc) by mls rules
(they don't have a matching level).

This CL changes things round so they are granted access by mls, but
blocked from calling open by TE rules; the overall effect is thus the
same - they do not have access.

A neverallow rule is added to ensure this remains true.

Note that there are various vendor apps which are appdomain,
levelFrom=None; they will also need modified policy.

Test: builds, boots, no new denials.
Bug: 141677108

Change-Id: Ic14f24ec6e8cbfda7a775adf0c350b406d3a197e
2020-07-22 14:41:31 +01:00
Inseob Kim
387fb44648 Fix init.svc. property contexts entry
It should be prefix, not exact

Bug: N/A
Test: see selinux contexts of init.svc. properties
Change-Id: I3fd71c80f752773b784ddb1d7bfa9ab1854d281f
2020-07-22 19:14:56 +09:00
Inseob Kim
162b259fed Remove exported3_default_prop
Bug: 155844385
Test: m selinux_policy
Change-Id: Ib0dc95ca2a90545286583c157d3570225ae35602
2020-07-21 04:16:04 +00:00
Inseob Kim
c97a97cd3f Move more properties out of exported3_default_prop
This is to remove exported3_default_prop. Contexts of these properties
are changed.

- ro.boot.wificountrycode
This becomes wifi_config_prop

- ro.opengles.version
This becomes graphics_config_prop. Also it's read by various domains, so
graphics_config_prop is now readable from coredomain.

- persist.config.calibration_fac
This becomes camera_calibration_prop. It's only readable by appdomain.

Bug: 155844385
Test: no denials on Pixel devices
Test: connect wifi
Change-Id: If2b6c10fa124e29d1612a8f94ae18b223849e2a9
2020-07-21 13:11:57 +09:00
Inseob Kim
c80b024241 Relabel various exported3_default_prop
This removes bad context names "exported*_prop". Property contexts of
following properties are changed. All properties are settable only by
vendor-init.

- ro.config.per_app_memcg
This becomes lmkd_config_prop.

- ro.zygote
This becomes dalvik_config_prop.

- ro.oem_unlock_supported
This becomes oem_unlock_prop. It's readable by system_app which includes
Settings apps.

- ro.storage_manager.enabled
This becomes storagemanagr_config_prop. It's readable by coredomain.
Various domains in coredomain seem to read it.

- sendbug.preferred.domain
This bcomes sendbug_config_prop. It's readable by appdomain.

There are still 3 more exported3_default_prop, which are going to be
tracked individually.

Bug: 155844385
Test: selinux denial check on Pixel devices
Change-Id: I340c903ca7bda98a92d0f157c65f6833ed00df05
2020-07-20 16:11:58 +09:00
Inseob Kim
e50027bc57 Merge "Add wifi_hal_prop and remove exported_wifi_prop" 2020-07-20 01:17:51 +00:00
Yifan Hong
8917f7996f Merge changes from topic "odm_dlkm"
* changes:
  Correct labels on files / props in odm_dlkm.
  Fix path for vendor_dlkm build prop.
2020-07-17 22:05:26 +00:00
Amy Zhang
ce67a16be1 Merge "Add Tuner HAL 1.1 service into the default tuner domain" 2020-07-17 18:16:30 +00:00
Inseob Kim
3dbf3d8ac8 Add wifi_hal_prop and remove exported_wifi_prop
To remove bad context names "exported*_prop"

Bug: 155844385
Test: boot and see no denials
Change-Id: Icd30be64355699618735d4012461835eca8cd651
Merged-In: Icd30be64355699618735d4012461835eca8cd651
(cherry picked from commit 37c2d4d0c9)
(cherry picked from commit 3b66e9b9f8)
2020-07-17 17:38:13 +09:00
Inseob Kim
d2c0b7bf9e Remove redundant get_prop rule
The rule "get_prop(coredomain, vts_status_prop)" is duplicated by
mistake. It's already in coredomain.te, and it should be deleted from
app.te

Bug: N/A
Test: m selinux_policy
Change-Id: I816c8da74940fc6ccdd50fe377aa54eae36237b4
2020-07-16 16:10:57 +00:00
Inseob Kim
98fe6847bd Merge "Add property contexts for vts props" 2020-07-16 10:24:08 +00:00
Inseob Kim
212e2b621a Add property contexts for vts props
vts_config_prop and vts_status_prop are added to remove exported*_prop.
ro.vts.coverage becomes vts_config_prop, and vts.native_server.on
becomes vts_status_prop.

Bug: 155844385
Test: Run some vts and then getprop, e.g. atest \
      VtsHalAudioEffectV4_0TargetTest && adb shell getprop
Test: ro.vts.coverage is read without denials
Change-Id: Ic3532ef0ae7083db8d619d80e2b73249f87981ce
2020-07-16 16:26:17 +09:00
Amy Zhang
2e148351af Add Tuner HAL 1.1 service into the default tuner domain
Test: cuttlefish, atest VtsHalTvTunerV1_1TargetTest
Bug: b/159058358
Change-Id: I67fbfb29c3097953e6d30d17a8d40d586162088f
2020-07-15 18:25:48 -07:00
Yifan Hong
dc9c4561f5 Correct labels on files / props in odm_dlkm.
All files under odm_dlkm are tagged vendor_file.
All build props for odm_dlkm are mapped as build_vendor_prop.

Test: build and
    `ls /odm_dlkm -lZ`
    `adb shell getprop -Z | grep odm_dlkm`

Bug: 154633114

Change-Id: Ifca69d0b7a8da945910a9cb0fa907735cd866f12
2020-07-15 17:16:40 -07:00
Yifan Hong
850a231fa2 Fix path for vendor_dlkm build prop.
vendor_dlkm build props are loaded from /vendor_dlkm/etc/build.prop.
Test: none
Bug: 154633114

Change-Id: Ic96ebba2486c891fb05431265e477184353bd7d0
2020-07-15 17:16:40 -07:00
Tom Cherry
aed2a79fb5 Merge "add logd. as logd_prop" 2020-07-15 22:58:33 +00:00
Calin Juravle
de7244cf23 Fix sepolicy for secondary dex files
dexoptanalyzer need read access on the secondary
dex files and of the main apk files in order to successfully evaluate
and optimize them.

Example of denial:
audit(0.0:30): avc: denied { read } for
path="/data/app/~~Zux_isdY0NBkRWPp01oAVg==/com.example.secondaryrepro-wH9zezMSCzIjcKdIMtrw7A==/base.apk"
dev="vdc" ino=40966 scontext=u:r:dexoptanalyzer:s0
tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=0
app=com.example.secondaryrepro

Test: adb shell cmd package compile -r bg-dexopt --secondary-dex app
Bug: 160471235
Bug: 160351055
Change-Id: Id0bda5237d3ce1620d4f6ee89595836b4e1f3abf
2020-07-15 16:43:40 +00:00
Ken Chen
62f0a4d306 Merge "Add dontaudit statement to suppress denials" 2020-07-15 08:42:48 +00:00
Wei Wang
926145161a Allow thermal tracing in user build
Bug: 160818586
Test: Build and check label
Change-Id: I30b13af585daaf9a85f45ab3b41d0b5e060b4bf4
2020-07-14 23:43:09 +00:00