Commit Graph

12343 Commits

Author SHA1 Message Date
Max Bires
0187b23113 Adding statscompanion_service and a dontaudit for find/add
Instead of removing the denial generating code, a dontaudit and a
service label will be provided so that the team working on this new
feature doesn't have to get slowed up with local revision patches.

The dontaudit should be removed upon resolution of the linked bug.

Bug: 67468181
Test: statscompanion denials aren't audited
Change-Id: Ib4554a7b6c714e7409ea504f5d0b82d5e1283cf7
2017-10-23 16:45:13 -07:00
Jeffrey Vander Stoep
0787c2ea35 Merge "hal_audio: remove access to audiohal_data_file"
am: 1b223839e0

Change-Id: I5502508d7548a2772dd56155c9c8e08814fce5ef
2017-10-23 22:57:20 +00:00
Jeffrey Vander Stoep
1b223839e0 Merge "hal_audio: remove access to audiohal_data_file" 2017-10-23 22:49:35 +00:00
Nick Kralevich
773b60d101 Merge "Revert "Ensure only com.android.shell can run in the shell domain.""
am: 1ff4148c6a

Change-Id: I6dc8530628027cdafd7929cd9ed30bb6c2e5a1bc
2017-10-23 22:21:49 +00:00
Treehugger Robot
1ff4148c6a Merge "Revert "Ensure only com.android.shell can run in the shell domain."" 2017-10-23 22:15:57 +00:00
Tri Vo
d1f8f2227f Merge "shell: grant access to /proc/version"
am: f040f63230

Change-Id: I2f475ad00ca02367c89316f504ece42814538229
2017-10-23 20:55:17 +00:00
Tri Vo
f040f63230 Merge "shell: grant access to /proc/version" 2017-10-23 20:49:23 +00:00
Nick Kralevich
bf0c2a59f8 Revert "Ensure only com.android.shell can run in the shell domain."
The following error is occurring on master:

10-23 16:24:24.785 shell  4884  4884 E SELinux : seapp_context_lookup:  No match for app with uid 2000, seinfo platform, name com.google.android.traceur
10-23 16:24:24.785 shell  4884  4884 E SELinux : selinux_android_setcontext:  Error setting context for app with uid 2000, seinfo platform:targetSdkVersion=23:complete: Success
10-23 16:24:24.785 shell  4884  4884 E Zygote  : selinux_android_setcontext(2000, 0, "platform:targetSdkVersion=23:complete", "com.google.android.traceur") failed
10-23 16:24:24.785 shell  4884  4884 F zygote64: jni_internal.cc:593] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:648: selinux_android_setcontext failed
10-23 16:24:24.818 shell  4884  4884 F zygote64: runtime.cc:535] Runtime aborting...

Bug: 68126425
Bug: 68032516

This reverts commit 714ee5f293.

Change-Id: I7356c4e4facb1e532bfdeb575acf2d83761a0852
2017-10-23 20:22:07 +00:00
Jin Qian
c0125335e5 allow vold_prepare_subdirs to create storaged directories
Test: Boot device, observe logs
Bug: 63740245
Change-Id: I1068304b12ea90736b7927b7368ba1a213d2fbae
2017-10-23 11:34:47 -07:00
Tri Vo
4b829da526 shell: grant access to /proc/version
Addresses this denial during CtsBionicTestCases:
avc: denied { getattr } for path="/proc/version" dev="proc"
ino=4026532359 scontext=u:r:shell:s0 tcontext=u:object_r:proc_version:s0
tclass=file permissive=0

Bug: 68067856
Test: cts-tradefed run commandAndExit cts -m CtsBionicTestCases
--skip-all-system-status-check --primary-abi-only --skip-preconditions
No more denials to /proc/version
Change-Id: I7e927fbaf1a8ce3637e09452cbd50f475176838e
2017-10-23 11:33:43 -07:00
Jin Qian
6840b66a7e storaged: move storaged file from DE to CE
am: 81d8b0ee01

Change-Id: I5844b79cb367936ec3c02f343f5b90759c29cbcc
2017-10-23 17:04:28 +00:00
Paul Crowley
3a0579c7ee Merge "vold_prepare_subdirs needs to recursively delete"
am: 89b41f32ac

Change-Id: I4544a3f5add13c144b633561624fa1bebfeac29c
2017-10-23 15:31:53 +00:00
Jin Qian
81d8b0ee01 storaged: move storaged file from DE to CE
Allow vold/system_server to call storaged service

Test: adb shell storaged -u
Bug: 63740245
Change-Id: I88219e32520006db20299468b7a8c7ce0bfa58e0
Merged-In: I88219e32520006db20299468b7a8c7ce0bfa58e0
(cherry picked from commit fa6c3d7c4c)
2017-10-23 08:31:46 -07:00
Paul Crowley
89b41f32ac Merge "vold_prepare_subdirs needs to recursively delete" 2017-10-23 15:28:00 +00:00
Jeff Vander Stoep
b1a921e24e hal_audio: remove access to audiohal_data_file
This is no longer used and violates Treble data separation.

Bug: 68057930
Test: verify on Sailfish that /data/misc/audiohal doesn't exist
    This dir appears to be Qualcomm specific and should not have
    been defined in core policy.

Change-Id: I55fba7564203a7f8a1d8612abd36ec1f89dc869d
2017-10-21 03:29:36 +00:00
Jeff Vander Stoep
a4a2c829d0 Merge "priv_app: move logspam suppression to core policy"
am: d1467ad8c8

Change-Id: I40639979883bf2e7b1d57d6c23abfa5da704eb6f
2017-10-20 23:02:30 +00:00
Treehugger Robot
d1467ad8c8 Merge "priv_app: move logspam suppression to core policy" 2017-10-20 22:54:21 +00:00
Nick Kralevich
88b23b42af Merge "Fixup neverallow rule"
am: 917cf072d2

Change-Id: Ifa8e92e90810eaae408254c949aa86411730e8d2
2017-10-20 22:46:57 +00:00
Treehugger Robot
917cf072d2 Merge "Fixup neverallow rule" 2017-10-20 22:40:31 +00:00
Tri Vo
98f1821456 Restrict netd fwk policy.
am: 8dabc2ce74

Change-Id: Id5b3e446c5ac050fc73beb5a7473789ab59d2baf
2017-10-20 22:14:06 +00:00
Jeff Vander Stoep
bf5a4b71e7 Merge changes Icb6ea6ce,I89b546c7
am: 4bd0c6fcc3

Change-Id: Iacb037f79b4af9c2024fbb54484205b0bc2753c9
2017-10-20 22:13:42 +00:00
Paul Crowley
2f4a4b7858 vold_prepare_subdirs needs to recursively delete
Bug: 25861755
Test: Boot device, create user, create files, remove user, observe logs
Change-Id: I195514eb45a99c1093998786ab385338463269c0
Merged-In: I195514eb45a99c1093998786ab385338463269c0
(cherry picked from commit eb7340d94e)
2017-10-20 15:07:49 -07:00
Tri Vo
8dabc2ce74 Restrict netd fwk policy.
Remove netd access to sysfs_type attribute.

These were moved from vendor to fwk policy:
1. sysfs_net type declaration
2. labeling of /sys/devices/virtual/net with sysfs_net
3. netd access to sysfs_net

Bug: 65643247
Test: can browse internet without netd denials
Test: netd_unit_test, netd_integration_test without netd denials
Merged-In: Ic1b95a098f438c4c6bc969bee801bf7dd1a13f6e
Change-Id: Ic1b95a098f438c4c6bc969bee801bf7dd1a13f6e
(cherry picked from commit e62a56b717)
2017-10-20 22:07:01 +00:00
Treehugger Robot
4bd0c6fcc3 Merge changes Icb6ea6ce,I89b546c7
* changes:
  Shell: grant permission to run lsmod
  Dumpstate: cleanup denial logspam
2017-10-20 21:59:27 +00:00
Max Bires
5788e111ca Merge "Relabeling /proc/asound so everything has proc_asound label"
am: 4a14d16ecb

Change-Id: I29eff41d008886b19218864923a1e48fc2945c26
2017-10-20 21:50:22 +00:00
Max Bires
4a14d16ecb Merge "Relabeling /proc/asound so everything has proc_asound label" 2017-10-20 21:43:45 +00:00
Jeff Vander Stoep
6233848f78 priv_app: move logspam suppression to core policy
No sign of these denials getting cleaned up, so supress them in core
policy.

Test: build
Change-Id: I0320425cb72cbd15cef0762090899491338d4f7c
2017-10-20 13:37:04 -07:00
Nick Kralevich
1d61883a04 Ensure only com.android.shell can run in the shell domain.
am: 714ee5f293

Change-Id: I3580b3e1ed28e31c41e221bc8697a90bdc70eca8
2017-10-20 20:33:05 +00:00
Nick Kralevich
2ec15e5b27 Fixup neverallow rule
When we removed /data/dalvik-cache execute permission for system_server
(b/37214733, b/31780877), I forgot to fixup this neverallow rule.
Fix rule.

Test: policy compiles.
Change-Id: I38b821a662e0d8304b8390a69a6d9e923211c31e
2017-10-20 13:27:26 -07:00
Jeff Vander Stoep
f5ea6145e7 Shell: grant permission to run lsmod
lsmod needs access to /proc/modules

Test: build, run lsmod
Change-Id: Icb6ea6ce791cc6a22c89aa8e90c44749497c8468
2017-10-20 12:38:17 -07:00
Jeff Vander Stoep
d5678c11de Dumpstate: cleanup denial logspam
Dumpstate lists all services and then enumerates over them. Suppress
"find" denials for services which dumpstate is neverallowed access
to.

Dumpstate includes the kernel command line in bug reports. Grant access
to /proc/cmdline.

Test: build. Run adb bugreport.
Change-Id: I89b546c728a034638f9257c6cf93366d99a10762
2017-10-20 12:37:03 -07:00
Nick Kralevich
714ee5f293 Ensure only com.android.shell can run in the shell domain.
Don't allow apps to run with uid=shell or selinux domain=shell unless
the package is com.android.shell.

Add a neverallow assertion (compile time assertion + CTS test) to ensure
no regressions.

Bug: 68032516
Test: policy compiles, device boots, and no obvious problems.
Change-Id: Ic6600fa5608bfbdd41ff53840d904f97d17d6731
2017-10-20 09:58:08 -07:00
Nick Kralevich
f9eb931418 Merge "disallow SIOCATMARK"
am: 2ecdfb49bc

Change-Id: I83612a33e951c7da0406b89cf739f6afb9a21aeb
2017-10-20 14:41:28 +00:00
Treehugger Robot
2ecdfb49bc Merge "disallow SIOCATMARK" 2017-10-20 14:35:59 +00:00
Dan Cashman
20fffbb354 Merge "Include 26.0 compat file on system image."
am: c734710c13

Change-Id: I7fa6aa8b958b12a3d57da594f23d45f2300e295c
2017-10-20 09:40:06 +00:00
Treehugger Robot
c734710c13 Merge "Include 26.0 compat file on system image." 2017-10-20 09:36:13 +00:00
Steven Moreland
ceec4e9f89 Merge "sepolicy for lazy starting HIDL services"
am: d18ff63afb

Change-Id: I0a6ffaeabb865e033a232943667f4becdcb61f4a
2017-10-20 06:43:42 +00:00
Treehugger Robot
d18ff63afb Merge "sepolicy for lazy starting HIDL services" 2017-10-20 06:38:42 +00:00
Nick Kralevich
93615b144d disallow SIOCATMARK
The use of SIOCATMARK is not recommended per rfc6093.

This ioctl is not currently allowed on Android. Add a neverallowxperm
statement (compile time assertion + CTS test) to ensure this never
regresses.

Bug: 68014825
Test: policy compiles.
Change-Id: I41272a0cb157ac9aa38c8e67aabb8385403815f9
2017-10-19 19:53:39 -07:00
Tri Vo
b5f4f2050e Merge "Re-add access to /sys/class/android_usb."
am: 9f78854458

Change-Id: I272257fbad422e9cac1aa6d703ec7124694d0cac
2017-10-20 00:38:58 +00:00
Treehugger Robot
9f78854458 Merge "Re-add access to /sys/class/android_usb." 2017-10-20 00:14:22 +00:00
Chih-Hung Hsieh
b03597d1b4 Merge "Use -Werror in system/sepolicy"
am: 0d2303be0c

Change-Id: I20f23cb1884013dda006c3232adcc8dbc73b166c
2017-10-19 23:17:45 +00:00
Treehugger Robot
0d2303be0c Merge "Use -Werror in system/sepolicy" 2017-10-19 22:53:57 +00:00
Max Bires
aae18186e1 Relabeling /proc/asound so everything has proc_asound label
This is to simplify access for hal_audio

Test: ls -Z in /proc/asound correctly shows everything with proc_asound
selinux label

Change-Id: I66ed8babf2363bee27a748147eb358d57a4594c4
2017-10-19 15:51:38 -07:00
William Roberts
9b1affaa07 Merge "fc_sort: rectify with upstream"
am: adef499d29

Change-Id: I340af1b82e8610cb8e341fd102c0724d5d882d15
2017-10-19 19:31:08 +00:00
Tri Vo
a93a1e38e1 Re-add access to /sys/class/android_usb.
Access to /sys/class/android_usb/ was lost when that dir received a new
label sysfs_android_usb.

Bug: 65643247
Test: can enter recovery mode and sideload through usb  without denials to /sys
Change-Id: I22821bab9833b832f13e0c45ff8da4dae115fa4d
2017-10-19 12:31:00 -07:00
Treehugger Robot
adef499d29 Merge "fc_sort: rectify with upstream" 2017-10-19 19:26:03 +00:00
Max Bires
a6734faca9 Merge "Allowing system_server to search sysfs_power dir"
am: 35f2cf802c

Change-Id: I154f8e4ae85859a3e0cb1e7bcf314c9a5cf06ead
2017-10-19 18:53:58 +00:00
Treehugger Robot
35f2cf802c Merge "Allowing system_server to search sysfs_power dir" 2017-10-19 18:47:25 +00:00
William Roberts
1cf1064baa fc_sort: rectify with upstream
Code review of:
  - https://android-review.googlesource.com/#/c/platform/system/sepolicy/+/512420/

had some comments. These were addressed and upstreamed here:
  - 65620e0f94

Bring these changes back into the AOSP tree.

Test: verify that output sorted device files did not change hashes when built.

Change-Id: I7f07d3f74923cf731e853629034469784fc669f7
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2017-10-19 16:04:24 +00:00