Commit graph

16480 commits

Author SHA1 Message Date
Sudheer Shanka
f8990c95e0 Allow zygote to search sdcardfs dirs.
am: 684cdb6615

Change-Id: Ic2f5eb4f8c66143bb92135effc893aa7519b7b37
2018-10-09 10:32:49 -07:00
Howard Ro
e9e8d0163a Allow zygote to write to statsd and refactor
am: 98de322a03

Change-Id: I2c4b8f3fe83d9f21c7194d9aafd2654f48596320
2018-10-08 16:25:09 -07:00
Sudheer Shanka
684cdb6615 Allow zygote to search sdcardfs dirs.
Bug: 117440207
Bug: 111890351
Test: manual
Change-Id: Ie218dec3e4f0f5dbade6d1c4d28b259909664056
2018-10-08 16:21:03 -07:00
Howard Ro
98de322a03 Allow zygote to write to statsd and refactor
We plan on migrating MetricsLogger to write to statsd socket. So we need to
allow zygote, which writes to logd using MetricsLogger, to also be able
to statsd. We also re-locate some sepolicies to write to statsd socket
in their respective policy definitions.

Bug: 110537511
Test: no failure/violations observed
Change-Id: I21fd352a25ed946516f9a45ac3b5e9bf97b059bc
2018-10-08 13:48:28 -07:00
Tri Vo
7c96761e34 Merge "Unconditionally test mapping files."
am: dcd5b544a6

Change-Id: I15b0eb5bb07a6dff369b7b3f785affad1716794f
2018-10-08 12:39:03 -07:00
Treehugger Robot
dcd5b544a6 Merge "Unconditionally test mapping files." 2018-10-08 19:30:28 +00:00
Tri Vo
393ada790e asan: global read access to /system/asan.options
am: 93318192a0

Change-Id: I08b56ad2714f121b3f88bc545148e2b893d91325
2018-10-08 11:38:15 -07:00
Tri Vo
93318192a0 asan: global read access to /system/asan.options
Bug: 117178352
Test: no denials to /system/asan.options on asan walleye
Change-Id: I6042693afb926a22a3e2be79bd2a7ba062806143
2018-10-08 17:27:06 +00:00
Tri Vo
95cfd6904a Unconditionally test mapping files.
Part of an effort to remove Treble-specifics in the way be build
sepolicy.

Fixes: 64541653
Test: m selinux_policy for aosp_arm64
Change-Id: I9e42c720018674e7d3a6c47e01995401c4e748a7
2018-10-08 10:21:12 -07:00
Tri Vo
0ea9e36d28 Merge "Make persist.sys.locale public-readable."
am: 012c895602

Change-Id: Ia2e75a62e39ff08866e6d9c94470b41c0323709b
2018-10-08 10:07:13 -07:00
Tri Vo
012c895602 Merge "Make persist.sys.locale public-readable." 2018-10-08 16:53:24 +00:00
Mark Salyzyn
2ecacbf915 fs_mgr: add /mnt/scratch to possible overlayfs support directories
am: 1369dfcaad

Change-Id: I0ce24e8f3ba8609e851ea767ea4b4386d0963385
2018-10-08 09:28:38 -07:00
Mark Salyzyn
1369dfcaad fs_mgr: add /mnt/scratch to possible overlayfs support directories
A default set of options are available, but can override in a fstab
overlay entry with upperdir=, lowerdir= to the same mount point,
workdir=.  The default is a valid /mnt/scratch/overlay/
or /cache/overlay/ directory, with .../<mount_point>/upper and
.../<mount_point>/work, associated with each system partition
<mount_point>.

Test: manual
Bug: 109821005
Change-Id: I5662c01fad17d105665be065f6dcd7c3fdc40d95
2018-10-08 14:23:01 +00:00
Tri Vo
44005b4f2b Make persist.sys.locale public-readable.
Addresses this denial:
avc: denied { read } for comm="rild" name="u:object_r:system_prop:s0"
dev="tmpfs" ino=15811 scontext=u:r:rild:s0 tcontext=u:object_r:system_prop:s0
tclass=file permissive=0

Fixes: 77960261
Test: m selinux_policy
Change-Id: I341675a4cfc0acbb7ea98e2ed4bdb7f69afe09f7
2018-10-07 13:26:42 -07:00
Joel Galenson
b02dc1162e Merge "Add code to check for unescaped periods in file_contexts."
am: 0ab9b61370

Change-Id: I74ad72ea3307586f7ded8c68a0805d936c5bf8f9
2018-10-06 18:45:31 -07:00
Treehugger Robot
0ab9b61370 Merge "Add code to check for unescaped periods in file_contexts." 2018-10-07 01:33:31 +00:00
Joel Galenson
b5806c47c5 Add code to check for unescaped periods in file_contexts.
Test: Run script and find unescaped periods.
Change-Id: I35a4366aa576d5c6036d0dcfb068ca4e0f27fff9
2018-10-06 13:39:38 -07:00
Tri Vo
0842e7866d Merge "Remove ro.com.google.clientidbase from exported prop list."
am: d58fa3a140

Change-Id: I47d3c891f4a80a18e950c986c04fb9321f633d32
2018-10-05 18:30:34 -07:00
Tri Vo
d58fa3a140 Merge "Remove ro.com.google.clientidbase from exported prop list." 2018-10-06 01:13:03 +00:00
Tri Vo
716d8bd849 Remove ro.com.google.clientidbase from exported prop list.
This property is GMS-specific. It should be set from either /system or /product.
After this change ro.com.google.clientidbase will have default_prop type and
will only be settable from an .rc file.

This property now must be set from system or product images. In case of a
system-only OTA, the old vendor.img might attempt set this property. This will
trigger a denial which is innocuous since the new system.img will correctly set
the property.

Bug: 117348096
Test: walleye can still set ro.com.google.clientidbase
Change-Id: Id0873baecacb4168415b1598c35af1ecbb411e17
2018-10-05 17:58:41 -07:00
Joel Galenson
edf7a4b1e9 Ensure vold is a client of hal_bootctl only in Treble mode.
am: 2d123fce3c

Change-Id: Iae51bca2bdca6d858d4119dd9cd1abba76aa57e6
2018-10-05 14:43:24 -07:00
Joel Galenson
2d123fce3c Ensure vold is a client of hal_bootctl only in Treble mode.
This fixes a build breakage.

Test: Build policy.
Change-Id: Id5209a2bd6446ac6dd744b7426f540bc1a8641ed
2018-10-05 12:37:05 -07:00
Christine Franks
dd76f14229 Merge "Add system_api_service to color_display_service"
am: 12bbbc69a1

Change-Id: I4ee2c40f80b7e08ecc8ebfc0660e19181f64de6f
2018-10-05 08:47:11 -07:00
Christine Franks
12bbbc69a1 Merge "Add system_api_service to color_display_service" 2018-10-05 15:33:14 +00:00
Daniel Rosenberg
0de2497dcc Merge "Add bootctl for vold"
am: 3d7521c226

Change-Id: If981d57ff7ced96a0fc10ec0b1b04eafacb0b348
2018-10-04 18:47:56 -07:00
Daniel Rosenberg
3d7521c226 Merge "Add bootctl for vold" 2018-10-05 01:31:17 +00:00
Christine Franks
ce3e87c06a Add system_api_service to color_display_service
Bug: 111215474
Test: boots
Change-Id: Ib8cabeb64a8b4ec9f592d870bd0af611a2720cc7
2018-10-04 16:21:23 -07:00
Nick Kralevich
6723f5a0f5 Merge "Start enforcing /system file labeling"
am: 3e5054e8fa

Change-Id: Id3335512c5269e424ec78bdd4ea323641919f5ab
2018-10-04 15:15:05 -07:00
Treehugger Robot
3e5054e8fa Merge "Start enforcing /system file labeling" 2018-10-04 22:03:11 +00:00
Tri Vo
9b1943d9e6 combine_maps: only use python2
am: 2777d18c20

Change-Id: I32ff1a246cb229bd87cf7037aa5fbbc01ea001e1
2018-10-04 12:07:38 -07:00
Nick Kralevich
dab131b1f8 Start enforcing /system file labeling
system_file_type is an attribute assigned to all files on the /system
partition. Add a compile time test to ensure that the attribute is
assigned to all the relevant types.

Test: code compiles.
Change-Id: I7d69a04a4f04f6269cc408f25527b948756cc079
2018-10-04 11:24:00 -07:00
Tri Vo
2777d18c20 combine_maps: only use python2
python3 is not required on host machines.

Bug: 117260689
Test: m selinux_policy
Change-Id: Iea31eadcb3f09ffadca82dd1862cf5538259c710
2018-10-04 10:22:49 -07:00
Martijn Coenen
563e5b36e6 Add policy for apexd.
am: ac097ac4c7

Change-Id: Ic6958aa709f9b8253d15cef475864f845fc25715
2018-10-04 00:16:20 -07:00
Martijn Coenen
ac097ac4c7 Add policy for apexd.
apexd is a new daemon for managing APEX packages installed
on the device. It hosts a single binder service, "apexservice".

Bug: 112455435
Test: builds, binder service can be registered,
      apexes can be accessed, verified and mounted
Change-Id: I634ad100f10b2edcd9a9c0df0d33896fa5d4ed97
2018-10-04 07:06:45 +00:00
Tri Vo
bd8529a096 Merge "Only maintain maps between current and previous selinux versions."
am: d115b8ed24

Change-Id: Ia6a8419d469e7f4d04cf712f24c44b2d4fc756cd
2018-10-03 18:18:54 -07:00
Tri Vo
d115b8ed24 Merge "Only maintain maps between current and previous selinux versions." 2018-10-04 01:04:57 +00:00
Daniel Rosenberg
ac5293b4fb Add bootctl for vold
Allows checkpoint commands to check A/B update status

Test: vdc checkpoint startCheckpoint -1
Bug: 111020314
Change-Id: I086db548d55176bf88211001c7c1eecb8c50689e
2018-10-03 15:51:45 -07:00
Nick Kralevich
e62d7d1649 isolated_apps: no socket create
am: 8f08456a94

Change-Id: Iadacb3daf0047178275d18890fa89231526d9c8b
2018-10-03 15:07:11 -07:00
Nick Kralevich
8f08456a94 isolated_apps: no socket create
Isolated apps provide a very strict security guarantee, including the
inability to create networking sockets like TCP / UDP sockets. Add an
SELinux neverallow assertion to test for this and prevent regressions.

Test: policy compiles.
Change-Id: I2618abb17375707eb1048e89faa46f57d33e1df4
2018-10-02 21:43:20 -07:00
Tej Singh
330ad57629 Merge "Sepolicy for migrating storaged to statsd"
am: 7b785a9f5b

Change-Id: Ibd9008050fb810063bea4a83ce38779c0a858e77
2018-10-02 19:01:42 -07:00
Treehugger Robot
7b785a9f5b Merge "Sepolicy for migrating storaged to statsd" 2018-10-03 01:13:37 +00:00
Tri Vo
438684b39f Only maintain maps between current and previous selinux versions.
New maintenance scheme for mapping files:
Say, V is the current SELinux platform version, then at any point in time we
only maintain (V->V-1) mapping. (V->V-n) map is constructed from top (V->V-n+1)
and bottom (V-n+1->V-n) without changes to previously maintained mapping files.

Caveats:
- 26.0.cil doesn't technically represent 27.0->26.0 map, but rather
current->26.0. We'll fully migrate to the scheme with future releases.

Bug: 67510052
Test: adding new public type only requires changing the latest compat map
Change-Id: Iab5564e887ef2c8004cb493505dd56c6220c61f8
2018-10-02 15:10:13 -07:00
Howard Ro
b41dd1b54f Merge "Update sepolicies for stats hal"
am: aabee5fe5f

Change-Id: Ib271b23881eeff75f62613054714a11e8d67dc44
2018-10-02 14:06:31 -07:00
Howard Ro
aabee5fe5f Merge "Update sepolicies for stats hal" 2018-10-02 20:17:18 +00:00
Tri Vo
f5976f5490 Merge "Address TODOs in 28.0.cil mapping."
am: 0dd4167e2d

Change-Id: Id7b5dcbc37f69b4349f2aff96fb936feaef83798
2018-10-01 17:06:20 -07:00
Treehugger Robot
0dd4167e2d Merge "Address TODOs in 28.0.cil mapping." 2018-10-01 23:46:45 +00:00
Tri Vo
e4ab2cd286 Fix incorrect 27.0 mappings.
am: f509e02ddb

Change-Id: I6c9dc4a97b4f3c93b458452af7d1dcbd4ae84f6e
2018-10-01 16:13:27 -07:00
Tri Vo
4438339417 Address TODOs in 28.0.cil mapping.
Test: m selinux_policy
Change-Id: I6a8ff2200c82b6ecdc1404bc7cf186f439950a30
2018-10-01 14:32:05 -07:00
Tri Vo
f509e02ddb Fix incorrect 27.0 mappings.
Map proc_qtaguid_ctrl to qtaguid_proc, not qtaguid_device.
Map proc_slabinfo to proc in the correct place.

Test: m selinux_policy
Change-Id: I37c9dfe40bd20924215856b5d4ff7d9b3cbd0417
2018-10-01 13:46:50 -07:00
Jeff Vander Stoep
356900c73f Remove access to /proc/net/{tcp,udp}
am: 424517721c

Change-Id: Ie0278a2d0777f312a622e0243625c47ed4a38cf6
2018-10-01 06:53:09 -07:00