Commit graph

13287 commits

Author SHA1 Message Date
Shawn Willden
2ea1f6fda5 Merge "Add file context for keymaster 4.0 service."
am: 4dd97a0bb8

Change-Id: Ic44a73a977a05b5cbb886abc5576b045020655df
2018-01-03 21:18:20 +00:00
Treehugger Robot
4dd97a0bb8 Merge "Add file context for keymaster 4.0 service." 2018-01-03 21:08:58 +00:00
Jeff Vander Stoep
7fb132ff88 Merge "Fix permission typo"
am: 41b8271f22

Change-Id: I14694f97a0af2e642db1b69c3ea8776dc7b3d7c9
2018-01-03 19:59:58 +00:00
Treehugger Robot
41b8271f22 Merge "Fix permission typo" 2018-01-03 19:43:32 +00:00
Shawn Willden
219c66c1f0 Add file context for keymaster 4.0 service.
Test: Boot the device
Change-Id: Ia468941e78803edebe311c73f424a41ac1faeaee
2018-01-03 10:56:06 -07:00
Jeff Vander Stoep
42d82b42ff Fix permission typo
zygote->webview_zygote.

Forgot to ammend local change.

Test: webview_zygote denials are gone.
Change-Id: I02869812feafd127b39e567c28e7278133770e97
2018-01-03 08:46:05 -08:00
Jeff Vander Stoep
6df91b7217 Merge "init: allow read of /sys/devices/virtual/block/zram"
am: 05916fca32

Change-Id: I84abff9bd2e80f452eaeb4a65f81ac25b6e7df21
2018-01-03 02:38:11 +00:00
Treehugger Robot
05916fca32 Merge "init: allow read of /sys/devices/virtual/block/zram" 2018-01-03 02:34:30 +00:00
Jeff Vander Stoep
8fdecd8d30 Merge "webview_zygote: allow listing dirs in /system"
am: db68967551

Change-Id: I0a21e2381ecc46d67fac8b7f3f20d8598fbcc6bb
2018-01-03 00:39:59 +00:00
Treehugger Robot
db68967551 Merge "webview_zygote: allow listing dirs in /system" 2018-01-03 00:33:37 +00:00
Jeff Vander Stoep
99c65df3ed init: allow read of /sys/devices/virtual/block/zram
Commit erroneously 55039509 removed init's read access to
/sys/devices/virtual/block/zram*. Restore access.

Test: cat /proc/meminfo
    ...
    SwapTotal:        524284 kB
    SwapFree:         524284 kB
    ...
Bug: 71510938

Change-Id: I20268168caa541a7dafa1e32339641095e1e524b
2018-01-03 00:26:57 +00:00
Max Bires
4ea5569f53 Adding a traceur_app domain to remove it from shell
This CL creates a traceur_app domain with userdebug privileges akin to
what shell has with regards to being able to find most services on
device. Previously, traceur was running as shell which was an
unintentional abuse of selinux architecture.

Bug: 68126425
Test: Traceur functions outside of shell user privilege
Change-Id: Ib5090e7e8225ad201b3ec24b506fe2717101d0f1
2018-01-02 15:29:03 -08:00
Chenbo Feng
b243094e85 sepolicy: Allow system server to r/w the bpf maps
am: 756dd574d5

Change-Id: I747966d12d4f92b010a835f16c7309761ea4f16b
2018-01-02 22:01:44 +00:00
Chenbo Feng
7daa05f138 sepolicy: New sepolicy classes and rules about bpf object
am: 08f92f9c01

Change-Id: Ibf75df4bfde087c80b9135819edf319673103eb5
2018-01-02 22:01:37 +00:00
Chenbo Feng
956e099ec6 sepolicy: Allow mount cgroupv2 and bpf fs
am: 254ad0da3a

Change-Id: I2cb5fe79f04ca72896ff313db44bd6778368053f
2018-01-02 22:01:31 +00:00
Jeff Vander Stoep
3588ddd06d webview_zygote: allow listing dirs in /system
For consistency with zygote, allow webview_zygote to list directories
in /system.

Test: Boot Taimen. Verify webiew_zygote denials during boot.
Bug: 70857705
Change-Id: I27eb18c377a5240d7430abf301c1c3af61704d59
2018-01-02 13:15:16 -08:00
Chenbo Feng
756dd574d5 sepolicy: Allow system server to r/w the bpf maps
The system server is responsible for providing the network traffic
stats to Apps and services. Allow it to directly reading the eBPF maps
that stored these information can make the process of getting traffic
stats simplier.

Test: No selinux rule violation of system server reading netd bpf object
Bug: 30950746
Change-Id: I6d9438d1ed7c9bab45a708f5d2a85eb22f5e8170
2018-01-02 11:52:33 -08:00
Chenbo Feng
08f92f9c01 sepolicy: New sepolicy classes and rules about bpf object
Add the new classes for eBPF map and program to limit the access to eBPF
object. Add corresponding rules to allow netd module initialize bpf
programs and maps, use the program and read/wirte to eBPF maps.

Test: no bpf sepolicy violations when device boot
Change-Id: I63c35cd60f1972d4fb36ef2408da8d5f2246f7fd
2018-01-02 11:52:33 -08:00
Chenbo Feng
254ad0da3a sepolicy: Allow mount cgroupv2 and bpf fs
Some necessary sepolicy rule changes for init process to create directory,
mount cgroupv2 module and mount bpf filesystem. Also allow netd to create
and pin bpf object as files and read it back from file under the
directory where bpf filesystem is mounted.

Test: bpf maps show up under /sys/fs/bpf/
Change-Id: I579d04f60d7e20bd800d970cd28cd39fda9d20a0
2018-01-02 11:52:33 -08:00
Ricky Wai
56a9edb19e Add Network Watchlist data file selinux policy(Used in ConfigUpdater)
am: ff3b957e63

Change-Id: I7889127ebe538d2aaf0db9b887c991e3976e842a
2018-01-02 18:22:13 +00:00
Ricky Wai
ff3b957e63 Add Network Watchlist data file selinux policy(Used in ConfigUpdater)
Bug: 63908748
Test: Able to boot
Change-Id: I14d8856d7aac7be9d1f26ecf5bfff69ea5ee9607
2018-01-02 18:16:46 +00:00
Andreas Gampe
d695693d86 Merge "Sepolicy: Introduce perfprofd binder service"
am: 2f39276e3f

Change-Id: If8e02a3397a2f345940960d6c408d75f9cd14d89
2018-01-02 15:59:27 +00:00
Treehugger Robot
2f39276e3f Merge "Sepolicy: Introduce perfprofd binder service" 2018-01-02 15:55:29 +00:00
Tri Vo
b6f04b57bf Merge "system_server: search permission to all of sysfs."
am: 8d07a8d595

Change-Id: Ic3ff38e6a2c29ff1ee829bf759d9b3bc406bb64a
2017-12-30 04:59:09 +00:00
Treehugger Robot
8d07a8d595 Merge "system_server: search permission to all of sysfs." 2017-12-30 04:56:53 +00:00
Andreas Gampe
aa9711f82b Sepolicy: Introduce perfprofd binder service
Add policy for the perfprofd binder service.

For now, only allow su to talk to it.

Test: m
Change-Id: I690f75460bf513cb326314cce633fa25453515d6
2017-12-28 17:31:21 -08:00
Steven Moreland
f3bf89c682 Merge "Remove sys/class/leds permissions from dumpstate."
am: 0b6856f59b

Change-Id: I7a46caf78de021df995c974e607629d69536b025
2017-12-22 21:52:13 +00:00
Treehugger Robot
0b6856f59b Merge "Remove sys/class/leds permissions from dumpstate." 2017-12-22 21:47:01 +00:00
Steven Moreland
a00b74196e Remove sys/class/leds permissions from dumpstate.
These are device specific.

Bug: 70846424
Test: bugreport
Change-Id: Ic22c972f1b09988a8eccf0823dd0d87fc0c0a1f7
2017-12-22 21:46:34 +00:00
Tri Vo
ce8bc8b00e system_server: search permission to all of sysfs.
This will allow system_server to perfom path resolution on paths like:
/sys/devices/soc/800f000.qcom,spmi/spmi-0/spmi0-00/800f000.qcom,spmi:qcom,pm8998@0:qcom,pm8998_rtc/rtc

Fixes this denial:
avc: denied { search } for pid=947 comm=system_server
name=800f000.qcom,spmi dev=sysfs ino=19891
scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_msm_subsys:s0
tclass=dir permissive=0 b/68003344

Bug: 68003344
Test: walleye boots without the denial above.
Change-Id: Ib282395124c7f2f554681fcc713b9afe189f441c
2017-12-21 22:35:27 +00:00
Joel Galenson
ea3942f0a7 Merge "Disallow most coredomains from accessing vendor_files on Treble."
am: 6168a12ea9

Change-Id: Ie83d270b7fb1659d890e5dd9356ee69a0b6f6ea5
2017-12-21 19:03:24 +00:00
Treehugger Robot
6168a12ea9 Merge "Disallow most coredomains from accessing vendor_files on Treble." 2017-12-21 17:07:20 +00:00
Tri Vo
ef3865076b system_server: remove access to /sys/class/leds.
am: 89a7b21541

Change-Id: Icdd87b3f76ebcbd5d05ad17f00368ef50fa1603d
2017-12-20 21:22:10 +00:00
Tri Vo
89a7b21541 system_server: remove access to /sys/class/leds.
Removing legacy rules. system_server now depends on Lights HAL (which
has its own domain) instead of /sys/class/leds.

Bug: 70846424
Test: sailfish boots; screen, flashlight work fine.

Change-Id: I6f116a599cab26ae71e45f462b33328bc8d43db5
2017-12-20 18:51:26 +00:00
Joel Galenson
52e11be07a Disallow most coredomains from accessing vendor_files on Treble.
Test: Built the policy for many devices.
Change-Id: Ic61023dc2d597865504d1a4bc955bd1bc973f83c
2017-12-20 10:05:35 -08:00
Jeff Vander Stoep
9a07f54ff7 Merge "app: move appdomain to public policy"
am: d4bb9b7342

Change-Id: I00f508e57619f3f5273095bd8e1c9cae84fa2aaf
2017-12-20 17:53:48 +00:00
Treehugger Robot
d4bb9b7342 Merge "app: move appdomain to public policy" 2017-12-20 17:49:31 +00:00
Tri Vo
677a6b2ecc Merge "init: tighten sysfs_type permissions"
am: 021344cc51

Change-Id: I6eb661d22f49cd9209f3b33075d04479184735fb
2017-12-20 17:16:02 +00:00
Tri Vo
021344cc51 Merge "init: tighten sysfs_type permissions" 2017-12-20 17:11:10 +00:00
Tony Mak
5c98a06f1d Add selinux policy for CrossProfileAppsService
am: 215fb3efe4

Change-Id: I6c451967c7e40250c29c7f696f61b4b61c27ad69
2017-12-20 07:01:12 +00:00
Jeff Vander Stoep
77b290f303 app: move appdomain to public policy
Vendor-specific app domains depend on the rules in app.te so they
must reside in public policy.

Bug: 70517907
Test: build
Change-Id: If45557a5732a06f78c752779a8182e053beb25a2
Merged-In: If45557a5732a06f78c752779a8182e053beb25a2
(cherry picked from commit 1f4cab8bd4)
2017-12-19 21:31:01 -08:00
Tony Mak
215fb3efe4 Add selinux policy for CrossProfileAppsService
CrossProfileAppsService allows apps to do limited cross profile
operations, like checking the caller package is installed in
the specified user. It is similar to LauncherAppsService in some sense.

Merged-In: I26e383a57c32c4dc9b779752b20000b283a5bfdc
Change-Id: I26e383a57c32c4dc9b779752b20000b283a5bfdc
Fix: 67765768
Test: Built with ag/3063260. Can boot and verified those APIs are working.
(cherry picked from commit 6536c9e092)
2017-12-20 09:42:37 +09:00
Tri Vo
55039509fd init: tighten sysfs_type permissions
Removes open, read, setattr permissions to sysfs_type.
Adds explicit permissions to:
sysfs_dt_firmware_android
sysfs_vibrator
sysfs_wake_lock

Bug: 65643247
Test: walleye boots without denials to sysfs_type.
Change-Id: I2e344831655c2c8e8e48b07ecce6a2704f2a206a
2017-12-19 16:17:42 -08:00
yro
c9bfbc1686 Setting up SELinux policy for statsd and stats service
am: 2970845577

Change-Id: Ib8c8a55ffe51b48eced90683192f6025a0ab15ec
2017-12-19 18:56:05 +00:00
yro
2970845577 Setting up SELinux policy for statsd and stats service
Bug: 63757906
Test: manual testing conducted
Change-Id: Id03413ce82b5646d4bceddc59e16c7d5ee5bc193
2017-12-19 01:41:48 +00:00
Tri Vo
2ee1a51c3c Merge "perfprofd: allow traversing sysfs directories."
am: b73cd9f8df

Change-Id: I732c3cc8dd293c4da679c5f617b9c01db4985187
2017-12-19 01:13:51 +00:00
Treehugger Robot
b73cd9f8df Merge "perfprofd: allow traversing sysfs directories." 2017-12-19 01:04:17 +00:00
xshu
40868b952e Wifi hal - Firmware dump permissions
am: 6ad3c891bc

Change-Id: Iec46b5bdc36327549d930058e562e386fb950c40
2017-12-19 00:56:54 +00:00
xshu
6ad3c891bc Wifi hal - Firmware dump permissions
we are aiming to improve logging performance by having wifi hal
directly write to the flash.

Wifi hal need to be able to create, write, and delete files in
a directory. This will be restricted to userdebug and eng builds only.

Bug: 70170285
Test: compile, run on device
Change-Id: Id0cd317411f4c393d7529aa31b501046d7350edb
2017-12-18 13:11:02 -08:00
Howard Ro
744e67d7e6 Revert "Setting up SELinux policy for statsd and stats service"
am: d496ea7a61

Change-Id: Ib6adf4bc2c608c86eebb5a174c91b4955c4d409c
2017-12-16 02:29:07 +00:00