Commit graph

10712 commits

Author SHA1 Message Date
Sandeep Patil
88234ba450 sepolicy: restrict access for /vendor/framework. am: df679fdbd9
am: c98b275e7b

Change-Id: I424909584152898fa81d8eacf664db851f47e37c
2017-04-06 23:13:53 +00:00
Sandeep Patil
e1a736a041 sepolicy: restrict /vendor/overlay from most coredomains am: 9075699a28
am: d4a96aac4b

Change-Id: I89f24a3ba1ca855aba0731f8320aeac93e7bcb66
2017-04-06 23:13:50 +00:00
Sandeep Patil
a2aa513fb6 sepolicy: restrict /vendor/app from most coredomains am: 1b5f81a2d2
am: ec5e26e40d

Change-Id: Ie791b20d2ae2e2690846f18fa0bc74926990bdbc
2017-04-06 23:13:47 +00:00
Sandeep Patil
c98b275e7b sepolicy: restrict access for /vendor/framework.
am: df679fdbd9

Change-Id: I4f0d343f42d8bc5c97b2a7c129c63c8e7c50cd3d
2017-04-06 23:03:30 +00:00
Sandeep Patil
d4a96aac4b sepolicy: restrict /vendor/overlay from most coredomains
am: 9075699a28

Change-Id: If3e3e246b7ef5ed0142bc7b180d4d7cfb559ea03
2017-04-06 23:03:25 +00:00
Sandeep Patil
ec5e26e40d sepolicy: restrict /vendor/app from most coredomains
am: 1b5f81a2d2

Change-Id: Ic9e87837f68ac31cfedd735bd20a44cdf029c79e
2017-04-06 23:03:19 +00:00
Dan Cashman
cb18d37d22 Merge "Add reverse-attribute mapping to sepolicy-analyze." into oc-dev am: 3841618292
am: c01e5a13c7

Change-Id: I700030a34443305af955a6153921447024a90d4f
2017-04-06 21:05:04 +00:00
Dan Cashman
c01e5a13c7 Merge "Add reverse-attribute mapping to sepolicy-analyze." into oc-dev
am: 3841618292

Change-Id: I9e08b187ccad4f4263de54aae1248b1691aa7d08
2017-04-06 21:01:12 +00:00
TreeHugger Robot
3841618292 Merge "Add reverse-attribute mapping to sepolicy-analyze." into oc-dev 2017-04-06 20:53:41 +00:00
Martijn Coenen
d790d2456a Merge "Add new classes and types for (hw|vnd)servicemanager." into oc-dev am: 133a9c41d2
am: 3dca6eb23f

Change-Id: I84eb61aad4ac9a27fd804abaae3830c6a8ced97b
2017-04-06 20:37:49 +00:00
Martijn Coenen
3dca6eb23f Merge "Add new classes and types for (hw|vnd)servicemanager." into oc-dev
am: 133a9c41d2

Change-Id: I2991bcea9893c2b9cd2b320e4ef1b071126f133e
2017-04-06 20:33:41 +00:00
Sandeep Patil
df679fdbd9 sepolicy: restrict access for /vendor/framework.
/vendor/framework is now designated location for vendor's platform
libraries. The directory is thus only made available for 'dex2oat'
coredomain.

Bug: 36680116
Test: Boot sailfish & angler and launch gApps, dialer w/ no denials for
      'vendor_framework_file'

Change-Id: I24c2ec30f836330005a972ae20d839bef9dcb8aa
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-04-06 13:28:16 -07:00
Sandeep Patil
9075699a28 sepolicy: restrict /vendor/overlay from most coredomains
The change makes 'vendor_overlay_file' accessible only to few platform
domains like idmap, system_server, zygote and appdomain.

The overlay files contains RROs (runtime resource overlays)

Bug: 36681210
Test: Boot sailfish (treble device) from wiped flashall
Test: Connect to wifi and launch chrome to load few websites.
Test: Launch camera and record + playback video

Change-Id: I3596ca89ad51d0e7d78c75121f22ea71209ee332
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-04-06 13:28:16 -07:00
Sandeep Patil
1b5f81a2d2 sepolicy: restrict /vendor/app from most coredomains
The change makes 'vendor_app_file' accessible only to few platform
domains like dex2oat, idmap, installd, system_server and appdomain.

Bug: 36681210
Test: Boot sailfish (treble device) from wiped flashall
Test: Connect to wifi and launch chrome to load few websites.
Test: Launch camera and record + playback video

Change-Id: Ib8757fedbf2e19c8381c8cd0f8f2693b2345534b
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-04-06 13:28:12 -07:00
Mark Salyzyn
d0e3c491a4 Merge "logcatd: introduce logcatd executable" into oc-dev am: dd9ba98209
am: 9c6a2447c4

Change-Id: I18cf57e51df23efe6be2bcedcc46437bda2f77ed
2017-04-06 20:20:36 +00:00
Dan Cashman
b1bdb55549 Merge "Move mapping_sepolicy.cil to /system partition." into oc-dev am: a902511f6a
am: bc9e17bbb5

Change-Id: I4a5643d0725b76afeb191ba121556a1e95fc3771
2017-04-06 20:20:05 +00:00
Martijn Coenen
133a9c41d2 Merge "Add new classes and types for (hw|vnd)servicemanager." into oc-dev 2017-04-06 20:05:01 +00:00
Mark Salyzyn
9c6a2447c4 Merge "logcatd: introduce logcatd executable" into oc-dev
am: dd9ba98209

Change-Id: I5f0a5d7e8dd238f2f105bfac101897c1fda7aa44
2017-04-06 19:48:42 +00:00
Mark Salyzyn
dd9ba98209 Merge "logcatd: introduce logcatd executable" into oc-dev 2017-04-06 19:37:07 +00:00
Dan Cashman
bc9e17bbb5 Merge "Move mapping_sepolicy.cil to /system partition." into oc-dev
am: a902511f6a

Change-Id: Idb05d766da22a1f52252e27f632af49928779987
2017-04-06 19:07:50 +00:00
TreeHugger Robot
a902511f6a Merge "Move mapping_sepolicy.cil to /system partition." into oc-dev 2017-04-06 19:02:33 +00:00
Ningyuan Wang
b00ceab676 Merge "Allow wificond to find permission" into oc-dev am: 705a3d0b11
am: 84674b7eee

Change-Id: I17c3df373607889b0ce1fa9cbda16346298e3ca9
2017-04-06 18:11:40 +00:00
Martijn Coenen
bc6d88d2da Add new classes and types for (hw|vnd)servicemanager.
Bug: 34454312
Bug: 36052864
Test: device boots, works
Change-Id: If61d9b736a74c5944cef4449de4dfbaf78d9ccfa
2017-04-06 11:02:23 -07:00
Ningyuan Wang
84674b7eee Merge "Allow wificond to find permission" into oc-dev
am: 705a3d0b11

Change-Id: I3b934fc0fb674051c8227b2a6f405e454ff9fa42
2017-04-06 18:00:05 +00:00
Ningyuan Wang
705a3d0b11 Merge "Allow wificond to find permission" into oc-dev 2017-04-06 17:47:20 +00:00
Dan Cashman
0e9c47c0af Move mapping_sepolicy.cil to /system partition.
This is a necessary first step to finalizing the SELinux policy build
process.  The mapping_sepolicy.cil file is required to provide backward
compatibility with the indicated vendor-targeted version.

This still needs to be extended to provide N mapping files and corresponding
SHA256 outputs, one for each of the N previous platform versions with which
we're backward-compatible.

Bug: 36783775
Test: boot device with matching sha256 and non-matching and verify that
device boots and uses either precompiled or compiled policy as needed. Also
verify that mapping_sepolicy.cil has moved.

Change-Id: I5692fb87c7ec0f3ae9ca611f76847ccff9182375
2017-04-06 10:00:42 -07:00
Dan Cashman
3a68bd169b Add reverse-attribute mapping to sepolicy-analyze.
sepolicy-analyze allows users to see all types that have a given
attribute, but not the reverse case: all attributes of a given type.
Add a '--reverse' option which enables this, but keeps the previous
interface.

Usage: sepolicy-analyze sepolicy attribute -r init

Bug: 36508258
Test: Build and run against current policy.

(cherry picked from commit d444ebedac)

Change-Id: I9813ebf61d50fb5abbc8e52be4cf62751979bbd4
2017-04-06 09:46:38 -07:00
Mark Salyzyn
36f2eb20b1 logcatd: introduce logcatd executable
logcatd is the same as logcat, except that the -L flag, if supplied,
runs once, then the command re-runs itself without the -L flag with
the same argument set.  By introducing a logcatd daemon executable
we can solve the problem of the longish reads from pstore that
sometimes occur when the system is excessively busy spinning in a
foreground task starving this daemon as we absorb the delay in
an init service, rather than in an init exec.  This would not have
been efficiently possible without the introduction of liblogcat.

Test: gTest logcat-unit-tests
Test: Manual check logpersist operations
Bug: 28788401
Bug: 30041146
Bug: 30612424
Bug: 35326290
Change-Id: I3454bad666c66663f59ae03bcd72e0fe8426bb0a
2017-04-06 14:48:20 +00:00
Alex Klyubin
195d569ce1 Merge "Wifi Keystore HAL is not a HAL" into oc-dev am: 7c3dbfeb69
am: ec9209be52

Change-Id: I4162ad407b058de775089b003f6a9227db379154
2017-04-06 04:08:54 +00:00
Alex Klyubin
ec9209be52 Merge "Wifi Keystore HAL is not a HAL" into oc-dev
am: 7c3dbfeb69

Change-Id: I5480d47059b876ceffdf029ea14f6480516b43ef
2017-04-06 04:05:55 +00:00
Alex Klyubin
7c3dbfeb69 Merge "Wifi Keystore HAL is not a HAL" into oc-dev 2017-04-06 04:02:04 +00:00
Alex Klyubin
482fb3a088 Merge "hwservicemanager is not a HAL" into oc-dev am: cfcffa9a5a
am: 0f7e68bfaa

Change-Id: I9120edc34036ab7f347d0ae27d99dc62aebab5c5
2017-04-06 03:44:04 +00:00
Alex Klyubin
0f7e68bfaa Merge "hwservicemanager is not a HAL" into oc-dev
am: cfcffa9a5a

Change-Id: I5979d4ea8a54944a7762cee2db04a078d0bd66bd
2017-04-06 03:39:23 +00:00
TreeHugger Robot
cfcffa9a5a Merge "hwservicemanager is not a HAL" into oc-dev 2017-04-06 03:36:20 +00:00
Sandeep Patil
9954cb6142 Merge changes from topic 'vendor-ocdev-relabel' into oc-dev am: 37792cecad
am: 6d2e29c1b7

Change-Id: I130f42e045695b3c08d25f4ba287a35c4687d8c1
2017-04-06 03:27:42 +00:00
Andreas Gampe
d0b1a96bcc Sepolicy: Add ASAN-Extract am: 82071b6859
am: ea26683eb4  -s ours

Change-Id: Id2a557022bfee400839784f2ae8623cea53fced9
2017-04-06 03:27:39 +00:00
Sandeep Patil
6d2e29c1b7 Merge changes from topic 'vendor-ocdev-relabel' into oc-dev
am: 37792cecad

Change-Id: I469f6de852f10515148ef824c85ff2febf31322e
2017-04-06 03:22:43 +00:00
Andreas Gampe
ea26683eb4 Sepolicy: Add ASAN-Extract
am: 82071b6859

Change-Id: Ia3bd034033f82aaed63b173e5205e7449e2743ef
2017-04-06 03:22:39 +00:00
TreeHugger Robot
37792cecad Merge changes from topic 'vendor-ocdev-relabel' into oc-dev
* changes:
  sepolicy: relabel /vendor
  Sepolicy: Add ASAN-Extract
2017-04-06 03:17:07 +00:00
Nathan Harold
964272b16e Merge changes from topic 'ipsec-svc-pick' into oc-dev am: 516c9abfcd
am: 7374742678

Change-Id: I6520c8c1c89ce0ce6c6165822e63c672290c9ad0
2017-04-06 02:51:08 +00:00
Nathan Harold
98df857773 Update Common NetD SEPolicy to allow Netlink XFRM am: 63a9315601
am: ca7c99ed54

Change-Id: I01ebaeb50ce10a1114ffc9a30999640bc86ff368
2017-04-06 02:51:02 +00:00
Nathan Harold
7374742678 Merge changes from topic 'ipsec-svc-pick' into oc-dev
am: 516c9abfcd

Change-Id: I59f1abcdb1f7184fc795c2164a5799e7ff7f4772
2017-04-06 01:57:20 +00:00
Nathan Harold
ca7c99ed54 Update Common NetD SEPolicy to allow Netlink XFRM
am: 63a9315601

Change-Id: I26a67ce475de966ec979cf4dfddd8b3210802552
2017-04-06 01:57:11 +00:00
Nathan Harold
516c9abfcd Merge changes from topic 'ipsec-svc-pick' into oc-dev
* changes:
  Add IpSecService SEPolicy
  Update Common NetD SEPolicy to allow Netlink XFRM
2017-04-06 01:34:37 +00:00
Sandeep Patil
277a20ebec sepolicy: relabel /vendor
The CL splits /vendor labeling from /system. Which was allowing all
processes read, execute access to /vendor.

Following directories will remain world readable
 /vendor/etc
 /vendor/lib(64)/hw/

Following are currently world readable but their scope
will be minimized to platform processes that require access
 /vendor/app
 /vendor/framework/
 /vendor/overlay

Files labelled with 'same_process_hal_file' are allowed to be
read + executed from by the world. This is for Same process HALs and
their dependencies.

Bug: 36527360
Bug: 36832490
Bug: 36681210
Bug: 36680116
Bug: 36690845
Bug: 36697328
Bug: 36696623
Bug: 36806861
Bug: 36656392
Bug: 36696623
Bug: 36792803

All of the tests were done on sailfish, angler, bullhead, dragon
Test: Boot and connect to wifi
Test: Run chrome and load websites, play video in youtube, load maps w/
      current location, take pictures and record video in camera,
      playback recorded video.
Test: Connect to BT headset and ensure BT audio playback works.
Test: OTA sideload using recovery
Test: CTS SELinuxHostTest pass

Change-Id: I278435b72f7551a28f3c229f720ca608b77a7029
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-04-05 13:58:32 -07:00
Andreas Gampe
82071b6859 Sepolicy: Add ASAN-Extract
Add selinux policies for init script and shell script to unzip a tar
containing ASAN libraries on boot.

Bug: 36458146
Test: m && m SANITIZE_TARGET=address
Test: manual (build steps for tar missing)
Change-Id: I5c3cb233aae93ee9985431090af902b0e3c1b0a7
(cherry picked from commit 0b74305011)
Merged-In: I5c3cb233aae93ee9985431090af902b0e3c1b0a7
2017-04-05 13:09:29 -07:00
Steven Moreland
360f946018 Merge "Remove unnecessary adbd permissions." into oc-dev am: 6821bb4079
am: 67b66f9960

Change-Id: I0bc8e8e3c29a312a7ac9d07154aaab0dc1965809
2017-04-05 18:17:44 +00:00
Steven Moreland
67b66f9960 Merge "Remove unnecessary adbd permissions." into oc-dev
am: 6821bb4079

Change-Id: I90f1ae5f671cbf7bcdcab728dd0bfac673f95050
2017-04-05 18:12:13 +00:00
TreeHugger Robot
6821bb4079 Merge "Remove unnecessary adbd permissions." into oc-dev 2017-04-05 18:09:17 +00:00
Steven Moreland
97848f0516 Remove unnecessary adbd permissions.
Test: adbd_test (with and without adb root)
  Note: one test fails without root with and without this change
        because of an unrelated shell selinux denial.
Test: adb screencap, pull, and verify
Test: Android Studio screenshot
Bug: 36643190
Change-Id: Ib534240bc9bb3a1f32b8865ca66db988902a0f4a
2017-04-05 16:07:00 +00:00