Commit graph

1394 commits

Author SHA1 Message Date
Bartosz Fabianowski
0f52004b97 Revert "SELinux policy for secure persistent netd storage" am: 06486796a4
am: edcfb2e10d

Change-Id: I86565448fa4d5ccd412772825decb5dc62cd6343
2017-06-08 18:53:36 +00:00
Bartosz Fabianowski
06486796a4 Revert "SELinux policy for secure persistent netd storage"
This broke the build on master. See b/17613910#comment17
for details.

This reverts commit ef1fd98b6a.

Change-Id: I11f7d463061a9b6340c11827135586266e26f016
2017-06-08 10:57:55 +00:00
Joel Scherpelz
36efd0c454 SELinux policy for secure persistent netd storage am: ef1fd98b6a
am: 9381cb3dce

Change-Id: I3ae9005ee76b51105ec215cefc5a81c25405c482
2017-06-08 07:51:19 +00:00
Joel Scherpelz
ef1fd98b6a SELinux policy for secure persistent netd storage
This is used to persist RFC 7217 stable secrets across device reboots.

Test: as follows
    - Manually tested that stable_secret is generated on first use and
      persists until reset of user data partition (factory reset).
    - Tested that "adb shell getprop" was denied access to
      persist.netd.stable_secret after running "adb unroot".
Bug: 17613910

Change-Id: I4dad00fb189d697aceaffae49ad63987c7e45054
2017-06-08 15:07:57 +09:00
Yabin Cui
690ab19801 Allow run-as to read/write unix_stream_sockets created by adbd. am: 1847a38b4a am: 2394619394
am: 96df849f15

Change-Id: I631667710b2998361b0e2db3f13f5fb7d2582420
2017-06-06 23:35:04 +00:00
Sandeep Patil
0a53f1d4fa Fix coredomain violation for modprobe
am: e41af20397

Change-Id: I586cf07d87339f83d66919871d1531e9b8d79c4e
2017-06-06 03:54:39 +00:00
Yabin Cui
1847a38b4a Allow run-as to read/write unix_stream_sockets created by adbd.
This is to Allow commands like `adb shell run-as ...`.

Bug: http://b/62358246
Test: run commands manually.
Change-Id: I7bb6c79a6e27ff1224a80c6ddeffb7f27f492bb2
2017-06-05 18:20:42 -07:00
Josh Gao
dde38d9b33 crash_dump_fallback: allow dumpstate:pipe_file write. am: 7aa085233a am: 7b19b08130
am: 9ff58c84a4

Change-Id: If0bc8e741af7cade57c76020db89516c1da69728
2017-06-06 00:43:51 +00:00
Josh Gao
7aa085233a crash_dump_fallback: allow dumpstate:pipe_file write.
It appears that selinux requires the write permission to receive
a writable pipe from dumpstate, for unclear reasons. Add the permission
for now.

Bug: http://b/62297059
Test: dumpstate
Change-Id: I0f25682177115aacd5c2203ddc0008228b0380ad
2017-06-05 14:50:31 -07:00
Sandeep Patil
e41af20397 Fix coredomain violation for modprobe
modprobe domain was allowed to launch vendor toolbox even if its a
coredomain. That violates the treble separation. Fix that by creating a
separate 'vendor_modprobe' domain that init is allowed to transition to
through vendor_toolbox.

Bug: 37008075
Test: Build and boot sailfish

Change-Id: Ic3331797691bb5d1fdc05a674aa4aa313e1f86b2
Signed-off-by: Sandeep Patil <sspatil@google.com>
(cherry picked from commit 9e366a0e49)
2017-06-05 08:09:18 -07:00
Josh Gao
dbf8d02804 Merge "crash_dump_fallback: allow dumpstate:fd use." into oc-dev
am: f378708c5c

Change-Id: Ia51ea7ccf0974ed1bacfea950571c6e10ed2b1bf
2017-06-03 00:07:22 +00:00
Josh Gao
f378708c5c Merge "crash_dump_fallback: allow dumpstate:fd use." into oc-dev 2017-06-03 00:01:38 +00:00
Josh Gao
2a00056a95 crash_dump_fallback: allow dumpstate:fd use.
Bug: http://b/62297059
Test: mma
Merged-In: Ibcd93e5554a9c2dd75fbfb42294fbc9b96ebc8cc
Change-Id: Ibcd93e5554a9c2dd75fbfb42294fbc9b96ebc8cc
(cherry picked from commit 17885f148d)
2017-06-02 15:04:29 -07:00
Josh Gao
17885f148d crash_dump_fallback: allow dumpstate:fd use.
Bug: http://b/62297059
Test: mma
Change-Id: Ibcd93e5554a9c2dd75fbfb42294fbc9b96ebc8cc
2017-06-02 14:43:27 -07:00
Andrew Scull
39a81fd517 Merge "Add missing sepolicies for OemLock HAL." into oc-dev
am: 60e4fd9dfa

Change-Id: I1628907aeb743c3cb0938e7993237206523fdeb5
2017-06-01 22:22:03 +00:00
Andrew Scull
e8d4bec783 Merge "Add missing sepolicies for the Weaver HAL." into oc-dev
am: cd26745098

Change-Id: I20479829d542df345275c0c2b4512788a30fba4c
2017-06-01 22:21:48 +00:00
TreeHugger Robot
60e4fd9dfa Merge "Add missing sepolicies for OemLock HAL." into oc-dev 2017-06-01 22:05:18 +00:00
TreeHugger Robot
cd26745098 Merge "Add missing sepolicies for the Weaver HAL." into oc-dev 2017-06-01 22:05:15 +00:00
Neil Fuller
911e236ae4 resolve merge conflicts of e664e80a to oc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Icadf7c72ad173c134d3e95bb5b93c2b54b1b703e
2017-06-01 20:46:48 +01:00
Steve Muckle
06a4b61b7a Merge "allow modprobe to load signed kernel modules" into oc-dev
am: fc1d8d991e

Change-Id: Id41f7097fd0a48739293d4f8f06f296d0f189684
2017-06-01 19:24:47 +00:00
TreeHugger Robot
fc1d8d991e Merge "allow modprobe to load signed kernel modules" into oc-dev 2017-06-01 19:16:34 +00:00
Andrew Scull
7c4f46b5c1 Allow bootctl HAL to access misc block device.
am: b0d59450ae

Change-Id: If85613b84aecf43b0519bb933d925eb1829e3d5e
2017-06-01 18:39:31 +00:00
Steve Muckle
53add31a25 allow modprobe to load signed kernel modules
Modprobe requires this permission or the following denial will
prevent loading of signed kernel modules:

audit: type=1400 audit(27331649.656:4): avc:  denied  { search } for
pid=448 comm="modprobe" scontext=u:r:modprobe:s0 tcontext=u:r:kernel:s0
tclass=key permissive=0

Bug: 62256697
Test: Verified signed module loading on sailfish.
Change-Id: Idde41d1ab58e760398190d6686665a252f1823bb
2017-06-01 10:06:21 -07:00
Treehugger Robot
34b4b73729 Merge "Enable the TimeZoneManagerService" 2017-06-01 17:02:37 +00:00
Neil Fuller
ca595e1163 Enable the TimeZoneManagerService
Add policy changes to enable a new service. The service
is currently switched off in config, but this change is
needed before it could be enabled.

Bug: 31008728
Test: make droid
Merged-In: I29c4509304978afb2187fe2e7f401144c6c3b4c6
Change-Id: I29c4509304978afb2187fe2e7f401144c6c3b4c6
2017-06-01 15:56:43 +00:00
Andrew Scull
b0d59450ae Allow bootctl HAL to access misc block device.
This is sometimes used for communication with the bootloader.

Bug: 62052545
Test: Build
Change-Id: I3ae37793407719e55ab0830129aa569c9018f7da
2017-05-31 16:00:28 +01:00
Andrew Scull
475954dad5 Add missing sepolicies for OemLock HAL.
Bug: 38232801
Test: Build

Change-Id: Iccc16430e7502bb317f95bb2a5e2f021d8239a00
2017-05-31 15:22:05 +01:00
Andrew Scull
a939c4324c Add missing sepolicies for the Weaver HAL.
Bug: 38233550
Test: Build
Change-Id: I7c2105d5f215a60a611110640afff25fc3403559
2017-05-31 15:17:11 +01:00
Narayan Kamath
f194aad208 SEPolicy: Changes for new stack dumping scheme.
Applications connect to tombstoned via a unix domain socket and request
an open FD to which they can write their traces. This socket has a new
label (tombstoned_java_trace_socket) and appdomain and system_server are
given permissions to connect and write to it.

Apps no longer need permissions to open files under /data/anr/ and
these permissions will be withdrawn in a future change.

Bug: 32064548
Test: Manual

(cherry picked from commit a8832dabc7f3b7b2381760d2b95f81abf78db709)

(cherry picked from commit 11bfcc1e96)

Change-Id: Icc60d227331c8eee70a9389ff1e7e78772f37e6f
2017-05-31 10:01:48 +00:00
Narayan Kamath
e628cb5b2d SEPolicy: Changes for new stack dumping scheme.
Applications connect to tombstoned via a unix domain socket and request
an open FD to which they can write their traces. This socket has a new
label (tombstoned_java_trace_socket) and appdomain and system_server are
given permissions to connect and write to it.

Apps no longer need permissions to open files under /data/anr/ and
these permissions will be withdrawn in a future change.

Bug: 32064548
Test: Manual

Merged-In: I70a3e6e230268d12b454e849fa88418082269c4f
Change-Id: Ib4b73fc130f4993c44d96c8d68f61b6d9bb2c7d5
2017-05-31 08:54:37 +01:00
Josh Gao
e589330ebd Revert "Add /dev/kmsg_debug." am: 9ac5d01faa am: 032c6d61a3
am: 75b9963252

Change-Id: I272e173f63c6f30bfe5994e15fc4b0bf558535da
2017-05-26 15:26:49 +00:00
Josh Gao
9ac5d01faa Revert "Add /dev/kmsg_debug."
This reverts commit a015186fab.

Bug: http://b/62101480
Change-Id: I8e889e3d50cf1749168acc526f8a8901717feb46
2017-05-26 00:32:07 +00:00
Andy Hung
a9a3df3100 Merge "MediaExtractor: Allow reading of app data files." into oc-dev
am: 62022c718e

Change-Id: I3f7438d9883bf25c41674965b963c788df2c69ef
2017-05-25 21:57:13 +00:00
Andy Hung
62022c718e Merge "MediaExtractor: Allow reading of app data files." into oc-dev 2017-05-25 21:37:07 +00:00
Sandeep Patil
3abc81cec5 Merge "Allow init to run vendor toybox for modprobe" into oc-dev
am: d5a2f3e222

Change-Id: Ie35b0b80c929066186c35d31b8f8d803f374d969
2017-05-25 20:26:17 +00:00
TreeHugger Robot
d5a2f3e222 Merge "Allow init to run vendor toybox for modprobe" into oc-dev 2017-05-25 20:15:02 +00:00
Sandeep Patil
d46b5d3519 Allow init to run vendor toybox for modprobe
vendor implementations need to be able to run modprobe as part of
init.rc scripts.  They cannot do so because of the strict neverallow
currently in place that disallows all coredomains (including init)
to execute vendor toybox.

Fix this by adding init to the exception list for the neverallow so
vendors can then run modprobe from .rc scripts and also add the rule to
allow init to transition to modprobe domain using vendor_toolbox.

Bug: b/38212864
Test: Boot sailfish

Change-Id: Ib839246954e9002859f3ba986094f206bfead137
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-05-24 15:01:20 -07:00
Josh Gao
cebd95b67d Merge "Let fallback crash dumping write to dumpstate pipes." am: 4a608d311e am: 0bcb92a5bb
am: b1cf5ae435

Change-Id: If2351db2a2f76837f7081fc052b03dfbae877cf4
2017-05-24 21:33:05 +00:00
Josh Gao
8ba3138adb Let fallback crash dumping write to dumpstate pipes.
Fix the following denial:
    avc: denied { append } for pid=1093 comm="mediaextractor" path="pipe:[68438]" dev="pipefs" ino=68438 scontext=u:r:mediaextractor:s0 tcontext=u:r:dumpstate:s0 tclass=fifo_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"

Bug: http://b/38444258
Test: none
Change-Id: I58162e3a28b744a58396e77d6b0e2becb5633d6a
(cherry picked from commit 5efadd91f3)
2017-05-24 14:23:51 -07:00
Andy Hung
ec5f80cb61 MediaExtractor: Allow reading of app data files.
Needed to allow lower power Play Music of downloaded files.

    05-24 10:12:49.331 24025 24025 W generic : type=1400
          audit(0.0:1259): avc: denied { read } for
          path="/data/data/com.google.android.music/files/music/925.mp3"
          dev="sda35" ino=2179256 scontext=u:r:mediaextractor:s0
          tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
          permissive=0

Test: Play Music
Bug: 62059834

Change-Id: I97bdb1d175dba8f7a8ec6cd9084323cfcd3660bd
2017-05-24 14:18:38 -07:00
Treehugger Robot
4a608d311e Merge "Let fallback crash dumping write to dumpstate pipes." 2017-05-24 21:15:11 +00:00
Josh Gao
5efadd91f3 Let fallback crash dumping write to dumpstate pipes.
Fix the following denial:
    avc: denied { append } for pid=1093 comm="mediaextractor" path="pipe:[68438]" dev="pipefs" ino=68438 scontext=u:r:mediaextractor:s0 tcontext=u:r:dumpstate:s0 tclass=fifo_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"

Bug: http://b/38444258
Test: none
Change-Id: I58162e3a28b744a58396e77d6b0e2becb5633d6a
2017-05-24 11:56:15 -07:00
pkanwar
14e577faa1 SE Policy for Tether Offload HAL
am: c67fa9bfb4

Change-Id: Id47543705ea3f501fb26b2bf0af1e3a234c6dd71
2017-05-24 16:26:52 +00:00
pkanwar
c67fa9bfb4 SE Policy for Tether Offload HAL
Update SE Policy to allow calls to and callbacks for the Tether Offload HAL
HIDL binderized service.

Bug: 38417260
Test: New functionality. So we don't have any tests.
Change-Id: I2c95b290523c55c081afa1bca091f368559c9125
(cherry picked from commit 722249b3e8)
2017-05-23 23:00:23 +00:00
Jason Monk
a2c24197ee Allow system access to overlay service am: de5db3ab02 am: ca7d90ca19
am: 69bb06e550

Change-Id: Ia87985dca88d3f5ebf8db51b7a27bc44e6090538
2017-05-22 22:36:53 +00:00
Jason Monk
de5db3ab02 Allow system access to overlay service
Test: manual
Bug: 37014702
Change-Id: Id43dc7a8506fe60015c2f82242ba45cf85d3e74b
2017-05-22 15:43:34 -04:00
Steven Moreland
e8cd8fe7e8 Merge "Fix graphics composer denial." into oc-dev
am: 7eeded9ee0

Change-Id: I9fc8f229d3f03a3850819664a71edc8d418259d9
2017-05-22 18:43:11 +00:00
TreeHugger Robot
7eeded9ee0 Merge "Fix graphics composer denial." into oc-dev 2017-05-22 18:34:06 +00:00
Steven Moreland
f30a82efe2 Fix graphics composer denial.
Right now, the hwcomposer hidl hal is unable to figure out where
to get the hidl mapper implementation.

It is expected that all graphics composer objects will need this
permission. The interfaces are written to work together with the
"IMapper" being the same-process ("sphal") component and the
"IComposer" interface being the binderized compoenent.

10-09 00:24:38.900   457   457 E SELinux : avc:  denied  { find } for
interface=android.hardware.graphics.mapper::IMapper pid=495
scontext=u:r:hal_graphics_composer_default:s0
tcontext=u:object_r:hal_graphics_mapper_hwservice:s0 tclass=hwservice_manager

Test: boot marlin, denial no longer present.
Bug: 38415912
Change-Id: I1b274be10e115fa7b53fb81e85be8827da05997e
2017-05-19 14:14:35 -07:00
Wyatt Riley
84d816903c Merge "Removing UDP access for hal_gnss" into oc-dev
am: effa2dadeb

Change-Id: Ic21e6dcaaa0bbf13b6eb8f3fc82303b227d61d35
2017-05-19 19:47:35 +00:00