Commit graph

13854 commits

Author SHA1 Message Date
Tri Vo
9ee60ea4a7 Merge "perfprofd: allow traversing sysfs directories." am: b73cd9f8df
am: 2ee1a51c3c

Change-Id: Iba7931a041d6147ae90d49ba7c613811c38fe3ae
2017-12-19 01:16:49 +00:00
Tri Vo
2ee1a51c3c Merge "perfprofd: allow traversing sysfs directories."
am: b73cd9f8df

Change-Id: I732c3cc8dd293c4da679c5f617b9c01db4985187
2017-12-19 01:13:51 +00:00
xshu
96b44bec14 Wifi hal - Firmware dump permissions am: 6ad3c891bc am: 40868b952e
am: 5a90141fbd

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

Change-Id: If0a7e68f59f9d78af253ea5914b8fc5b6c32161c
2017-12-19 01:00:27 +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
TreeHugger Robot
58bf871783 Merge "Audit app access to /proc/net/*" 2017-12-18 15:15:19 +00:00
Howard Ro
08cc57a515 Revert "Setting up SELinux policy for statsd and stats service" am: d496ea7a61 am: 744e67d7e6
am: 02ca42e1e2

Change-Id: Ib26d526c4de4c80624c1c6d81b5f0952d34b9dae
2017-12-16 02:33:44 +00:00
Howard Ro
02ca42e1e2 Revert "Setting up SELinux policy for statsd and stats service" am: d496ea7a61
am: 744e67d7e6

Change-Id: I040ae4aa03ecc6052f7aeba21fbcfb0e6e35859b
2017-12-16 02:31:37 +00: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
Howard Ro
d496ea7a61 Revert "Setting up SELinux policy for statsd and stats service"
This reverts commit 5744cbdf8d.

Reason for revert: aosp_dragon-userdebug build broken

Change-Id: I5f8180273c32119ae9839f31610bbca37cd05c65
2017-12-16 02:22:23 +00:00
yro
94dc32ed91 Setting up SELinux policy for statsd and stats service am: 5744cbdf8d am: da67945df9
am: 3d444093c9

Change-Id: I3a9fcc11509f6814ca594a1d619b291ed89a95fc
2017-12-16 01:51:34 +00:00
yro
3d444093c9 Setting up SELinux policy for statsd and stats service am: 5744cbdf8d
am: da67945df9

Change-Id: I641db56b690577dcc4b750fe970019f9730d243a
2017-12-16 01:49:33 +00:00
yro
da67945df9 Setting up SELinux policy for statsd and stats service
am: 5744cbdf8d

Change-Id: I43913ca176e7a9ca049da643a95daff26f1ce916
2017-12-16 01:46:59 +00:00
yro
5744cbdf8d Setting up SELinux policy for statsd and stats service
Test: manual testing conducted see if it interfere's with AOSP

Change-Id: If47a663557b2ebf825fc082edb838ae085ec66b3
2017-12-16 01:40:45 +00:00
Jiyong Park
2ccf618f8d Merge "/odm is another vendor partition that can be customied by ODMs" am: 5872e84f82 am: acc882167b
am: a212c863a6

Change-Id: I3e18f18d49133e4fdaf1f266f905620c77eacaf8
2017-12-16 00:55:16 +00:00
Jiyong Park
a212c863a6 Merge "/odm is another vendor partition that can be customied by ODMs" am: 5872e84f82
am: acc882167b

Change-Id: Ia130d8211d9e0b849d5bef6c14a9dc5ecdc0f4ac
2017-12-16 00:43:45 +00:00
Jiyong Park
acc882167b Merge "/odm is another vendor partition that can be customied by ODMs"
am: 5872e84f82

Change-Id: Ice57a32ba00d99b74ed260706eee7dadae56e91a
2017-12-16 00:38:11 +00:00
Jeff Vander Stoep
84f9685972 Audit app access to /proc/net/*
Many processes including third party apps are expected to
access /proc/net/xt_qtaguid/stats. Give this file a new label
to avoid spamming the logs and temporarily grant read access to
all processes.

Read-only permission is adequate for all processes based on unix
permissions.
sailfish:/ # ls -laZ /proc/net/xt_qtaguid/stats
-r--r--r--  1 root net_bw_stats u:object_r:proc_net_xt_qtaguid_stats:s0 stats

Bug: 9496886
Bug: 68016944
Bug: 70722355
Test: Build/flash Sailfish. Browse in Chrome and watch videos in youtube.
    No "denied" or "granted" selinux messages observed in the logs.

Change-Id: I29f1ee806c8149988b9b93a950790d14754927ef
2017-12-15 16:34:39 -08:00
Treehugger Robot
5872e84f82 Merge "/odm is another vendor partition that can be customied by ODMs" 2017-12-16 00:27:08 +00:00
Jiyong Park
4c3ab18f49 /odm is another vendor partition that can be customied by ODMs
Since /odm is an extension of /vendor, libs in /odm should be treated
just like the ones in /vendor.

Bug: 67890517
Test: none as we don't yet have /odm partition.
Change-Id: I5232baef769c7fa8c7641b462cfa1d7537d3cfdf
2017-12-15 19:07:58 +09:00
Tri Vo
ae20791517 perfprofd: allow traversing sysfs directories.
Bug: 70275668
Test: walleye builds, boots.
This change only expands the existing permissions, so shouldn't regress
runtime behavior.
Change-Id: I36e63f11d78998a88e3f8d1e6913e20762a359af
2017-12-14 00:00:17 +00:00
Marissa Wall
15ba57cce6 Merge "Restrict access to uid_concurrent_*_time" am: 40ed4283e4 am: 5b17322a87
am: 3337c82e7c

Change-Id: Id7dba03c422e4f9a2d094c7b26a773ababe2ab47
2017-12-13 20:27:09 +00:00
Marissa Wall
3337c82e7c Merge "Restrict access to uid_concurrent_*_time" am: 40ed4283e4
am: 5b17322a87

Change-Id: I6e4c79d36c6b3ed4f734c7a9d6fd24d3031d3ae6
2017-12-13 20:15:02 +00:00
Marissa Wall
5b17322a87 Merge "Restrict access to uid_concurrent_*_time"
am: 40ed4283e4

Change-Id: I21488f5a1d0ef9035a3ae165ca790ad18d1b354f
2017-12-13 20:01:05 +00:00
Treehugger Robot
40ed4283e4 Merge "Restrict access to uid_concurrent_*_time" 2017-12-13 19:48:47 +00:00
Tom Cherry
cd76b8eb0e Add /dev/__properties__/property_info am: 8b5433a9cc am: c878b4c56a
am: c456286e3c

Change-Id: I73b279fa3f57c321ed39d4b494e413fe2dda900b
2017-12-13 02:55:17 +00:00
Tom Cherry
c456286e3c Add /dev/__properties__/property_info am: 8b5433a9cc
am: c878b4c56a

Change-Id: I0781ab5eaf7aec47a8657e1c6ef10080c3294463
2017-12-13 02:32:13 +00:00
Tom Cherry
c878b4c56a Add /dev/__properties__/property_info
am: 8b5433a9cc

Change-Id: I7cf94fdd9aa130b1a97f56d4a97852eae79fa8c7
2017-12-13 01:37:51 +00:00
Tom Cherry
8b5433a9cc Add /dev/__properties__/property_info
Allow init to create a serialized property_info file and allow all
processes to read it.

Bug: 36001741
Test: boot bullhead, walleye using property_info

Change-Id: Ie51d4c0f0221b128dd087029c811fda15b4d7093
2017-12-13 01:28:15 +00:00
Tri Vo
5765af8ae5 Merge "Remove access to 'sysfs' files from healtd and charger." am: 1fc08a299c am: b10d2964b3
am: 3107b53241

Change-Id: I0ead6aa1ad9faef9034c709b39b739ff7361b888
2017-12-13 00:06:32 +00:00
Tri Vo
e9e17a0180 Merge "shell: directory access to sysfs_net" am: 5b8d279fcd am: cd06968498
am: 049bf53a11

Change-Id: I1dabdfe296398c03e808bbaf997425def1c6af95
2017-12-13 00:05:32 +00:00
Tri Vo
3107b53241 Merge "Remove access to 'sysfs' files from healtd and charger." am: 1fc08a299c
am: b10d2964b3

Change-Id: I07d6bdf0cf606b2ec56196e129a8340207d5d08b
2017-12-12 23:55:07 +00:00
Tri Vo
049bf53a11 Merge "shell: directory access to sysfs_net" am: 5b8d279fcd
am: cd06968498

Change-Id: Ib53a57006c73d54b1c62c18129aba5f67710bf2a
2017-12-12 23:45:35 +00:00
Tri Vo
b10d2964b3 Merge "Remove access to 'sysfs' files from healtd and charger."
am: 1fc08a299c

Change-Id: If06792db331fecabaaa3de4b77c680c8bc8b7833
2017-12-12 23:41:16 +00:00
Tri Vo
cd06968498 Merge "shell: directory access to sysfs_net"
am: 5b8d279fcd

Change-Id: Id86a7031965cc900a3ca72ff503544d02f07120e
2017-12-12 23:40:36 +00:00
Treehugger Robot
1fc08a299c Merge "Remove access to 'sysfs' files from healtd and charger." 2017-12-12 23:18:08 +00:00
Treehugger Robot
5b8d279fcd Merge "shell: directory access to sysfs_net" 2017-12-12 23:11:36 +00:00
Marissa Wall
80ee23f74a Restrict access to uid_concurrent_*_time
Do not let apps read uid_concurrent_active_time and
uid_concurrent_policy_time.

b/68399339

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

Change-Id: I6f09ef608607cb9f4084ba403a1e7254b8c49a06
2017-12-12 19:19:04 +00:00
Tri Vo
f34e592984 shell: directory access to sysfs_net
This will allow bionic cts test to list network interfaces in
/sys/class/net.

Bug: 70537905
Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
--gtest_filter=ifaddrs.getifaddrs_interfaces
Change-Id: Ie07425fc54f9101e911962142824697e64d2bc45
2017-12-12 09:41:13 -08:00
Bowgo Tsai
fa58dc7619 Switch file context of odm(/.*) to vendor_file am: e9ae77355e am: aed99921e3
am: 5d937ace47

Change-Id: I98befa88e0e92ffdf86a2c69717f8e9530483d44
2017-12-12 04:51:39 +00:00
Bowgo Tsai
5d937ace47 Switch file context of odm(/.*) to vendor_file am: e9ae77355e
am: aed99921e3

Change-Id: I552df075c970f7eeefce33a40661c13837f4959f
2017-12-12 04:49:36 +00:00
Bowgo Tsai
aed99921e3 Switch file context of odm(/.*) to vendor_file
am: e9ae77355e

Change-Id: If44d773ce2ac76861fdb07975c7dfa0d46929a3e
2017-12-12 04:47:05 +00:00
Bowgo Tsai
e9ae77355e Switch file context of odm(/.*) to vendor_file
/odm partition is the extension of /vendor partition, so we should not
use system_file for it. Currently there is no ABI between vendor and
odm. We can use 'odm_file' when needed in the future.

Bug: 64240127
Test: boot a device
Change-Id: I4e8300d597aeeba60a255c8d114a54b24bc39470
2017-12-12 10:32:17 +08:00
Jeff Vander Stoep
a55f2361a9 Restore recovery's ability to format cache and preserve logs am: 87dd195b78 am: f8fe149f47
am: cf4f3a2e62

Change-Id: I4fc382127fa5c9c3ba14f456383ae44a1de4f28a
2017-12-11 20:55:11 +00:00
Jeff Vander Stoep
cf4f3a2e62 Restore recovery's ability to format cache and preserve logs am: 87dd195b78
am: f8fe149f47

Change-Id: I894bf5bcb00ca934b3fd5016e86b1a5910ba7c7f
2017-12-11 20:41:38 +00:00
Jeff Vander Stoep
f8fe149f47 Restore recovery's ability to format cache and preserve logs
am: 87dd195b78

Change-Id: Id3fde8b3c5901986a25d0e5daba4e34e8e471c93
2017-12-11 20:38:35 +00:00
Jeff Vander Stoep
87dd195b78 Restore recovery's ability to format cache and preserve logs
Commit b8b4f5d6 'Clean up old file-based OTA SELinux rules' removed
many permissions from recovery, a few of which are still required.
Restore these.

[ 2918.409108] type=1400 audit(2327427.540:159): avc:  denied
{ search } for  pid=339 comm="recovery" name="/" dev="mmcblk0p38"
ino=2 scontext=u:r:recovery:s0 tcontext=u:object_r:unlabeled:s0
tclass=dir permissive=0
[ 2586.563071] E:Failed to mount / create /cache/recovery: Permission
denied
[ 2586.780320] E:Can't open /cache/recovery/log: Permission denied
[ 2586.850399] E:Can't open /cache/recovery/last_log: Permission
denied
[ 2586.918979] E:Can't open /cache/recovery/last_install: Permission
denied

[   54.035867] type=1400 audit(59206654.526:12): avc:  denied  { chown }
for  pid=330 comm="recovery" capability=0  scontext=u:r:recovery:s0
tcontext=u:r:recovery:s0 tclass=capability permissive=0a

Bug: 70350029
Test: xunchang to test
Change-Id: I46ab049b8eb600b44c84a61777fade150cadd197
2017-12-11 09:38:14 -08:00
Tri Vo
d276b4349d Remove access to 'sysfs' files from healtd and charger.
We rely on vendors to label all dependencies of healthd/charger under
/sys/class/power_supply with sysfs_batteryinfo type.

Bug: 65643247
Bug: 32659667
Test: boots without denials from healthd, to sysfs_batteryinfo or to
sysfs_msm_subsys.
Test: charging with device turned off works without /sys denials.

Change-Id: I893f309ecad8a0caf7d0b81f5f945725907255c2
2017-12-11 16:31:24 +00:00