Commit graph

16023 commits

Author SHA1 Message Date
Wale Ogunwale
c1ebd93528 Added sepolicy for uri_grants service
am: 3280985971

Change-Id: I17244cba89aa30d1fa560648f618e21d320ed87c
2018-07-23 17:36:57 -07:00
Wale Ogunwale
3280985971 Added sepolicy for uri_grants service
Bug: 80414790
Test: boots
Change-Id: I15233721fa138e0fdf1a30f66d52b64cbab18b81
2018-07-23 15:31:40 -07:00
Tri Vo
f832f2149d 28 mapping workaround for devices upgrading to P.
am: 0cc68ea0b2

Change-Id: Ie3d39420403eaba08ccfd2c3f3fb42a9594f07e6
2018-07-22 19:27:05 -07:00
Tri Vo
0cc68ea0b2 28 mapping workaround for devices upgrading to P.
Bug: 72458734
Test: Compile current system sepolicy with P vendor sepolicy
Test: Plug in a P device then do:
m selinux_policy
cp $OUT/system/etc/selinux/plat_sepolicy.cil  plat_sepolicy.cil
cp $ANDROID_BUILD_TOP/system/sepolicy/private/compat/28.0/28.0.cil 28.0.cil
adb pull /vendor/etc/selinux/plat_pub_versioned.cil
adb pull /vendor/etc/selinux/vendor_sepolicy.cil
secilc plat_sepolicy.cil -m -M true -G -N -c 30 28.0.cil \
plat_pub_versioned.cil vendor_sepolicy.cil
Change-Id: I399b3a204eb94bee0ba1b5024b1c3463219c678e
2018-07-20 15:19:36 -07:00
Alan Stokes
95b223b46f Merge "Re-order rules to match AOSP." into stage-aosp-master 2018-07-20 14:37:53 +00:00
Alan Stokes
a55f637a3d Temporarily add auditing of execmod by apps.
am: 708aa90dd2

Change-Id: I4a0fdea7adead3baceb089644ed37a0c479d2e62
2018-07-20 06:52:41 -07:00
Alan Stokes
c2aad29d05 Re-order rules to match AOSP.
This is to avoid merge problems if we make any further changes in AOSP.

Test: Builds.
Change-Id: Ib4193d31c02dda300513f82f6c7426a2e81d8111
2018-07-20 13:32:30 +00:00
Alan Stokes
708aa90dd2 Temporarily add auditing of execmod by apps.
This is so we can get data on which apps are actually doing this.

Bug: 111544476
Test: Device boots. No audits seen on test device.
Change-Id: I5f72200ed8606775904d353c4d3d790373fe7dea
2018-07-20 12:40:29 +01:00
Tri Vo
6c32e0624f Merge "Add mapping files for 28.0.[ignore.]cil"
am: 13e60ed1fa

Change-Id: I5b19874975830ddcb2765851544eebc9848d3df4
2018-07-19 18:03:05 -07:00
Tri Vo
13e60ed1fa Merge "Add mapping files for 28.0.[ignore.]cil" 2018-07-20 00:56:27 +00:00
Jae Shin
1fa9634896 Add mapping files for 28.0.[ignore.]cil
Steps taken to produce the mapping files:

1. Add prebuilts/api/28.0/[plat_pub_versioned.cil|vendor_sepolicy.cil]
from the /vendor/etc/selinux/[plat_pub_versioned.cil|vendor_sepolicy.cil]
files built on pi-dev with lunch target aosp_arm64-eng

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

This change also enables treble_sepolicy_tests_28.0 and install 28.0.cil
mapping onto the device.

Bug: 72458734
Test: m selinux_policy
Change-Id: I90e17c0b43af436da4b62c16179c198b5c74002c
2018-07-18 20:08:38 -07:00
TreeHugger Robot
39f114d79d Merge changes from topic "selinux_cherry_picks" into stage-aosp-master
* changes:
  remove thermalcallback_hwservice
  reorder api 27 compat entries for removed types to match AOSP
2018-07-19 00:21:31 +00:00
Jeff Vander Stoep
7f6087c972 app: exempt su from auditallow statement
am: f95bf194c1

Change-Id: Idcdcb03b7764a6f0f3a7dd2d3110ed5f7166b772
2018-07-18 16:21:00 -07:00
Todd Poynor
c3e9ff90d3 remove thermalcallback_hwservice
This hwservice isn't registered with hwservicemanager but rather passed
to the thermal hal, so it doesn't need sepolicy associated with it to
do so.

Test: manual: boot, inspect logs
Test: VtsHalThermalV1_1TargetTest
Bug: 109802374
Change-Id: Ifb727572bf8eebddc58deba6c0ce513008e01861
Merged-In: Ifb727572bf8eebddc58deba6c0ce513008e01861
(cherry picked from commit c6afcb7fc0)
2018-07-18 16:18:50 -07:00
Todd Poynor
d1ff81c2a7 reorder api 27 compat entries for removed types to match AOSP
Avoids subsequent merge conflicts in this section of the file.

Test: manual: compile
Change-Id: I9af723dccff54039031dc4d8f3e5ee34be5960d1
Merged-In: I9af723dccff54039031dc4d8f3e5ee34be5960d1
(cherry picked from commit 6682530515)
2018-07-18 16:17:40 -07:00
Jeff Vander Stoep
f95bf194c1 app: exempt su from auditallow statement
Cut down on logspam during kernel_net_tests

Test: /data/nativetest64/kernel_net_tests/kernel_net_tests
Change-Id: Id19f50caebc09711f80b7d5f9d87be103898dd9a
2018-07-18 21:21:46 +00:00
Tri Vo
690de22d48 resolve merge conflicts of d07ab2fe93 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I58fff9dc7826eb60520b087d08ecd931cba63bf0
2018-07-18 13:08:55 -07:00
Tri Vo
d07ab2fe93 Merge "Add 28.0 prebuilts" 2018-07-18 18:31:23 +00:00
Steven Thomas
4b3ec1984e Merge "Selinux changes for vr flinger vsync service"
am: 663a827b47

Change-Id: Icc345eda8c645065cc30f14fe4d3de07ba888c25
2018-07-17 16:21:34 -07:00
Treehugger Robot
663a827b47 Merge "Selinux changes for vr flinger vsync service" 2018-07-17 23:15:13 +00:00
Tri Vo
afdfeeb506 Add 28.0 prebuilts
Bug: n/a
Test: n/a
Change-Id: I11e6baaa45bcb01603fc06e8a16002727f4e5a00
2018-07-17 15:31:47 -07:00
Josh Gao
98545f075c system_server: allow appending to debuggerd -j pipe.
am: 5ca755e05e

Change-Id: I92b326f5f1c9f1db083c329ecc8eca952039dc06
2018-07-17 15:25:36 -07:00
Josh Gao
5ca755e05e system_server: allow appending to debuggerd -j pipe.
Test: debuggerd -j `pidof system_server`
Change-Id: I6cca98b20ab5a135305b91cbb7c0fe7b57872bd3
2018-07-17 12:46:01 -07:00
Yifan Hong
65c568d0dd perfprofd: talk to health HAL.
Test: perfprofd tests
Bug: 110890430
Change-Id: I0f7476d76b8d35b6b48fe6b77544ca8ccc71534d
2018-07-17 11:37:26 -07:00
Steven Thomas
7bec967402 Selinux changes for vr flinger vsync service
Add selinux policy for the new Binder-based vr flinger vsync service.

Bug: 72890037

Test: - Manually confirmed that I can't bind to the new vsync service
from a normal Android application, and system processes (other than
vr_hwc) are prevented from connecting by selinux.

- Confirmed the CTS test
  android.security.cts.SELinuxHostTest#testAospServiceContexts, when
  built from the local source tree with this CL applied, passes.

- Confirmed the CTS test
  android.cts.security.SELinuxNeverallowRulesTest#testNeverallowRules521,
  when built from the local source tree with this CL applied, passes.

Change-Id: Ib7a6bfcb1c2ebe1051f3accc18b481be1b188b06
2018-07-13 17:17:01 -07:00
Yifan Hong
c74c0fbb34 Merge changes from topic "coredomain_batteryinfo"
am: 6397d7e0cb

Change-Id: I88c793acd19ce05e275d6f2883f90540f37d52b6
2018-07-13 12:42:47 -07:00
Treehugger Robot
6397d7e0cb Merge changes from topic "coredomain_batteryinfo"
* changes:
  vold: not allowed to read sysfs_batteryinfo
  full_treble: coredomain must not have access to sysfs_batteryinfo
2018-07-13 18:42:32 +00:00
Yifan Hong
711908e60b vold: not allowed to read sysfs_batteryinfo
It doesn't need to read batteryinfo to function properly.
Bug: 110891415
Test: builds and boots

Change-Id: I7f388180a25101bfd0c088291ef03a9bf8ba2b2c
2018-07-12 11:45:28 -07:00
Yifan Hong
b5f7f28c26 full_treble: coredomain must not have access to sysfs_batteryinfo
... but should do it via health HAL and healthd.

Bug: 110891415
Test: builds
Change-Id: Ib124f82d31f1dfbe99a56475dba04a37f81bdca3
2018-07-12 11:45:28 -07:00
Aalique Grahame
5626ee67a9 Merge "sepolicy: create rules for system properties"
am: 280c6afab2

Change-Id: I879d46d8e004a4ea63c1b131cdb5348e90adca0d
2018-07-10 21:40:58 -07:00
Treehugger Robot
280c6afab2 Merge "sepolicy: create rules for system properties" 2018-07-11 04:36:36 +00:00
Florian Mayer
139bb3f279 Merge "Allow to read events/header_page with debugfs_tracing"
am: 7d7328b807

Change-Id: I6bd14e069dd07b81b6cf33cfe8dd22e641d8f1f9
2018-07-10 21:35:06 -07:00
Treehugger Robot
7d7328b807 Merge "Allow to read events/header_page with debugfs_tracing" 2018-07-11 04:28:23 +00:00
Aalique Grahame
2fc89a71f7 sepolicy: create rules for system properties
Add new sepolicy rules to support audio system properties

Bug: 110564278
Change-Id: If774a40b50e56f9e83bcb4ab8a84581dc03058ad
2018-07-03 08:54:04 -07:00
Anton Hansson
72a3251989 Merge "Split selinux_policy module into two."
am: 43a0a8e10c

Change-Id: Iba96f0b88256b7549eb1278bdf87e65bca041594
2018-07-03 06:27:44 -07:00
Anton Hansson
43a0a8e10c Merge "Split selinux_policy module into two." 2018-07-03 13:19:35 +00:00
Anton Hansson
8cfe1e6128 Split selinux_policy module into two.
Create one _system and one _nonsystem target, which together contains
the same artifacts as before, just split by whether they go on the
system partition or not.

The product build hierarchy is being refactored to be split by
partition, so these targets facilitate inclusion of just the
system parts where necessary. Also keep the selinux_policy target
around for products that don't need the split.

Bug: 80410283
Test: for t in eng userdebug user; do lunch mainline_arm64-${t}; m nothing; done
Test: verified walleye /system and /vendor identical before and after, via:
Test: /google/data/rw/users/cc/ccross/bin/compare-target-files.sh P6259983 walleye-userdebug "SYSTEM/*" "VENDOR/*"
Test: only diffs are in build.prop files (timestamps and the like)

Change-Id: I0f5d8a1558a164ce5cfb7d521f34b431855ac260
2018-07-03 14:04:20 +01:00
Florian Mayer
a62ce04a8c Allow to read events/header_page with debugfs_tracing
Bug: 110900684
Change-Id: I9fd141e0d56d0135c563467b7ca2f08b6af6700b`
2018-07-03 09:36:42 +00:00
Bowgo Tsai
dc7e8d3de5 Merge "Sepolicy for rw mount point for product extensions."
am: 589dbe1429

Change-Id: Ife838a971f7145583d2d1444a2c366515060e5a4
2018-07-02 19:03:52 -07:00
Pawin Vongmasa
35f9e08bcd Merge "Allow surfaceflinger to call into mediacodec"
am: 48f1c4ce22

Change-Id: I9362732c00cf9daf4b68f30885664a000dd0f3b8
2018-07-02 19:03:07 -07:00
Treehugger Robot
589dbe1429 Merge "Sepolicy for rw mount point for product extensions." 2018-07-03 00:21:01 +00:00
Treehugger Robot
48f1c4ce22 Merge "Allow surfaceflinger to call into mediacodec" 2018-07-03 00:19:50 +00:00
Yabin Cui
ca685e9e91 Merge "Export more files in proc_perf."
am: 74f86551af

Change-Id: I16f29c89431a5ca4ac604869e21cd8312bd37f9e
2018-07-02 15:18:49 -07:00
Yabin Cui
74f86551af Merge "Export more files in proc_perf." 2018-07-02 22:12:03 +00:00
Yongqin Liu
29ed5f16ed public/netd.te: allow netd to operate icmp_socket that passed to it
am: 8a8d4ef532

Change-Id: Ib48576d7f47811870661e0bb66cebad0f26a6782
2018-07-02 14:55:41 -07:00
Yabin Cui
09464811ca Export more files in proc_perf.
Export /proc/sys/kernel/perf_cpu_time_max_percent and
/proc/sys/kernel/perf_event_mlock_kb in proc_perf. So
they can be read in shell and written by init.

This is needed by simpleperf to control cpu percent and
memory used for profiling.

Bug: 110706031
Test: build and boot hikey960 successfully.

Change-Id: I2a01f583508003ab73427bab30a7982a27dfa677
2018-07-02 11:39:40 -07:00
Yongqin Liu
8a8d4ef532 public/netd.te: allow netd to operate icmp_socket that passed to it
This should be supplement for the change here:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/708638

When test the cts libcore.libcore.io.OsTest#test_socketPing test case, it will fail
with avc denial message like following:

[ 1906.617027] type=1400 audit(1530527518.195:10496): avc: denied { read write } for comm="netd" path="socket:[32066]" dev="sockfs" ino=32066 scontext=u:r:netd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=icmp_socket permissive=1
[ 1906.617189] type=1400 audit(1530527518.195:10496): avc: denied { read write } for comm="netd" path="socket:[32066]" dev="sockfs" ino=32066 scontext=u:r:netd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=icmp_socket permissive=1
[ 1906.617206] type=1400 audit(1530527518.195:10497): avc: denied { getopt } for comm="netd" lport=2 scontext=u:r:netd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=icmp_socket permissive=1
[ 1906.617313] type=1400 audit(1530527518.195:10497): avc: denied { getopt } for comm="netd" lport=2 scontext=u:r:netd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=icmp_socket permissive=1
[ 1906.617330] type=1400 audit(1530527518.195:10498): avc: denied { setopt } for comm="netd" lport=2 scontext=u:r:netd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=icmp_socket permissive=1
[ 1907.832425] type=1400 audit(1530527518.195:10498): avc: denied { setopt } for comm="netd" lport=2 scontext=u:r:netd:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=icmp_socket permissive=1

Test: run cts -m CtsLibcoreTestCases -t libcore.libcore.io.OsTest#test_socketPing

Change-Id: If41cb804292834b8994333f170d1f7f837bcd7df
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2018-07-02 18:34:18 +08:00
Pawin Vongmasa
ff2dccaf38 Allow surfaceflinger to call into mediacodec
Test: adb logcat | grep "Wrong interface type."

Bug: 77924251
Change-Id: Idf9d7ae6db0d41bb0c2f94b2183bfe23f0c21155
2018-07-01 19:04:03 -07:00
Todd Poynor
29e292e9d2 [automerger skipped] remove thermalcallback_hwservice
am: c6afcb7fc0  -s ours

Change-Id: I9c89b5179d68943f4e090fbd596b4cd4be68100f
2018-06-29 19:14:10 -07:00
Todd Poynor
c6afcb7fc0 remove thermalcallback_hwservice
This hwservice isn't registered with hwservicemanager but rather passed
to the thermal hal, so it doesn't need sepolicy associated with it to
do so.

Test: manual: boot, inspect logs
Test: VtsHalThermalV1_1TargetTest
Bug: 109802374
Change-Id: Ifb727572bf8eebddc58deba6c0ce513008e01861
Merged-In: Ifb727572bf8eebddc58deba6c0ce513008e01861
2018-06-29 23:01:43 +00:00