Commit graph

24205 commits

Author SHA1 Message Date
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
Yifan Hong
f74fa29aed Merge "Correct labels on files / props in vendor_dlkm." 2020-07-14 19:15:13 +00:00
Tom Cherry
d45249e4a9 add logd. as logd_prop
We already have ro.logd. and persist.logd. as logd_prop, but not
logd. so this change adds it.  New properties should be read-write by
default so logd. should be preferred to ro.logd.

Test: set logd.buffer_type appropriately.
Change-Id: I51ed19f0093a0302709116944153f37067814d08
2020-07-14 11:08:32 -07:00
Inseob Kim
792219e48d Allow charger to read minui properties
Failing to read minui properties causes charger crash.

Bug: N/A
Test: enter charger mode with blueline
Change-Id: Ic174cd1116edd510499836ab42675d6fabc63324
2020-07-14 18:06:54 +09:00
Inseob Kim
1ef68a4852 Merge "Add charger related property contexts" 2020-07-14 07:07:38 +00:00
Ken Chen
e49acfa33b Add dontaudit statement to suppress denials
A few netd avc denials are observed. Supress audit messages since they
don't cause a problem.

Bug: 77870037
Test: build, flash, boot
Change-Id: I019c5af62630fcd0a35e22c560b9043bba58f6f1
2020-07-14 09:49:06 +08:00
Alexander Mishkovets
abe9923ef5 Merge "Define sepolicy for locale filter property" 2020-07-13 16:06:00 +00:00
Jeff Vander Stoep
3e2b91d672 gmscore_app is attempting to access /dev/ashmem
This is not allowed for apps with targetSdkVersion>=Q.

Allow this failure until gmscore fixes.

Bug: 160984921
Test: build
Change-Id: I1e9f2af091b22eef2bc05ae1e571fb45dec05cfe
2020-07-13 14:57:52 +02:00
Inseob Kim
00a87e48d1 Merge "Add tombstone_config_prop and move related prop" 2020-07-10 11:48:05 +00:00
Jeffrey Vander Stoep
771376b7e2 Merge "netd: suppress dir write to /system" 2020-07-10 09:47:12 +00:00
Jeff Vander Stoep
f8155a0c34 netd: suppress dir write to /system
avc:  denied  { write } for  pid=661
comm="iptables-restor" name="etc" dev="overlay" ino=55668
scontext=u:r:netd:s0 tcontext=u:object_r:system_file:s0 tclass=dir
permissive=0

Occurs after an adb remount and running netd unit tests.

Bug: 160562747
Test: build tests
Change-Id: I4c8ea7ef8d00e214bf0dab1496a6b8dcc449f59e
2020-07-10 09:12:00 +02:00
Inseob Kim
8ef4792f01 Add charger related property contexts
ro.enable_boot_charger_mode and sys.boot_from_charger_mode are moved to
new property contexts for charger props to remove exported*_prop.

Bug: 155844385
Test: boot device with ro.enable_boot_charger_mode
Change-Id: I17d195d3c9c002a42125d46a5efcdb890f1c2a5c
2020-07-10 14:15:15 +09:00
Yifan Hong
85aba14765 Correct labels on files / props in vendor_dlkm.
All files under vendor_dlkm are tagged vendor_file.
All build props for vendor_dlkm are mapped as build_vendor_prop.

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

Bug: 154633114

Change-Id: Ie9dc26d948357767fec09aca645606310ad3425c
2020-07-09 15:02:00 -07:00
Alexander Mishkovets
f0be89be1d Define sepolicy for locale filter property
Bug: 154133013
Test: Manual
Change-Id: I28ae279e4fd47553fcf4ab9421944f552490b49f
2020-07-09 20:32:58 +02:00
Inseob Kim
881f8c6b2d Merge "Relabel media.recorder.show_manufacturer_and_model" 2020-07-08 08:18:48 +00:00
Inseob Kim
dddf6f561f Relabel media.recorder.show_manufacturer_and_model
To remove exported*_default_prop

Bug: 155844385
Test: capture video
Test: atest writerTest
Change-Id: I74223c8daa44acf0aba33bff31cfe21f6242f941
2020-07-08 15:32:57 +09:00
Treehugger Robot
f1d02d4230 Merge "simplify neverallowxperm for tun_device" 2020-07-08 04:33:34 +00:00
Inseob Kim
d702d3fae1 Merge "Add keyguard_config_prop for keyguard property" 2020-07-08 03:22:12 +00:00
Maciej Żenczykowski
e346fbc044 simplify neverallowxperm for tun_device
Test: builds, atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia92fc0b9a805763779a13cad6ad3137c9327ca61
2020-07-07 18:41:56 -07:00
Treehugger Robot
1786098e96 Merge "Add export of ro.hdmi.cec_device_types" 2020-07-07 21:51:53 +00:00
Treehugger Robot
7b4027a826 Merge "Update prebuilt/seapp_contexts" 2020-07-07 20:09:18 +00:00