Commit Graph

12305 Commits

Author SHA1 Message Date
Treehugger Robot
fe00f563ab Merge "Remove fingerprintd access to sysfs_type and cgroup label." 2017-10-26 05:14:28 +00:00
Paul Crowley
5850a2ae6b Move most of public/vold_prepare_subdirs.te to private
AIUI permissions should be in private unless they need to be public.

Bug: 25861755
Test: Boot device, create and remove a user, observe logs
Change-Id: I6c3521d50dab2d508fce4b614d51e163e7c8f3da
2017-10-25 13:06:25 -07:00
Tom Cherry
621c24cbab add vendor_init.te
First pass at adding vendor_init.te

Bug: 62875318
Test: boot sailfish with vendor_init
Change-Id: I35cc9be324075d8baae866d6de4166c37fddac68
2017-10-25 09:21:30 -07:00
Tom Cherry
2286b39712 Merge "Add label for /proc/sys/vm/page-cluster" 2017-10-25 16:13:41 +00:00
Paul Crowley
59fba92095 Merge "C++ version of vold_create_subdirs needs extra permission" 2017-10-24 22:27:49 +00:00
Tom Cherry
8bdb1dab56 Add label for /proc/sys/vm/page-cluster
Test: boot sailfish with no audit when writing to page-cluster
Change-Id: I2bfebdf9342594d66d95daaec92d71195c93ffc8
2017-10-24 13:53:51 -07:00
Tri Vo
71b19aa601 Merge "/proc, /sys access from uncrypt, update_engine, postinstall_dexopt" 2017-10-24 20:36:22 +00:00
Paul Crowley
f0c7b46df5 C++ version of vold_create_subdirs needs extra permission
10-23 16:40:43.763  7991  7991 I auditd  : type=1400 audit(0.0:79): avc: denied { open } for comm="vold_prepare_su" path="/dev/pts/1" dev="devpts" ino=4 scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:devpts:s0 tclass=chr_file permissive=0

Bug: 67901036
Test: Boot device, create user, create files, remove user, observe logs

Change-Id: I8d33dfd2a0b24611773001f20101db40aeb13632
2017-10-24 13:32:57 -07:00
Bill Yi
37760442c0 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD 2017-10-24 11:33:08 -07:00
Treehugger Robot
8e805857f0 Merge "allow vold_prepare_subdirs to create storaged directories" 2017-10-24 18:14:17 +00:00
Max Bires
cee16b0553 Adding statscompanion_service and a dontaudit for find/add
am: 0187b23113

Change-Id: Id51afcd1de3c46463120a205624d77c33f636682
2017-10-24 17:32:16 +00:00
Tri Vo
04fb82f232 /proc, /sys access from uncrypt, update_engine, postinstall_dexopt
New types:
1. proc_random
2. sysfs_dt_firmware_android

Labeled:
1. /proc/sys/kernel/random as proc_random.
2. /sys/firmware/devicetree/base/firmware/android/{compatible, fstab,
vbmeta} as sysfs_dt_firmware_android.

Changed access:
1. uncrypt, update_engine, postinstall_dexopt have access to generic proc
and sysfs labels removed.
2. appropriate permissions were added to uncrypt, update_engine,
update_engine_common, postinstall_dexopt.

Bug: 67416435
Bug: 67416336
Test: fake ota go/manual-ab-ota runs without denials
Test: adb sideload runs without denials to new types
Change-Id: Id31310ceb151a18652fcbb58037a0b90c1f6505a
2017-10-24 16:40:45 +00:00
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