Commit graph

26955 commits

Author SHA1 Message Date
Chong Zhang
9aed64920f add mediatranscoding to apex file context
bug: 159172726
Change-Id: I8fbedab2605167af637108d5f564abf6c78c32bd
2020-12-09 14:26:14 -08:00
Treehugger Robot
34d974838e Merge "Update 30.0 prebuilts to latest rvc-dev policy" 2020-12-09 16:09:12 +00:00
Treehugger Robot
a56c9eb016 Merge "Allow PermissonController to find app_api_service and system_api_service." 2020-12-09 15:25:42 +00:00
Treehugger Robot
951fc0b044 Merge "drmserver: audit permissions for /data/app" 2020-12-09 12:38:06 +00:00
Inseob Kim
3b8b4251b7 Update 30.0 prebuilts to latest rvc-dev policy
For whatever reason, system/sepolicy/prebuilts/api/30.0 and rvc-dev's
system/sepolicy differ a little. This makes 30.0 prebuilts up-to-date
and also updates plat_pub_versioned.cil, built from aosp_arm64-eng
target on rvc-dev branch.

Bug: 168159977
Test: m selinux_policy
Change-Id: I03e8a40bf021966c32f0926972cc2a483458ce5b
2020-12-09 20:44:38 +09:00
Hai Zhang
86e10ef55d Allow PermissonController to find app_api_service and system_api_service.
PermissionController is updatable, so we may need to call new APIs in newer versions.

Change-Id: I0a6657ad1f27e1e2fdc320184268966009d3a4fc
2020-12-09 11:10:06 +00:00
Treehugger Robot
db87cdf6a8 Merge "system_app: remove adb data loader permissions" 2020-12-09 10:36:14 +00:00
Jeff Vander Stoep
5e6d60a2a5 drmserver: audit permissions for /data/app
We would like to assert that only PackageManager can make
modifications to /data/app. However, I first need to remove
some existing permissions that seem like they are no longer
used (as per jtinker@). Add audit statements to confirm.

Test: build
Change-Id: Ie5ec5199f7e2f862c4d16d8c86b9b0db6fbe481c
2020-12-09 09:16:51 +01:00
Jeff Vander Stoep
07aee66679 system_app: remove adb data loader permissions
Per schfan@ these are no longer needed.

Test: build
Change-Id: Idda1d9775fdd38cbd53c3652b567ddfc5beca0a6
2020-12-09 08:58:23 +01:00
Christian Wailes
93e6997181 Merge "Added permissions for new dexopt flags." 2020-12-09 00:00:26 +00:00
Maciej Żenczykowski
5a7e49e525 Allow network_stack to synchronize the kernel rcu
via opening/closing a PF_KEY socket (this mirrors netd's privs)

Bug: 173167302
Test: m
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia2c2cb52c4ec9149db29dc86a7927e3432bd2b9b
2020-12-08 14:49:20 +00:00
Chris Wailes
4540efcf73 Added permissions for new dexopt flags.
Bug: 173137187
Test: build
Merged-In: Iad1d23277915e1dbf655b0f2820320f15462ab33
Change-Id: Iad1d23277915e1dbf655b0f2820320f15462ab33
2020-12-07 16:15:24 -08:00
Adam Shih
2543715187 never allow untrusted apps accessing debugfs_tracing
debugfs_tracing can only be accessed by tracing tools provided by the
platform.

Bug: 172028429
Test: boot with no relevant log showing up
Change-Id: I412dd51a1b268061c5a972488b8bc4a0ee456601
2020-12-07 16:33:59 +08:00
Hai Zhang
04db97a72d Add SELinux policy for legacy permission service.
The updatable and non-updatable permission manager cannot share one
AIDL, so we need to create a new system service for the non-updatable
legacy one, and add the SELinux policy for it.

Bug: 158736025
Test: presubmit
Change-Id: Ief8da6335e5bfb17d915d707cf48f4a43332f6ae
2020-12-04 14:43:33 -08:00
Dmitri Plotnikov
5d23015a3d Merge "Add sched_process_free to debugfs_tracing label" 2020-12-04 18:05:11 +00:00
Jonglin Lee
7ce5e714e5 Merge "Revert "sepolicy: rules for uid/pid cgroups v2 hierarchy"" 2020-12-04 04:47:39 +00:00
Jonglin Lee
51c04ac27b Revert "sepolicy: rules for uid/pid cgroups v2 hierarchy"
Revert submission 1511692-cgroup v2 uid/pid hierarchy

Reason for revert: Causing intermittent cgroup kernel panics
Reverted Changes:
I80c2a069b:sepolicy: rules for uid/pid cgroups v2 hierarchy
I73f3e767d:libprocessgroup: uid/pid hierarchy for cgroup v2

Bug: 174776875
Change-Id: I63a03bb43d87c9aa564b1436a45fd5ec023aac87
Test: Locally reverted and booted 100 times without kernel panic
2020-12-04 03:12:59 +00:00
Kevin Chyn
9e8896ee4b Merge "Add SEPolicy for fingerprint2.2 example HAL" 2020-12-04 01:17:07 +00:00
Kiyoung Kim
34395349f8 Merge "Support linkerconfig in Runtime APEX" 2020-12-04 01:00:06 +00:00
Dmitri Plotnikov
c2d6e7e978 Add sched_process_free to debugfs_tracing label
Bug: 169279846
Test: atest bpf-time-in-state-tests
Test: verified that the time-in-state BPF prog still loads into
      the kernel with no errors and gets attached without errors
Change-Id: If74632ae6f72e0371fea844d4ba7bef9260d1bdb
2020-12-03 16:47:30 -08:00
Treehugger Robot
88eb862ab4 Merge "Use intermediates for sepolicy contexts tests" 2020-12-04 00:17:49 +00:00
Colin Cross
b67df1f259 Use intermediates for sepolicy contexts tests
Using the installed locations for the sepolicy contexts tests
causes checkbuilds to incorrectly install the files, and races
with the packaging rules to cause them to be non-deterministically
included in the final NOTICE files or images.  Use the intermediates
location instead.

Fixes: 174692639
Test: mmma system/sepolicy
Change-Id: Iea6869583b634f6018915934a1576fc283c106b2
2020-12-03 14:06:19 -08:00
Colin Cross
5fcbc0c472 Merge "Follow argument changes to RuleBuilder" 2020-12-03 20:07:30 +00:00
Nick Moukhine
63edb71f15 Amend sepolicy for music recognition service
Denial in cts tests prior to this change:
E/SELinux: avc:  denied  { find } for pid=20252 uid=10295 name=music_recognition scontext=u:r:untrusted_app:s0:c39,c257,c512,c768 tcontext=u:object_r:music_recognition_service:s0 tclass=service_manager permissive=0

Bug: 158194857
Test: patched and verified on internal master
Change-Id: Ia3ad66b12f8410b9be30941f2681f1bf4e50337e
2020-12-03 12:12:05 +01:00
Kevin Chyn
a492bf048d Add SEPolicy for fingerprint2.2 example HAL
Bug: 172957689
Test: atest CtsBiometricsTestCases
Change-Id: I0de92a880e4ca04765da3e3184e5ad0382dc958a
2020-12-03 01:11:30 -08:00
Alistair Delva
2bbf1cea1e Fix pid_max denials from dumpstate, incidentd
The dumpstate and incidentd contexts may call on to toybox tools like
"ps" and "top" which are now reading /proc/sys/kernel/pid_max.

Fixes denials like:

avc: denied { read } for comm="top" name="pid_max" dev="proc" ino=125433
scontext=u:r:incidentd:s0 tcontext=u:object_r:proc_pid_max:s0
tclass=file permissive=0

avc: denied { read } for comm="ps" name="pid_max" dev="proc" ino=125433
scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_pid_max:s0
tclass=file permissive=0

avc: denied { read } for comm="ps" name="pid_max" dev="proc" ino=125433
scontext=u:r:incidentd:s0 tcontext=u:object_r:proc_pid_max:s0
tclass=file permissive=0

Bug: 171070708
Bug: 172703374
Bug: 174618269
Change-Id: Ief5662c6d484e966bd1ba7134eddfabb3f7ad0e4
2020-12-02 16:05:01 -08:00
Treehugger Robot
b18b39486f Merge "sepolicy: rules for uid/pid cgroups v2 hierarchy" 2020-12-02 19:50:11 +00:00
Treehugger Robot
77dd325871 Merge "Allow network_stack to update eBPF map" 2020-12-02 08:35:20 +00:00
Kiyoung Kim
357f5c4b1b Support linkerconfig in Runtime APEX
Add additional sepolicy so linkerconfig in Runtime APEX can be executed
from init.

Bug: 165769179
Test: Cuttlefish boot succeeded
Change-Id: Ic08157ce4c6a084db29f427cf9f5ad2cb12e50dd
2020-12-02 11:41:38 +09:00
markchien
48c600fce1 Allow network_stack to update eBPF map
Bug: 173167302
Test: m
Change-Id: I7e7fcbcada905601cf08bf99fcdeb7e61c6effae
2020-12-02 00:38:25 +00:00
Elliott Hughes
ab5e7d3671 Merge "Revert^3 "Enforce RTM_GETLINK restrictions on all 3p apps"" 2020-12-01 18:30:28 +00:00
Treehugger Robot
8a4de44cd5 Merge "Add expandattribute to system_and_vendor_property_type" 2020-12-01 12:32:37 +00:00
Inseob Kim
e136eed323 Add expandattribute to system_and_vendor_property_type
To prevent the attribute from being optimized away.

Test: m selinux_policy
Test: investigate sys/fs/selinux/policy
Change-Id: I5340425f491afdf863d9b670492c0dcb24835932
2020-12-01 19:58:02 +09:00
Bram Bonné
80b8e3cba3 Revert^3 "Enforce RTM_GETLINK restrictions on all 3p apps"
18ccf9725e

Revert submission 1498525-revert-1499099-revert-1450615-mac-address-restrictions-MNRMVNXRJM-OSETMCLBXY

Reason for revert: b/173384499#comment21
Reverted Changes:
I320d3bcf8:Revert^2 "Enforce RTM_GETLINK restrictions on all ...
I51c83733c:Revert^2 "Return anonymized MAC for apps targeting...
I0e8280c74:Revert "Revert "Updates tests for untrusted app MA...
Ia9f61819f:Revert^2 "Soft-enables new MAC address restriction...

Change-Id: I35a00e187f1b39f6aaa777709fb948f840565a82
2020-12-01 10:04:23 +00:00
Chun-Wei Wang
c2e73593c6 Merge "Allow system_server to relabel files to staging_data_file (1/n)" 2020-12-01 08:25:42 +00:00
Colin Cross
242c8bc876 Follow argument changes to RuleBuilder
Pass pctx and ctx to NewRuleBuilder instead of RuleBuilder.Build,
and don't pass ctx to RuleBuilderCommand.BuiltTool.  Follows the
changes in I63e6597e19167393876dc2259d6f521363b7dabc.

Test: m checkbuild
Change-Id: I372e8ecc3c4ea7ca8f66a8e1054eddd1a9af9dbd
2020-11-30 20:22:31 -08:00
Treehugger Robot
476ef10ed8 Merge "Use attributes for exclusive property owners" 2020-12-01 00:25:50 +00:00
Marco Ballesio
f46d7a26c1 sepolicy: rules for uid/pid cgroups v2 hierarchy
the cgroups v2 uid/gid hierarchy will replace cgroup for all sepolicy
rules. For this reason, old rules have to be duplicated to cgroup_v2,
plus some rules must be added to allow the ownership change for cgroup
files created by init and zygote.

Test: booted device, verified correct access from init, system_server
and zygote to the uid/pid cgroup files

Change-Id: I80c2a069b0fb409b442e1160148ddc48e31d6809
2020-11-30 11:46:14 -08:00
Inseob Kim
4c110ff19b Use attributes for exclusive property owners
tests/sepolicy_tests.py has been checking whether the property owner
attributes are mutually exclusive. This is because current policy
language can't express the following snippet:

    neverallow domain {
        system_property_type && vendor_property_type
    }:file no_rw_file_perms;

    neverallow domain {
        system_property_type && vendor_property_type
    }:property_service set;

This uses technical_debt.cil to workaround this.

Bug: 171437654
Test: Try to compile a type having both system_property_type and
      vendor_property_type
Change-Id: Ic65f2d00aa0f2fb7f5d78331b0a26e733fcd128e
2020-11-30 18:34:30 +09:00
Treehugger Robot
b3785156df Merge "Fix a sepolicy violation error for hal_wifi" 2020-11-30 09:26:46 +00:00
Bram Bonné
aff923a469 Merge "Revert^2 "Enforce RTM_GETLINK restrictions on all 3p apps"" 2020-11-25 09:59:25 +00:00
Satoshi Niwa
e4a575f79b Fix a sepolicy violation error for hal_wifi
set_prop(hal_wifi, wifi_hal_prop) violates a neverallow rule
on PRODUCT_SHIPPING_API_LEVEL=28  b/173611344#comment20

Bug: 173611344
Test: m
Change-Id: I56ff953e196777ffdc7a8ca92bcf788e3431aaac
2020-11-25 10:24:41 +09:00
Treehugger Robot
65a5432737 Merge "Sepolicy for dumsys suspend_control in bugreport" 2020-11-24 18:17:59 +00:00
JW Wang
99172048bc Allow system_server to relabel files to staging_data_file (1/n)
This is required by ag/13090598 for restorecon to work correctly.

Bug: 168562373
Test: m
Change-Id: Ib319631ca6d7b3478ef39334a9772581cc97e507
2020-11-24 10:58:12 +08:00
Kalesh Singh
215751ac6f Sepolicy for dumsys suspend_control in bugreport
Bug: 155836352
Test: adb shell am bug-report && check logcat for denials
Change-Id: I8b65ea7c798121679bf27ce667c787a8dcbf5aae
2020-11-23 19:04:04 -05:00
Suren Baghdasaryan
37f1a137b6 Add rules for per-API level task profiles and cgroup description files
Define access rights to new per-API level task profiles and cgroup
description files under /etc/task_profiles/.

Bug: 172066799
Test: boot with per-API task profiles
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I04c9929fdffe33a9fc82d431a53f47630f9dcfc3
2020-11-23 09:30:26 -08:00
Treehugger Robot
a2028972db Merge "Add a TODO to remove mlsvendorcompat." 2020-11-23 13:57:36 +00:00
Alan Stokes
689f91f9ed Add a TODO to remove mlsvendorcompat.
One day we won't need this mechanism any more & can remove all traces
of it.

Bug: 141677108
Test: builds
Change-Id: I95525a163ab4f19d8ca411c02a3c06498c6777ef
2020-11-23 12:28:21 +00:00
Neil Fuller
159e046167 Merge "Changes associated with the new geotz module" 2020-11-23 11:44:37 +00:00
Alan Stokes
7e5f37fd6f Merge "Exempt older vendor images from recent mls changes." 2020-11-23 11:09:58 +00:00