Commit graph

8564 commits

Author SHA1 Message Date
Mark Salyzyn
c480ee7d45 Merge "logd: add getEventTag command and service" am: 542a46267f
am: 2cf8777fe5

Change-Id: Iddcca41bed60cc584287a7d1128b90d02bb7e656
2017-02-01 21:34:46 +00:00
Mark Salyzyn
2cf8777fe5 Merge "logd: add getEventTag command and service"
am: 542a46267f

Change-Id: I169dbd05d71939e6a337e20a131caa7cbad3a977
2017-02-01 21:31:40 +00:00
Mark Salyzyn
542a46267f Merge "logd: add getEventTag command and service" 2017-02-01 21:24:06 +00:00
Calin Juravle
9ab9ba6592 Remove SElinux audit to libart_file am: 01ee59a7b4
am: 2ce7f8362f

Change-Id: I88ba39fbbb013a14733058478206c90dfa09ca2b
2017-02-01 00:59:03 +00:00
Calin Juravle
2ce7f8362f Remove SElinux audit to libart_file
am: 01ee59a7b4

Change-Id: I2d5889cd3faf16957ed329234ffd7b3bc6504203
2017-02-01 00:56:37 +00:00
Calin Juravle
01ee59a7b4 Remove SElinux audit to libart_file
Since it was introduced it caused quite a few issues and it spams the
SElinux logs unnecessary.

The end goal of the audit was to whitelist the access to the
interpreter. However that's unfeasible for now given the complexity.

Test: devices boots and everything works as expected
      no more auditallow logs

Bug: 29795519
Bug: 32871170
Change-Id: I9a7a65835e1e1d3f81be635bed2a3acf75a264f6
2017-01-31 23:43:14 +00:00
Alex Klyubin
f428935193 Merge "Device-agnostic policy for vendor image" am: 9e90f83e7b
am: e9f4b5998c

Change-Id: Ic85c671aa7ceb78f0814a799e609f51384b3a125
2017-01-31 21:34:23 +00:00
Alex Klyubin
e9f4b5998c Merge "Device-agnostic policy for vendor image"
am: 9e90f83e7b

Change-Id: Idf1178328847bf597005c66c7652e4bda25c3bdd
2017-01-31 21:32:19 +00:00
Alex Klyubin
9e90f83e7b Merge "Device-agnostic policy for vendor image" 2017-01-31 21:29:10 +00:00
Mark Salyzyn
b6d71e6f07 logd: restrict access to /dev/event-log-tags am: d33a9a194b
am: 650c101f51

Change-Id: Ida00e8474497cdbdb9c1ec4f4849b2eed7683026
2017-01-31 17:34:59 +00:00
Mark Salyzyn
650c101f51 logd: restrict access to /dev/event-log-tags
am: d33a9a194b

Change-Id: I8f95628067641e773623603681f226dab4939f2a
2017-01-31 17:33:00 +00:00
Mark Salyzyn
384ce66246 logd: add getEventTag command and service
The event log tag service uses /dev/event-log-tags, pstore and
/data/misc/logd/event-log-tags as sticky storage for the invented
log tags.

Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Bug: 31456426
Change-Id: Iacc8f36f4a716d4da8dca78a4a54600ad2a288dd
2017-01-31 15:50:42 +00:00
Mark Salyzyn
d33a9a194b logd: restrict access to /dev/event-log-tags
Create an event_log_tags_file label and use it for
/dev/event-log-tags.  Only trusted system log readers are allowed
direct read access to this file, no write access.  Untrusted domain
requests lack direct access, and are thus checked for credentials via
the "plan b" long path socket to the event log tag service.

Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests
Bug: 31456426
Bug: 30566487
Change-Id: Ib9b71ca225d4436d764c9bc340ff7b1c9c252a9e
2017-01-31 15:50:15 +00:00
Alex Klyubin
5596172d23 Device-agnostic policy for vendor image
Default HAL implementations are built from the platform tree and get
placed into the vendor image. The SELinux rules needed for these HAL
implementations to operate thus need to reside on the vendor
partition.

Up to now, the only place to define such rules in the source tree was
the system/sepolicy/public directory. These rules are placed into the
vendor partition. Unfortunately, they are also placed into the
system/root partition, which thus unnecessarily grants these rules to
all HAL implementations of the specified service, default/in-process
shims or not.

This commit adds a new directory, system/sepolicy/vendor, whose
rules are concatenated with the device-specific rules at build time.
These rules are thus placed into the vendor partition and are not
placed into the system/root partition.

Test: No change to SELinux policy.
Test: Rules placed into vendor directory end up in nonplat* artefacts,
      but not in plat* artefacts.
Bug: 34715716
Change-Id: Iab14aa7a3311ed6d53afff673e5d112428941f1c
2017-01-30 18:48:17 -08:00
Tao Bao
7c7b92b2b9 Merge "recovery: Allow accessing sysfs_leds." am: 04641948c0
am: 964c783f58

Change-Id: Ic71ba8a7219e9fc06d606e7218e863d678651cdb
2017-01-31 01:04:33 +00:00
Yin-Chia Yeh
1b17567178 Merge "Camera: grant system file perm for Treble" am: 81a73508be
am: c701272dde

Change-Id: I151807e1c2e69674f296827b2701dbe78476e7e8
2017-01-31 01:04:20 +00:00
Tao Bao
964c783f58 Merge "recovery: Allow accessing sysfs_leds."
am: 04641948c0

Change-Id: I8e2a131d51725e4ba2cb5867fe99565f810e6381
2017-01-31 00:57:31 +00:00
Yin-Chia Yeh
c701272dde Merge "Camera: grant system file perm for Treble"
am: 81a73508be

Change-Id: I1fd4a6c21ae80463fe67cc85db2949382453b948
2017-01-31 00:55:28 +00:00
Treehugger Robot
04641948c0 Merge "recovery: Allow accessing sysfs_leds." 2017-01-31 00:52:06 +00:00
Treehugger Robot
81a73508be Merge "Camera: grant system file perm for Treble" 2017-01-31 00:45:52 +00:00
Alex Klyubin
9595969ae6 Merge "Remove hal_light from system_server domain" am: 29f1e21d31
am: 42ab1b4f79

Change-Id: Ib98d75926d897486fb271348f623c804b01e3608
2017-01-30 23:16:53 +00:00
Alex Klyubin
42ab1b4f79 Merge "Remove hal_light from system_server domain"
am: 29f1e21d31

Change-Id: I8b8d1fca11d748c09faab382e9d0c8f0ca1fc1af
2017-01-30 23:14:53 +00:00
Alex Klyubin
29f1e21d31 Merge "Remove hal_light from system_server domain" 2017-01-30 23:11:01 +00:00
Yin-Chia Yeh
8a6d397f48 Camera: grant system file perm for Treble
Test: Google Camera app working
Bug: 34786432
Change-Id: Ie14ac8a58a331f96a56fb6fc09318e2d737c4076
2017-01-30 14:52:21 -08:00
Tao Bao
f0f4db9f01 recovery: Allow accessing sysfs_leds.
Bug: 34077703
Test: recovery image can set the backlight brightness.
Change-Id: I34d72e1a0e959c2d9f48b3b9c55c4eb2d1cc41bf
2017-01-30 14:25:32 -08:00
Sandeep Patil
32f64f7ecd property_context: split into platform and non-platform components. am: a86316e852
am: 0b694d17b5

Change-Id: I6a7f6aa6a79f44dcb08907247b1365a0208e0eda
2017-01-30 19:25:38 +00:00
Sandeep Patil
0b694d17b5 property_context: split into platform and non-platform components.
am: a86316e852

Change-Id: Ia7e8b1746ca814c647c2d945960d1a85b96958d3
2017-01-30 19:21:55 +00:00
Sandeep Patil
a86316e852 property_context: split into platform and non-platform components.
Bug: 33746484
Test: Successfully boot with original service and property contexts.
      Successfully boot with split serivce and property contexts.

Change-Id: I87f95292b5860283efb2081b2223e607a52fed04
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-01-29 21:09:11 +00:00
Janis Danisevskis
2290a7fb22 Preliminary policy for hal_keymaster (TREBLE) am: e8acd7695b
am: 02ce635b35

Change-Id: I3b59fb9b8839b85ac291db3061f9b3d10f0af7c4
2017-01-28 01:03:52 +00:00
Janis Danisevskis
02ce635b35 Preliminary policy for hal_keymaster (TREBLE)
am: e8acd7695b

Change-Id: I24a7a10a4658f6db968ba13e556172659b859795
2017-01-28 01:01:22 +00:00
Janis Danisevskis
e8acd7695b Preliminary policy for hal_keymaster (TREBLE)
This adds the premissions required for
android.hardware.keymaster@2.0-service to access the keymaster TA
as well as for keystore and vold to lookup and use
android.hardware.keymaster@2.0-service.

IT DOES NOT remove the privileges from keystore and vold to access
the keymaster TA directly.

Test: Run keystore CTS tests
Bug: 32020919

(cherry picked from commit 5090d6f324)

Change-Id: Ib02682da26e2dbcabd81bc23169f9bd0e832eb19
2017-01-27 15:02:57 -08:00
Alex Klyubin
384a73deb2 Remove hal_light from system_server domain
HAL clients should not be annotated with hal_x and haldomain. This may
grant them too much access. Instead, the policy needed for using
in-process HALs should be directly embedded into the client's domain
rules.

Test: Boot sailfish, adjust screen brightness from the system UI, no
      SELinux denials for system_server to do with sysfs_leds.
Bug: 34715716

Change-Id: Iccb4224d770583e3c38930e8562723d57d283077
2017-01-27 11:09:14 -08:00
Alex Klyubin
5ebb8f6f8b Move webview_zygote policy to private am: a7653ee2ed
am: 1318500076

Change-Id: Idc884e1d812dd10d9e69a71b030e3fe5caa8ac7b
2017-01-27 18:37:57 +00:00
Alex Klyubin
1318500076 Move webview_zygote policy to private
am: a7653ee2ed

Change-Id: I599f550ba4875e06f51d00658c9bac4c1add51bb
2017-01-27 18:34:59 +00:00
Alex Klyubin
a7653ee2ed Move webview_zygote policy to private
This leaves only the existence of webview_zygote domain and its
executable's webview_zygote_exec file label as public API. All other
rules are implementation details of this domain's policy and are thus
now private.

Test: Device boots, with Multiproces WebView developer setting
      enabled, apps with WebView work fine. No new denials.
Bug: 31364497

Change-Id: I179476c43a50863ee3b327fc5155847d992a040d
2017-01-27 17:01:43 +00:00
Badhri Jagan Sridharan
abd94f25f2 Merge "sepolicy for usb hal" am: deefb43328
am: a03dc09d97

Change-Id: Idbf416c1355edfbf05db9f24c455ee1cc65e2b5b
2017-01-27 07:40:19 +00:00
Steven Moreland
6ac350b92f Merge "Dumpstate: hwbinder_use" am: aa10429b6c
am: 1a1c00009f

Change-Id: Iaebcb195340a9c4ed87c21f6bc97dfc623f485bd
2017-01-27 07:40:03 +00:00
Sandeep Patil
c0dd74b0f9 Merge "Fix cleanspec for property_contexts" am: 6d26506cb6
am: 90eabf79c3

Change-Id: Ibd246c107ed13b0fdf2bc53de41d74a447d7a71c
2017-01-27 07:39:20 +00:00
Alex Klyubin
55e18476dc Move zygote policy to private am: 966efedec8
am: 4d6ace7c05

Change-Id: I5952a08ab7471e71886f8f1891173859d211b768
2017-01-27 07:39:06 +00:00
Badhri Jagan Sridharan
a03dc09d97 Merge "sepolicy for usb hal"
am: deefb43328

Change-Id: Icd6a6fed9d8f1383d6ccf42c2104cfb5125847f5
2017-01-27 01:43:32 +00:00
Treehugger Robot
deefb43328 Merge "sepolicy for usb hal" 2017-01-27 01:40:46 +00:00
Steven Moreland
1a1c00009f Merge "Dumpstate: hwbinder_use"
am: aa10429b6c

Change-Id: I44674e7d7337f5669708910055ff58a848b89c48
2017-01-27 01:25:15 +00:00
Sandeep Patil
90eabf79c3 Merge "Fix cleanspec for property_contexts"
am: 6d26506cb6

Change-Id: I4b3f6c2da3e8e1b7966021d4efbfde803c9fb7b1
2017-01-27 01:24:59 +00:00
Alex Klyubin
4d6ace7c05 Move zygote policy to private
am: 966efedec8

Change-Id: I821217b5bfc777dd1a35f286b2e3a967228e324c
2017-01-27 01:24:47 +00:00
Treehugger Robot
aa10429b6c Merge "Dumpstate: hwbinder_use" 2017-01-27 00:25:48 +00:00
Badhri Jagan Sridharan
ae206f1623 sepolicy for usb hal
Bug: 31015010

cherry-pick from b6e4d4bdf1

Test: checked for selinux denial msgs in the dmesg logs.
Change-Id: I8285ea05162ea0d75459e873e5c2bad2dbc7e5ba
2017-01-27 00:05:19 +00:00
Treehugger Robot
6d26506cb6 Merge "Fix cleanspec for property_contexts" 2017-01-26 23:45:00 +00:00
Steven Moreland
ba68f5547e Dumpstate: hwbinder_use
Dumpstate needs the hwbinder_use permission in order to talk to hardware
services.

Bug: 34709307
Test: no denials submitting bugreport
Change-Id: Ic51da5371cd346c0fa9fb3881a47adaf53c93566
2017-01-26 15:00:21 -08:00
Sandeep Patil
4ca1f427b9 Fix cleanspec for property_contexts
The CLs that split the property_contexts at
topic:prop_ctx_split status:merged broke incremental build,
which was later fixed in I22ecd1d3698404df352263fa99b56cb65247a23b.

The prop_ctx CLs were later reverted due to updater breakage as in
b/34370523. So, this change adds the property_contexts clean steps
to fix the incremental builds

Change-Id: Ic32b144dbfada3a6c34f9502099220e7e3c63682
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-01-26 13:38:30 -08:00
Alex Klyubin
f328194b0f Move appdomain policy to private am: 8429a331aa
am: e430bc90a8

Change-Id: I7336389db42d51f6d8b8dfe6fc011754e5ee991f
2017-01-26 21:31:21 +00:00