Commit graph

1526 commits

Author SHA1 Message Date
Tom Cherry
9c778045b2 Remove vendor_init from coredomain
vendor_init exists on the system partition, but it is meant to be an
extention of init that runs with vendor permissions for executing
vendor scripts, therefore it is not meant to be in coredomain.

Bug: 62875318
Test: boot walleye
Merged-In: I01af5c9f8b198674b15b90620d02725a6e7c1da6
Change-Id: I01af5c9f8b198674b15b90620d02725a6e7c1da6
2018-01-29 18:07:41 +00:00
Treehugger Robot
2c11ff5d2f Merge "Track crash_dump selinux denial." 2018-01-28 00:00:18 +00:00
Treehugger Robot
f340d9c0ea Merge "Sepolicy: Allow stack dumps of statsd" 2018-01-26 03:52:14 +00:00
Treehugger Robot
db8f5465ac Merge "Neverallow vendor_init from accessing stats_data_file" 2018-01-25 22:59:46 +00:00
Joel Galenson
6e705357c3 Track crash_dump selinux denial.
This should fix presubmit tests.

Bug: 72507494
Test: Built policy.
Change-Id: I56944d92232c7a715f0c88c13e24f65316805c39
2018-01-25 14:14:24 -08:00
Tom Cherry
c2653ae86d Neverallow vendor_init from accessing stats_data_file
The exception for vendor_init in this neverallow was never needed.

Bug: 62875318
Test: Build walleye, bullhead
Change-Id: Iac2b57df30b376492851d7520994e0400a87f1e1
2018-01-25 19:42:11 +00:00
Joel Galenson
b050dccdd8 Suppress denials from idmap reading installd's files.
We are occasionally seeing the following SELinux denial:

avc: denied { read } for comm="idmap" path="/proc/947/mounts" scontext=u:r:idmap:s0 tcontext=u:r:installd:s0 tclass=file

This commit suppresses that exact denial.

We believe this is occurring when idmap is forked from installd, which is reading its mounts file in another thread.

Bug: 72444813
Test: Boot Walleye and test wifi and camera.
Change-Id: I3440e4b00c7e5a708b562a93b304aa726b6a3ab9
2018-01-25 10:07:19 -08:00
Andreas Gampe
7468db67f6 Sepolicy: Allow stack dumps of statsd
Allow dumpstate & system server watchdog to dump statsd stacks.

Bug: 72461610
Test: m
Change-Id: I4c3472881da253f85d54b5e5b767b06e2618af9c
2018-01-25 09:31:19 -08:00
Treehugger Robot
715c3a78d2 Merge "Allow binder call between statsd and healthd. Also allow statsd to find health hal service for battery metrics." 2018-01-25 06:32:33 +00:00
Treehugger Robot
2638cd2c96 Merge "Add sepolicy for radio.config" 2018-01-25 04:07:24 +00:00
Jaekyun Seok
fbe91b7ee2 Merge "Add a default rule for /product files" 2018-01-25 03:53:37 +00:00
Jeffrey Vander Stoep
e0460897fe Merge "Track idmap selinux denial." 2018-01-25 01:56:30 +00:00
Joel Galenson
7b1e9a5f1c Track idmap selinux denial.
This should fix presubmit tests.

Bug: 72444813
Test: Built policy.
Change-Id: I5b8661b34c9417cd95cb0d6b688443dcbe0d1c0b
2018-01-24 17:49:20 -08:00
Jaekyun Seok
a90cae8c5f Add a default rule for /product files
Since /product is an extension of /system, its file contexts should be
consistent with ones of /system.

Bug: 64195575
Test: tested installing a RRO, apps, priv-apps and permissions
Change-Id: I7560aaaed852ba07ebe1eb23b303301481c897f2
2018-01-25 07:59:23 +09:00
Treehugger Robot
d312b5fdbe Merge "Adding permission for traceur to use content provider" 2018-01-24 21:09:25 +00:00
yinxu
612350e34f Add sepolicy for radio.config
Bug: 64131518
Test: Compile and flash the device, check whether service vendor.radio-config-hal-1-0 starts
Change-Id: Id728658b4acdda87748259b74e6b7438f6283ea5
2018-01-24 12:13:10 -08:00
yro
53164f40de Allow binder call between statsd and healthd. Also allow statsd to find
health hal service for battery metrics.

Test: cts test, manual test

Change-Id: I73a801f6970e25bee5921479f2f7078bcb1973a9
2018-01-24 19:51:17 +00:00
Treehugger Robot
356772e491 Merge "Update sepolicy of statsd to be able to find incident_service" 2018-01-24 19:37:02 +00:00
Treehugger Robot
24e8eff35d Merge "sepolicy: restrict access to uid_cpupower files" 2018-01-24 19:05:40 +00:00
yro
cf38ca5ed0 Update sepolicy of statsd to be able to find incident_service
Test: manual testing
Change-Id: Ia97c956c08d2062af6b33622c6b61ca3810b0cb1
2018-01-24 18:25:04 +00:00
Janis Danisevskis
97c56bdd78 Added default policy for Confirmation UI HAL
Bug: 63928580
Test: Manually tested.

Change-Id: If6bb10cb7c009883d853e46dcdeb92cd33877d53
2018-01-24 10:22:40 -08:00
Max Bires
278147eb8a Adding permission for traceur to use content provider
This change will allow traceur to pass a file descriptor to another app
in order to allow that app to process trace data files. E.g. in the use
case that someone would like to email the traces they collected and pass
the trace data files to gmail, this will now be permitted.

Bug:68126425
Test: Traceur can pass fd's to untrusted apps for processing
Change-Id: If0507b5d1f06fd8400e04bd60e06a44153dc59b7
2018-01-24 10:17:00 -08:00
Marissa Wall
dfe063c37d sepolicy: restrict access to uid_cpupower files
Do not let apps read /proc/uid_cpupower/time_in_state,
/proc/uid_cpupower/concurrent_active_time,
/proc/uid_cpupower/concurrent_policy_time.

b/71718257

Test: Check that they can't be read from the shell
    without root permissions and system_server was able
    to read them

Change-Id: I812694adfbb4630f7b56aa7096dc2e6dfb148b15
2018-01-24 08:39:09 -08:00
Joel Galenson
cf391269ac Fix init error trying to access file.
Init tries to write /proc/sys/vm/min_free_order_shift but fails due to
a SELinux denial.  This gives the file a new label and gives init the
ability to write it.

Test: Build and booted Sailfish (a couple of days ago).
Change-Id: Ic93862b85c468afccff2019d84b927af9ed2a84d
2018-01-23 17:32:16 -08:00
Tom Cherry
869a4c2e19 Merge "Label /vendor_file_contexts as file_contexts_file" 2018-01-24 00:58:40 +00:00
Tom Cherry
ecc4868f71 Label /vendor_file_contexts as file_contexts_file
vendor_init doesn't have permissions to read rootfs labeled files, but
needs to read /vendor_file_contexts to do restorecon correctly.  This
file is a file_contexts file, so labeling it as such seems appropriate.

Test: bullhead + vendor_init doesn't hit this audit
Change-Id: I1f2cf7dd7de17806ac0f1dfe2483fb6d6659939b
2018-01-23 20:34:57 +00:00
Dongwon Kang
1134bd001e Allow mediaextractor to load libraries from apk_data_file
This is an experimental feature only on userdebug and eng build.

Test: play MP4 file. install & uninstall media update apk.
Bug: 67908547
Change-Id: I513cdbfda962f00079e886b7a42f9928e81f6474
2018-01-23 11:21:11 -08:00
Yi Jin
bc24ba7283 Selinux permissions for incidentd project
Bug: 64222712
Test: manual
Change-Id: Ica77ae3c9e535eddac9fccf11710b0bcb3254ab3
2018-01-23 19:08:49 +00:00
Tri Vo
0a2f862715 Merge "dumpstate: remove access to 'proc' and 'sysfs' types." 2018-01-23 19:08:33 +00:00
Max Bires
842cc26816 Fixing traceur selinux permission error
getattr for trace_data_file:dir permissions was missing, impacting
functionality.

Bug:68126425
Test: Traceur functionality is properly working
Change-Id: I2c8ae5cf3463a8e5309b8402713744e036a64171
2018-01-22 19:59:35 -08:00
Treehugger Robot
7724907ff4 Merge "Allow dumpstate to call statsd. This is needed for bugreport." 2018-01-23 03:27:43 +00:00
Tri Vo
218d87c01c dumpstate: remove access to 'proc' and 'sysfs' types.
And grant appropriate permissions to more granular types.

Bug: 29319732
Bug: 65643247
Test: adb bugreport; no new denials to /proc or /sys files.

Change-Id: Ied99546164e79bfa6148822858c165177d3720a5
2018-01-23 03:24:37 +00:00
Treehugger Robot
e58fa54803 Merge "Clarify sysfs_leds neverallow." 2018-01-23 02:37:24 +00:00
Steven Moreland
623d9f0683 Clarify sysfs_leds neverallow.
Now that init no longer uses it.

Fixes: 70846424
Test: no neverallows tripped
Change-Id: I5c22dd272b66fd32b4758c1dce659ccd98b8a7ba
2018-01-22 22:03:51 +00:00
Max Bires
35c363897d Adding write permissions to traceur
Fixing denials that stopped traceur from being able to write to
debugfs_tracing. Also cleaning up general find denials for services that
traceur doesn't have permission to access.

Additionally, labeling /data/local/trace as a trace_data_file in order
to give traceur a UX friendly area to write its traces to now that it
will no longer be a shell user. It will be write/readable by traceur,
and deletable/readable by shell.

Test: Traceur functionality is not being blocked by selinux policy
Bug: 68126425
Change-Id: I201c82975a31094102e90bc81454d3c2a48fae36
2018-01-22 21:06:36 +00:00
Steven Moreland
8bda3dfaa1 Add policy for 'blank_screen'.
This util allows init to turn off the screen
without any binder dependencies.

Bug: 70846424
Test: manual + init use
Change-Id: I4f41a966d6398e959ea6baf36c2cfe6fcebc00de
2018-01-22 20:27:01 +00:00
Paul Crowley
68e31786f0 Merge "Allow access to the metadata partition for metadata encryption." 2018-01-22 18:30:08 +00:00
Tri Vo
a3e8572875 Merge "priv_app: remove access to 'proc' and 'sysfs' types." 2018-01-20 05:01:25 +00:00
Badhri Jagan Sridharan
4f6eb37f6c usbd sepolicy
Sepolicy for the usb daemon. (ag/3373886/)

Bug: 63669128
Test: Checked for avc denial messages.
Change-Id: I6e2a4ccf597750c47e1ea90c4d43581de4afa4af
2018-01-20 03:41:21 +00:00
Tri Vo
f92cfb9e4f priv_app: remove access to 'proc' and 'sysfs' types.
Bug: 65643247
Test: walleye boots with no denials from priv_app.

Change-Id: I9a7faf1253bdd79d780c2398c740109e2d84bc63
2018-01-20 01:05:56 +00:00
Tri Vo
06d7dca4a1 Remove proc and sysfs access from system_app and platform_app.
Bug: 65643247
Test: manual
Test: browse internet
Test: take a picture
Change-Id: I9faff44b7a025c7422404d777113e40842ea26dd
2018-01-20 01:05:21 +00:00
Treehugger Robot
04b70519cf Merge "Label esdfs as sdcardfs" 2018-01-20 00:40:38 +00:00
Tao Bao
d7d9cfcad2 Add rules for system_update service.
system_update service manages system update information: system updater
(priv_app) publishes the pending system update info through the service,
while other apps can read the info accordingly (design doc in
go/pi-ota-platform-api).

This CL adds the service type, and grants priv_app to access the service.

Bug: 67437079
Test: Build and flash marlin image. The system_update service works.
Change-Id: I7a3eaee3ecd3e2e16b410413e917ec603566b375
2018-01-19 15:03:21 -08:00
Paul Crowley
ab318e30d3 Allow access to the metadata partition for metadata encryption.
Bug: 63927601
Test: Enable metadata encryption in fstab on Taimen, check boot success.
Change-Id: Id425c47d48f413d6ea44ed170835a52d0af39f9f
2018-01-19 14:45:08 -08:00
Yifan Hong
829c6fef14 Merge "move /vendor VINTF data to /vendor/etc/vintf" 2018-01-19 22:01:28 +00:00
Daniel Rosenberg
9d0d6856c1 Label esdfs as sdcardfs
Test: esdfs should be mountable and usable with selinux on
Bug: 63876697
Change-Id: I7a1d96d3f0d0a6dbc1c98f0c4a96264938011b5e
2018-01-19 13:50:02 -08:00
Treehugger Robot
38adc92797 Merge "hal_usb_gadget sepolicy" 2018-01-19 21:41:00 +00:00
Treehugger Robot
2b38971ed1 Merge "Allow system apps to read log props." 2018-01-19 19:32:13 +00:00
Treehugger Robot
1572cbaffa Merge "Don't record audio if UID is idle - sepolicy" 2018-01-19 19:31:42 +00:00
Yifan Hong
8d8da6a2e2 move /vendor VINTF data to /vendor/etc/vintf
Test: boots
Test: hwservicemanager can read these files
Bug: 36790901
Change-Id: I0431a7f166face993c1d14b6209c9b502a506e09
2018-01-19 10:57:13 -08:00