Commit Graph

12318 Commits

Author SHA1 Message Date
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
Mikhail Naganov
88ecc5002e Merge "Revert "Remove proc access from hal_audio.""
am: 151c609bee

Change-Id: I8ee5fe057a80c219dfc4599a2430373e1bd1cbab
2017-10-19 01:26:19 +00:00
Treehugger Robot
151c609bee Merge "Revert "Remove proc access from hal_audio."" 2017-10-19 01:20:07 +00:00
Chih-Hung Hsieh
038e322f3b Use -Werror in system/sepolicy
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I5df432c6d2f7ee19db89f44fbe3adec2bbcc0b41
2017-10-18 16:19:42 -07:00
Dan Cashman
c96721eaa9 Include 26.0 compat file on system image.
This file is necessary for using an mr1 system image in conjunction
with an oc-dev vendor image.  This is currently needed by GSI testing,
for example.

(cherry-pick of commit: 03596f28a4)

Bug: 66358348
Test: File is included on system image.
Change-Id: Ie694061d08acf17453feb596480e42974f8c714c
2017-10-18 15:52:54 -07:00
Mikhail Naganov
804838530e Revert "Remove proc access from hal_audio."
Reason: breaks "Ok google". Soundtrigger module needs to access /proc/asound/pcm.

This reverts commit 5cccb24915.

Bug: 67930353
Change-Id: I67e0912a6795b3715a3321d3fe5147f49cebc9b5
2017-10-18 20:30:14 +00:00
Jeff Vander Stoep
aaf613834d Merge "shell: grant access to read /proc/filesystems"
am: 61424ee70f

Change-Id: I7153e46cd60f56f917f9d6eda4a2cad626bceacb
2017-10-18 03:41:07 +00:00
Treehugger Robot
61424ee70f Merge "shell: grant access to read /proc/filesystems" 2017-10-18 03:37:44 +00:00
William Roberts
c73fb57045 Merge "fc_sort: update to latest"
am: f54c8ea95c

Change-Id: I19ccc870e94776f2f7766f91cd753f08cab3556c
2017-10-18 00:04:52 +00:00
Treehugger Robot
f54c8ea95c Merge "fc_sort: update to latest" 2017-10-17 23:58:38 +00:00
Steven Moreland
13c394677d sepolicy for lazy starting HIDL services
Now hwservicemanager can send ctl.interface_start messages
to init.

Note that 'set_prop(ctl.*, "foo")' maps to property context
for ctl.foo.

Bug: 64678982
Test: hwservicemanager can start interfaces
Change-Id: I9ab0bacd0c33edb0dcc4186fa0b7cc28fd8d2f30
2017-10-17 16:36:10 -07:00
Jeff Vander Stoep
d0dc1bb622 Merge "Start tracking platform/vendor data access violations"
am: 1acdacc536

Change-Id: Ifc6c2f26fd8cefa54fc36da95df5ae41fb7e54b1
2017-10-17 22:39:15 +00:00
Treehugger Robot
1acdacc536 Merge "Start tracking platform/vendor data access violations" 2017-10-17 22:34:33 +00:00
Jeff Vander Stoep
a80416e380 shell: grant access to read /proc/filesystems
Addresses the following test failure:
system/extras/tests/kernel.config/nfs_test.cpp:24: Failure
Value of: android::base::ReadFileToString("/proc/filesystems", &fs)
Actual: false
Expected: true

Denial:
avc: denied { read } for name="filesystems" dev="proc"
scontext=u:r:shell:s0 tcontext=u:object_r:proc_filesystems:s0
tclass=file

Bug: 67862327
Test: build
Change-Id: I9ada5404987cb474968afc8cb8d96137ee36c68d
2017-10-17 14:37:56 -07:00
Jeff Vander Stoep
2ae575b080 Start tracking platform/vendor data access violations
As part of Treble, enforce that the communication between platform
and vendor components use the official hw binder APIs. Prevent sharing
of data by file path. Platform and vendor components may share
files, but only via FD passed over hw binder.

This change adds the violators attribute that will be used to mark
violating domains that need to be fixed.

Bug: 34980020
Test: build
Change-Id: Id9acfbbc86bfd6fd0633b8164a37ce94d25ffa2c
2017-10-17 13:07:54 -07:00
Max Bires
aed69d67f7 Allowing system_server to search sysfs_power dir
rw access to sysfs_power file is not enough; in some cases search access
is also needed

Bug: 67895406
Test: system_server can access memory power statistics
Change-Id: I471e8e60626e6eed35e74e25a0f4be470885a459
2017-10-17 12:45:16 -07:00
Paul Crowley
ea8e21ee7f vold_prepare_subdirs sets policy in vold-created dirs.
am: 5b962cfd7b

Change-Id: I8adf367d7b432da57dbae1d7723ea59884af4a7d
2017-10-17 19:17:58 +00:00
Paul Crowley
5b962cfd7b vold_prepare_subdirs sets policy in vold-created dirs.
Bug: 25861755
Test: Boot device, observe logs
Change-Id: I6c13430d42e9794003eb48e6ca219b874112b900
Merged-In: I6c13430d42e9794003eb48e6ca219b874112b900
(cherry picked from commit 47f3ed09d2)
2017-10-17 10:17:20 -07:00
Robert Quattlebaum
ee1f3f8f80 wpantund: Allow wpantund to call callbacks
am: 0b2d26de3d

Change-Id: Ibed93a070e2f07f311b3ae82fc01bd9fc62cc714
2017-10-16 23:03:02 +00:00
Robert Quattlebaum
2f02b83d98 lowpan: Add wpantund to SEPolicy
am: fd03d51736

Change-Id: I5beab9e2ad7e34bd3748626b01b2333f9f2b7350
2017-10-16 23:02:36 +00:00
Tri Vo
81cd2151ab Merge "Remove proc access from hal_audio."
am: 28bc373d83

Change-Id: Id6b97fbae8d3453359d54c725248c3fba1401b6c
2017-10-16 23:02:12 +00:00
Robert Quattlebaum
0b2d26de3d wpantund: Allow wpantund to call callbacks
This change allows wpantund to call any binder callbacks that have
been registered with it. Generally, only privileged apps are allowed
to register callbacks with wpantund, so we are limiting the scope for
callbacks to only privileged apps. We also add shell to allow the
command-line utility `lowpanctl` to work properly from `adb shell`.

Bug: b/67393078
Test: manual
Change-Id: I64c52cc5e202725a81230dc67e1cd7c911cf8e1c
(cherry picked from commit 17319cb35c)
2017-10-16 14:10:40 -07:00
Robert Quattlebaum
fd03d51736 lowpan: Add wpantund to SEPolicy
Bug: b/64399219
Test: Manual
Change-Id: I4f6c7e4e3339ae95e43299bf364edff40d07c796
(cherry picked from commit c8bd93d7e8)
2017-10-16 14:10:40 -07:00
Tri Vo
28bc373d83 Merge "Remove proc access from hal_audio." 2017-10-16 20:30:48 +00:00
Tri Vo
5cccb24915 Remove proc access from hal_audio.
As a consequence, hal_audio_default (and any domain with hal_audio attribute)
loses access to proc label.

Bug: 65643247
Test: sailfish boots, can play sound through speakers and headset
(3.5mm, usb, and bluetooth) without denials from hal_audio to proc.
Test: VtsHalAudioEffectV2_0Target
Test: VtsHalAudioV2_0Target

Change-Id: I3eead5a26ef36b8840d31c5e078f006b0c2266a3
2017-10-16 12:46:12 -07:00
William Roberts
9a6b240b1f fc_sort: update to latest
Update to commit:
  - 5490639ac9

This solves all reported clang analyzer issues and is inline with upstream.

Test: veerify that md5sum of output files do not change.

Change-Id: I942145b8f9748c8ecd185f730c94d57cb77f5acc
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2017-10-16 10:04:46 -07:00