Commit graph

15846 commits

Author SHA1 Message Date
Tri Vo
b4fe8e1feb Remove neverallow coredomain to set vendor prop.
am: 6f6fbebcef

Change-Id: Ie793eff4736f8a9b351114c3fd9bd1bdcd22ab49
2018-05-31 17:56:37 -07:00
Jiyong Park
029f415d48 Merge "add extended_core_property_type" into pi-dev
am: d009682c2e

Change-Id: Ie821be484067f0ff5d06aac66a3b020d6e853d1a
2018-05-31 17:08:35 -07:00
Tri Vo
6f6fbebcef Remove neverallow coredomain to set vendor prop.
We are not forbidding system_writes_vendor_properties_violators in P,
i.e. this neverallow rule is not strictly enforced.

Bug: 80466516
Bug: 78598545
Test: build policy
Change-Id: Iaf0ebbd2b27adf8c48082caa874e53f32bf999fc
2018-05-31 23:46:02 +00:00
TreeHugger Robot
d009682c2e Merge "add extended_core_property_type" into pi-dev 2018-05-31 22:45:21 +00:00
Tri Vo
ef6ea22264 Use hal_attribute for all HALs. am: 1156d59389
am: c652c767de

Change-Id: I871412d49d3367a837a0203e7cab98aa05b96072
2018-05-30 18:32:43 -07:00
Tri Vo
c652c767de Use hal_attribute for all HALs.
am: 1156d59389

Change-Id: Ie10603357fd6ad915cb2100993d015b82eebc2a1
2018-05-30 18:28:41 -07:00
Tri Vo
1156d59389 Use hal_attribute for all HALs.
Bug: 72757373
Test: policy builds
Change-Id: I7cc5e28aac8ed381c9c350f540826e069941f6c4
2018-05-30 18:18:07 -07:00
Steven Moreland
d0c4d4e7db mediacodec->mediacodec+hal_omx{,_server,_client} am: 7baf725ea6
am: 6ad7e65447

Change-Id: I9b60e71be957d43f66605958915d3cfb45d42573
2018-05-30 13:51:23 -07:00
Steven Moreland
6ad7e65447 mediacodec->mediacodec+hal_omx{,_server,_client}
am: 7baf725ea6

Change-Id: I0dd6e83fd0d272fb7d4cf14d8c40ade2d8fca992
2018-05-30 13:35:20 -07:00
Steven Moreland
7baf725ea6 mediacodec->mediacodec+hal_omx{,_server,_client}
(breaks vendor blobs, will have to be regenerated
after this CL)

This moves mediacodec to vendor so it is replaced with
hal_omx_server. The main benefit of this is that someone
can create their own implementation of mediacodec without
having to alter the one in the tree. mediacodec is still
seccomp enforced by CTS tests.

Fixes: 36375899
Test: (sanity) YouTube
Test: (sanity) camera pics + video
Test: check for denials
Change-Id: I31f91b7ad6cd0a891a1681ff3b9af82ab400ce5e
2018-05-30 18:12:32 +00:00
Jeff Vander Stoep
85f508b83b Merge "Improve tests protecting private app data" am: db459a1b71
am: c4b2a88b9b

Change-Id: I6a0a5b778c209401cae33af605e66ab12db03aef
2018-05-30 09:34:40 -07:00
Jeff Vander Stoep
c4b2a88b9b Merge "Improve tests protecting private app data"
am: db459a1b71

Change-Id: I78cd3a591da64050399517c4146dbf99bc924aff
2018-05-30 09:28:39 -07:00
Treehugger Robot
db459a1b71 Merge "Improve tests protecting private app data" 2018-05-30 16:20:31 +00:00
Jiyong Park
c0f8f2f82a add extended_core_property_type
The attribute is used to capture system properties added from outside of
AOSP (e.g. by OEM), but are not device-specific and thus are used only
inside the system partition.

Access to the the system properties from outside of the system partition
is prevented by the neverallow rule.

Bug: 80382020
Bug: 78598545
Test: m -j selinux_policy
Change-Id: I22c083dc195dab84c9c21a79fbe3ad823a3bbb46
2018-05-30 17:38:09 +09:00
Jeff Vander Stoep
ab82125fc8 Improve tests protecting private app data
In particular, add assertions limiting which processes may
directly open files owned by apps. Reduce this to just apps, init,
and installd. App data is protected by a combination of selinux
permissions and Unix permissions, so limiting the open permission to
just apps (which are not allowed to have CAP_DAC_OVERRIDE or
CAP_DAC_READ_SEARCH) ensures that only installd and init have
complete access an app's private directory.

In addition to apps/init/installd, other processes currently granted
open are mediaserver, uncrypt, and vold. Uncrypt's access appears to
be deprecated (b/80299612). Uncrypt now uses /data/ota_package
instead. b/80418809 and b/80300620 track removal for vold and
mediaserver.

Test: build/boot aosp_taimen-userdebug. Verify no "granted" audit
messages in the logs.
Bug: 80190017
Bug: 80300620
Bug: 80418809
Fixes: 80299612
Change-Id: I153bc7b62294b36ccd596254a5976dd887fed046
2018-05-29 13:47:49 -07:00
Jeff Vander Stoep
b16d0e1272 Merge "Use non-expanded types in prop neverallows" into pi-dev
am: b5e493d821

Change-Id: Ib877668feb90ab58b21e5d62735f1bb03fc5eb9a
2018-05-24 16:57:07 -07:00
Tom Cherry
68e5088cf3 [automerger skipped] Merge "Finer grained permissions for ctl. properties" am: a5db154ece
am: 176bc442a4  -s ours

Change-Id: Ibb90d44a81d4ef80cc73c0176e70d4bc1ffb1dfd
2018-05-24 11:35:31 -07:00
Tom Cherry
176bc442a4 Merge "Finer grained permissions for ctl. properties"
am: a5db154ece

Change-Id: I35ee29d0db1a7385a1ae7765aca6f4604a180dc2
2018-05-24 11:24:18 -07:00
Tom Cherry
a5db154ece Merge "Finer grained permissions for ctl. properties" 2018-05-24 16:28:24 +00:00
Joel Galenson
24b6158118 Hide bpfloader sys_admin denials.
am: d65f26f1b0

Change-Id: I0435b600f5a163089650c02417646109a97e3e56
2018-05-23 14:28:48 -07:00
TreeHugger Robot
b5e493d821 Merge "Use non-expanded types in prop neverallows" into pi-dev 2018-05-23 19:08:01 +00:00
Jeff Vander Stoep
7745770bca Use non-expanded types in prop neverallows
Using hal_foo attributes in neverallow rules does not work because
they are auto-expanded to types. Use hal_foo_server types instead.

Fixes the following error:
unit.framework.AssertionFailedError: The following errors were
encountered when validating the SELinuxneverallow rule: neverallow
{ domain -coredomain -bluetooth -hal_bluetooth } { bluetooth_prop }:
property_service set; Warning! Type or attribute hal_bluetooth used
in neverallow undefined in policy being checked.

Test: CtsSecurityHostTestCases
Bug: 80153368
Change-Id: I2baf9f66d2ff110a4f181423790a1160a6e138da
2018-05-23 10:03:15 -07:00
Joel Galenson
d65f26f1b0 Hide bpfloader sys_admin denials.
Bug: 79524845
Test: Boot device and see no denials.
Change-Id: I9316bfd0e3718818a7613a421aedff7da8c87108
2018-05-23 08:36:40 -07:00
Tri Vo
6f5a6287be Merge "Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs" am: 35c9537b64
am: c9355c5197

Change-Id: Idf27b945c2f77ac34c2a91c062fa4486941f4cb6
2018-05-22 16:07:12 -07:00
Tri Vo
c9355c5197 Merge "Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs"
am: 35c9537b64

Change-Id: I797608d735bf8cf3a554ff4ea9fc391b46d5fe4f
2018-05-22 16:02:26 -07:00
Treehugger Robot
35c9537b64 Merge "Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs" 2018-05-22 22:50:59 +00:00
Jordan Liu
6c5908a1d0 [automerger skipped] Merge "Setup policy for downloaded apns directory" into pi-dev
am: 7af4a1f110  -s ours

Change-Id: I01865bcdbf8724dbfc64f90256a86edc4cc0d549
2018-05-22 14:32:48 -07:00
Niklas Lindgren
751a16186c [automerger skipped] Setup policy for downloaded apns directory
am: 780cd6df4b  -s ours

Change-Id: I8c11ee2cd6090ecc8a2fa1753c7c8bb14b8394e6
2018-05-22 14:22:38 -07:00
Jordan Liu
7af4a1f110 Merge "Setup policy for downloaded apns directory" into pi-dev 2018-05-22 21:12:31 +00:00
Tom Cherry
7b8be35ddf Finer grained permissions for ctl. properties
Currently, permissions for ctl. property apply to each action verb, so
if a domain has permissions for controlling service 'foo', then it can
start, stop, and restart foo.

This change implements finer grainer permissions such that permission
can be given to strictly start a given service, but not stop or
restart it.  This new permission scheme is mandatory for the new
control functions, sigstop_on, sigstop_off, interface_start,
interface_stop, interface_restart.

Bug: 78511553
Test: see appropriate successes and failures based on permissions
Merged-In: Ibe0cc0d6028fb0ed7d6bcba626721e0d84cc20fa
Change-Id: Ibe0cc0d6028fb0ed7d6bcba626721e0d84cc20fa
(cherry picked from commit 2208f96e9e)
2018-05-22 13:47:16 -07:00
Tom Cherry
e21e9e6373 Merge "Finer grained permissions for ctl. properties" into pi-dev
am: 0e403c8242

Change-Id: I778a16ae2bcc5713ba3ca1c81fd90c97b0a5d64d
2018-05-22 13:26:42 -07:00
Tom Cherry
0e403c8242 Merge "Finer grained permissions for ctl. properties" into pi-dev 2018-05-22 20:15:07 +00:00
Joel Galenson
7d90706a96 Exclude bug_map from the sepolicy_freeze_test. am: 98f83b67cc
am: b827679256

Change-Id: I20e21172ecc08125b958712d1da6aa57cec40e95
2018-05-22 11:30:51 -07:00
Joel Galenson
b827679256 Exclude bug_map from the sepolicy_freeze_test.
am: 98f83b67cc

Change-Id: Iea6b2fc54f01b06f97d94ac1996b59f816b646f2
2018-05-22 11:26:18 -07:00
Alan Stokes
491a095435 Remove fixed bug from bug_map.
am: c8711592ad

Change-Id: Ib622f35e8adb682c5a2b0eef9ae02857d028597c
2018-05-22 10:52:15 -07:00
Tri Vo
111cdce6ac Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs
After https://android-review.googlesource.com/688488
BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR can now specify multiple
directories.

Bug: n/a
Test: build sepolicy
Change-Id: Ie2af81a4f9462cd05352db71fd1e515531d42334
2018-05-22 09:25:07 -07:00
Joel Galenson
98f83b67cc Exclude bug_map from the sepolicy_freeze_test.
The bug_map file is only used whitelisting known test failures.  It
needs to change fairly often to fix new failures and it doesn't affect
users, so it shouldn't matter if it diverges from prebuilts.

Test: Enable this test and build with and without different bug_maps.
Change-Id: I9176a6c7e9f7852a0cd7802fd121b1e86b216b22
2018-05-22 09:22:41 -07:00
Tom Cherry
2208f96e9e Finer grained permissions for ctl. properties
Currently, permissions for ctl. property apply to each action verb, so
if a domain has permissions for controlling service 'foo', then it can
start, stop, and restart foo.

This change implements finer grainer permissions such that permission
can be given to strictly start a given service, but not stop or
restart it.  This new permission scheme is mandatory for the new
control functions, sigstop_on, sigstop_off, interface_start,
interface_stop, interface_restart.

Bug: 78511553
Test: see appropriate successes and failures based on permissions

Change-Id: Ibe0cc0d6028fb0ed7d6bcba626721e0d84cc20fa
2018-05-22 09:13:16 -07:00
Alan Stokes
c8711592ad Remove fixed bug from bug_map.
Bug: 77816522
Bug: 73947096

Test: Flashed device, no denial seen
Change-Id: Ib2f1fc670c9a76abbb9ff6747fec00fa5bcde5af
(cherry picked from commit 62913dbfd2)
2018-05-22 08:41:23 -07:00
Tom Cherry
bab2435a06 Merge "neverallow coredomain from writing vendor properties" into pi-dev
am: e5cc744d18

Change-Id: I66f2965200090a4ded857c6eb9ac6b79ee5b596c
2018-05-21 22:10:10 -07:00
TreeHugger Robot
e5cc744d18 Merge "neverallow coredomain from writing vendor properties" into pi-dev 2018-05-22 05:04:40 +00:00
Logan Chien
ac05755694 [automerger skipped] Merge "Add ro.vndk.lite to property_contexts" am: 60227ea7c0
am: 9deac4f8a7  -s ours

Change-Id: I328e81b89e14fcffadec3f034c607182076ac041
2018-05-21 21:16:52 -07:00
Logan Chien
9deac4f8a7 Merge "Add ro.vndk.lite to property_contexts"
am: 60227ea7c0

Change-Id: I09c42f8992b912089458e1426f14434d7568b845
2018-05-21 21:07:38 -07:00
Logan Chien
60227ea7c0 Merge "Add ro.vndk.lite to property_contexts" 2018-05-22 04:04:07 +00:00
Bowgo Tsai
eb2ff1cbdd Merge "ueventd: allow reading kernel cmdline" into pi-dev
am: fd00fd123d

Change-Id: I9421816a71b08b24f652f61dec994a153354e2df
2018-05-21 16:28:37 -07:00
Carmen Jackson
59b08ee9ac [automerger skipped] Merge "Add sync and fence tracepoints to user-visible list of tracepoints." am: cfaaa9f42d
am: 2e22f88dc5  -s ours

Change-Id: I5750ca03dd2851b1a194d129acaa9ac3513c44c1
2018-05-21 16:21:33 -07:00
Carmen Jackson
2e22f88dc5 Merge "Add sync and fence tracepoints to user-visible list of tracepoints."
am: cfaaa9f42d

Change-Id: Id15a4518ee6d9a64c815a115e8f68a90e1052626
2018-05-21 16:15:40 -07:00
TreeHugger Robot
fd00fd123d Merge "ueventd: allow reading kernel cmdline" into pi-dev 2018-05-21 23:14:38 +00:00
Treehugger Robot
cfaaa9f42d Merge "Add sync and fence tracepoints to user-visible list of tracepoints." 2018-05-21 23:09:30 +00:00
Niklas Lindgren
780cd6df4b Setup policy for downloaded apns directory
apns downloaded will enter a new directory that
TelephonyProvider can access.

Bug: 79948106
Test: Manual
Change-Id: I1e7660adf020dc7052da94dfa03fd58d0386ac55
Merged-In: I1e7660adf020dc7052da94dfa03fd58d0386ac55
2018-05-21 15:58:16 -07:00