Commit graph

11909 commits

Author SHA1 Message Date
Dan Cashman
a503819df5 Remove neverallow preventing hwservice access for apps. am: 3e307a4de5 am: 317c4171d2
am: e51e613184

Change-Id: I153a14af008e52fbe6677007e0e1ad4e472be3da
2017-06-21 21:45:13 +00:00
Dan Cashman
a030f3e288 Remove neverallow preventing hwservice access for apps. am: 3e307a4de5 am: 044d20729b
am: 11dcf1976f

Change-Id: I96b2af315b4c35ddd47315f3ca4a9b098eab1d59
2017-06-21 21:44:54 +00:00
Dan Cashman
e51e613184 Remove neverallow preventing hwservice access for apps. am: 3e307a4de5
am: 317c4171d2

Change-Id: I418cc929f8e0a698220e0b8b1c51314ef9ea52a8
2017-06-21 21:41:36 +00:00
Dan Cashman
11dcf1976f Remove neverallow preventing hwservice access for apps. am: 3e307a4de5
am: 044d20729b

Change-Id: Ia6f8a806adae230df50f8d06edcf4ba9d2ae4352
2017-06-21 21:41:10 +00:00
Dan Cashman
044d20729b Remove neverallow preventing hwservice access for apps.
am: 3e307a4de5

Change-Id: Ic144d924948d7b8e73939806d761d27337dbebef
2017-06-21 21:38:19 +00:00
Dan Cashman
317c4171d2 Remove neverallow preventing hwservice access for apps.
am: 3e307a4de5

Change-Id: I90e567c8138fa75bf792af181890d0af627b6f48
2017-06-21 21:37:32 +00:00
Jeff Vander Stoep
d75a2c0cc8 Exempt tetheroffload hal from network socket restrictions
The tetheroffload hal must be able to use network sockets as part of
its job.

Bug: 62870833
Test: neverallow-only change builds.
Change-Id: I630b36340796a5ecb5db08e732b0978dd82835c7
2017-06-21 12:46:21 -07:00
Dan Cashman
3e307a4de5 Remove neverallow preventing hwservice access for apps.
Same-process HALs are forbidden except for very specific HALs that have
been provided and whitelisted by AOSP.  As a result, a vendor extension
HAL may have a need to be accessed by untrusted_app.  This is still
discouraged, and the existing AOSP hwservices are still forbidden, but
remove the blanket prohibition.  Also indicate that this is temporary,
and that partners should expect to get exceptions to the rule into AOSP
in the future.

Bug: 62806062
Test: neverallow-only change builds.  Verify new attribute is in policy.
Change-Id: I6d3e659147d509a3503c2c9e0b6bb9016cc75832
2017-06-21 12:30:36 -07:00
Yabin Cui
2801990551 Allow run-as to read/write unix_stream_sockets created by adbd. am: 330d447778 am: 492a53fe27
am: 32fb7f59ab

Change-Id: I5d3e4657ce7b770f1a4731902d7f9cc6bab22742
2017-06-20 23:31:43 +00:00
Yabin Cui
f0428df01a Allow run-as to read/write unix_stream_sockets created by adbd. am: 330d447778 am: eb5542a178
am: cf698f1d89

Change-Id: I20620832b99934d3e71e7f88deb50866c6fa8a1b
2017-06-20 23:30:58 +00:00
Yabin Cui
32fb7f59ab Allow run-as to read/write unix_stream_sockets created by adbd. am: 330d447778
am: 492a53fe27

Change-Id: Ic802fef5d53147e0ed2d2b588455ca8ad0843c4f
2017-06-20 23:12:18 +00:00
Yabin Cui
cf698f1d89 Allow run-as to read/write unix_stream_sockets created by adbd. am: 330d447778
am: eb5542a178

Change-Id: I74cc45ee263121cece83ddb75133fbe2b0ff348d
2017-06-20 23:06:05 +00:00
Yabin Cui
492a53fe27 Allow run-as to read/write unix_stream_sockets created by adbd.
am: 330d447778

Change-Id: Ice6c84f53d50b7fa987ea4e7259ecda4c64673aa
2017-06-20 23:03:24 +00:00
Yabin Cui
eb5542a178 Allow run-as to read/write unix_stream_sockets created by adbd.
am: 330d447778

Change-Id: I6569c282114ceb09471d94cfa178535ab315c966
2017-06-20 22:56:12 +00:00
Yabin Cui
330d447778 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
(cherry picked from commit 1847a38b4a)
2017-06-20 13:50:54 -07:00
Yabin Cui
41cccd87c9 Avoid audit when running adb shell -t run-as xxx. am: 3b7d9e49df am: 6e46ccdf57 am: ed88246c57
am: e786cbfc91

Change-Id: I5978af4044cd59f853a82d2397bb700ebe907433
2017-06-20 20:06:55 +00:00
Yabin Cui
e786cbfc91 Avoid audit when running adb shell -t run-as xxx. am: 3b7d9e49df am: 6e46ccdf57
am: ed88246c57

Change-Id: Id7a784cbe65961f876f4d2d167303dcf7854ae21
2017-06-20 20:04:28 +00:00
Yabin Cui
ed88246c57 Avoid audit when running adb shell -t run-as xxx. am: 3b7d9e49df
am: 6e46ccdf57

Change-Id: I5241333ec9099c7db3154cfcdb41003c65e235a0
2017-06-20 19:59:55 +00:00
Yabin Cui
6e46ccdf57 Avoid audit when running adb shell -t run-as xxx.
am: 3b7d9e49df

Change-Id: I5f12ae2d4c00efe648d1eecbe8a322de93e6447d
2017-06-20 19:56:24 +00:00
TreeHugger Robot
6c43be599c Merge "Remove unused attribute." 2017-06-20 00:10:58 +00:00
TreeHugger Robot
fbf072bcfa Merge "allow recovery to run mke2fs tools" 2017-06-19 23:25:06 +00:00
Yabin Cui
3b7d9e49df Avoid audit when running adb shell -t run-as xxx.
run-as uses file descriptor created by adbd when running
`adb shell -t run-as xxx`. It produces audit warnings like below:

[ 2036.555371] c1    509 type=1400 audit(1497910817.864:238): avc: granted { use } for pid=4945 comm="run-as" path="/dev/pts/0" dev="devpts" ino=3 scontext=u:r:runas:s0 tcontext=u:r:adbd:s0 tclass=fd

Bug: http://b/62358246
Test: test manually that the warning disappears.
Change-Id: I19023ac876e03ce2afe18982fe753b07e4c876bb
2017-06-19 16:02:07 -07:00
TreeHugger Robot
e10a01f186 Merge "Temporarily revert back to using file_contexts for tracefs." 2017-06-19 22:35:27 +00:00
Tom Cherry
471d870627 Merge "Add getpgid to system_service and init" into oc-dr1-dev am: 0e6a3d87e9
am: ac17867258

Change-Id: I1c7919c78b60997a5ead95e8efa604069cbc61d3
2017-06-19 21:02:15 +00:00
Tom Cherry
ac17867258 Merge "Add getpgid to system_service and init" into oc-dr1-dev
am: 0e6a3d87e9

Change-Id: I3af30f8f65918e273f634a9aa120c5cbeefd3a65
2017-06-19 20:50:26 +00:00
Joel Galenson
d0d488eee7 Temporarily revert back to using file_contexts for tracefs.
An earlier commit moved tracefs file labels from file_contexts to
tracefs.  But this requires a kernel patch that is not present on all
devices, so let's revert it until that is merged.

Bug: 62485981
Test: Built, flashed, and booted two devices.  Verified that the files
have the correct context.  Verified that traceur works.

Change-Id: I8ee3ea9864f73a92943cdbc550131d4a71b842ba
2017-06-19 13:39:49 -07:00
Tom Cherry
0e6a3d87e9 Merge "Add getpgid to system_service and init" into oc-dr1-dev 2017-06-19 20:38:37 +00:00
Jin Qian
7e57731898 allow recovery to run mke2fs tools
recovery exec /system/bin/{mke2fs,e2fsdroid} to format userdata

Bug: 35219933
Change-Id: I77e75c2dc55d4bea7984707f27bc215de186c4d1
2017-06-19 19:23:46 +00:00
Dan Cashman
148578a623 Update 26.0 SELinux prebuilts.
More changes went into oc-dev after the freeze-date.  Reflect them.

Bug: 37896931
Test: prebuilts - none.
Change-Id: I3300751ea7362d5d96b327138544be65eb9fc483
2017-06-19 11:28:09 -07:00
Tom Cherry
d5f0aba025 Add getpgid to system_service and init
In libprocessgroup, we want to only send signals once to processes,
particularly for SIGTERM.  We must send the signal both to all
processes within a POSIX process group and a cgroup.  To ensure that
we do not duplicate the signals being sent, we check the processes in
the cgroup to see if they're in the POSIX process groups that we're
killing.  If they are, we skip sending a second signal.  This requires
getpgid permissions, hence this SELinux change.

avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1
avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1
avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1

Bug: 37853905
Bug: 62418791
Test: Boot, kill zygote, reboot
Change-Id: Ib6c265dbaac8833c47145ae28fb6594ca8545570
(cherry picked from commit c59eb4d853)
2017-06-19 11:26:48 -07:00
Jeff Vander Stoep
8a3aae5c5b Merge "Suppress safetynet denials" into oc-dr1-dev am: 1468f85f33
am: 3c7156b537

Change-Id: I20743966a8eedb8a5168356d6af3907234431e31
2017-06-16 22:44:05 +00:00
Daniel Rosenberg
b304e96000 Merge "Add rules for vfat for sdcardfs" into oc-dev am: 58d0d1e4af am: 29713c8da6
am: 581069bf7a

Change-Id: I58f7e0c44e68908101cb874789994885ed9a15e9
2017-06-16 22:43:52 +00:00
Daniel Rosenberg
8d89f81cbd Merge "Add rules for vfat for sdcardfs" into oc-dev am: 58d0d1e4af am: 39c4f76ba6
am: 77ea7ccbfa

Change-Id: I6ce8f52e97f0198cf712a60fd6af1e77090ec338
2017-06-16 22:43:34 +00:00
Jeff Vander Stoep
3c7156b537 Merge "Suppress safetynet denials" into oc-dr1-dev
am: 1468f85f33

Change-Id: Idd803017a8087ac9e9221c0ca6ac5893391db6de
2017-06-16 22:37:14 +00:00
Daniel Rosenberg
581069bf7a Merge "Add rules for vfat for sdcardfs" into oc-dev am: 58d0d1e4af
am: 29713c8da6

Change-Id: I7089b62f8c54e24af47263325e085f092231f29d
2017-06-16 22:18:39 +00:00
TreeHugger Robot
1468f85f33 Merge "Suppress safetynet denials" into oc-dr1-dev 2017-06-16 22:17:53 +00:00
Daniel Rosenberg
77ea7ccbfa Merge "Add rules for vfat for sdcardfs" into oc-dev am: 58d0d1e4af
am: 39c4f76ba6

Change-Id: I54b821fa20f428eaad1c8ab934a7e479664a6038
2017-06-16 22:15:57 +00:00
Daniel Rosenberg
39c4f76ba6 Merge "Add rules for vfat for sdcardfs" into oc-dev
am: 58d0d1e4af

Change-Id: I1a2207be3509ec5bc7797b906e15da16099190ad
2017-06-16 22:04:07 +00:00
Daniel Rosenberg
29713c8da6 Merge "Add rules for vfat for sdcardfs" into oc-dev
am: 58d0d1e4af

Change-Id: Ia53beb365c39d501c9d6cd53a4cb72dec14b610b
2017-06-16 22:04:05 +00:00
TreeHugger Robot
58d0d1e4af Merge "Add rules for vfat for sdcardfs" into oc-dev 2017-06-16 21:53:42 +00:00
Andres Oportus
9babe8f143 Merge "Allow only system_server to read uid_time_in_state" 2017-06-16 21:25:18 +00:00
Dan Cashman
518e1e857f Merge "Add extraneous neverallow rule to enforce attribute inclusion." into oc-dev am: b5aeaf6dfa am: 2f2fd36539
am: 04d9f833fd

Change-Id: I0eaf6ae7cd00f3f53efd2243ffe15a1bb4e97442
2017-06-16 21:14:04 +00:00
Dan Cashman
acbbe43cc0 Merge "DO NOT MERGE. Restore property to match oc-dev." into oc-dr1-dev am: d4faa3ced0
am: dbd2b320ce

Change-Id: I1d4a04a8d79325f4dd7f06b995956e254668303b
2017-06-16 21:13:43 +00:00
Dan Cashman
9ba4e8f80c Merge "Add extraneous neverallow rule to enforce attribute inclusion." into oc-dev am: b5aeaf6dfa am: 6f94efafd8
am: 3b2bf73db6

Change-Id: I666e91ca83ad916b04c325d4f75570d550fc0c61
2017-06-16 21:13:14 +00:00
Dan Cashman
04d9f833fd Merge "Add extraneous neverallow rule to enforce attribute inclusion." into oc-dev am: b5aeaf6dfa
am: 2f2fd36539

Change-Id: Ice4004ddb745f5936fc430f7ff44d1df3236687a
2017-06-16 20:53:21 +00:00
Dan Cashman
dbd2b320ce Merge "DO NOT MERGE. Restore property to match oc-dev." into oc-dr1-dev
am: d4faa3ced0

Change-Id: I1791a5758eae1907dc0f15c2eeba36a0ad6577ce
2017-06-16 20:53:02 +00:00
Dan Cashman
3b2bf73db6 Merge "Add extraneous neverallow rule to enforce attribute inclusion." into oc-dev am: b5aeaf6dfa
am: 6f94efafd8

Change-Id: I1aceeeb61ca9e558dd32b3ef33e07b6a551387e6
2017-06-16 20:51:50 +00:00
Dan Cashman
2f2fd36539 Merge "Add extraneous neverallow rule to enforce attribute inclusion." into oc-dev
am: b5aeaf6dfa

Change-Id: Ib0ac9cf10c7cb9fd2462e0036307e2552d19b93b
2017-06-16 20:46:00 +00:00
Dan Cashman
6f94efafd8 Merge "Add extraneous neverallow rule to enforce attribute inclusion." into oc-dev
am: b5aeaf6dfa

Change-Id: Ibcf17f7bbea4923abc5d1713227568bb35c6674b
2017-06-16 20:45:50 +00:00
TreeHugger Robot
d4faa3ced0 Merge "DO NOT MERGE. Restore property to match oc-dev." into oc-dr1-dev 2017-06-16 20:42:33 +00:00