Commit graph

2378 commits

Author SHA1 Message Date
Neil Fuller
52494addd2 sepolicy entries for time zone detector service
am: 1662495aec

Change-Id: Id2fbe9d5107acf7bb5c78b5349778bc26fdb7f50
2018-06-20 09:19:20 -07:00
Neil Fuller
1662495aec sepolicy entries for time zone detector service
Add sepolicy entries for the new time zone detector service.

The timezonedetector_service will be called from the
telephony process.

Bug: 78217059
Test: make / booted device
Change-Id: Ib719a4bb444b2af7dd71910fb0bd12992df9d88c
2018-06-19 21:13:57 +01:00
Mark Salyzyn
8bc025a5f7 Merge "access to /proc/slabinfo"
am: e0637cfc8e

Change-Id: Ie5f10c93d27607879db52177cd498eec0d61f782
2018-06-15 08:04:18 -07:00
Mark Salyzyn
d6eaed854d access to /proc/slabinfo
init, dumpstate and shell

Test: check avc for init is now gone
Bug: 7232205
Bug: 109821005
Change-Id: I299a0ba29bcc97a97047f12a5c48f6056f5e6de5
2018-06-14 10:18:45 -07:00
Jiyong Park
d147fd8170 adbd is allowed to execute shell in recovery mode
am: bacf36480d

Change-Id: If48e1b57f1ee20f10c5aac5af5ce52b6433a227a
2018-06-13 16:44:28 -07:00
Treehugger Robot
b6639b0f52 Merge changes from topic "sharedlib_in_recovery"
* changes:
  init is a dynamic executable
  adbd is allowed to execute shell in recovery mode
2018-06-13 23:14:29 +00:00
Mark Salyzyn
6b2715cc0d Merge "persist.sys.boot.reason is cleared once read by bootstat"
am: 752bde548f

Change-Id: Ifbd311d8425fcd9caffe61c41400fbbfedb356c7
2018-06-12 14:10:01 -07:00
Mark Salyzyn
a1bce77973 persist.sys.boot.reason is cleared once read by bootstat
To ensure a surprise reboot does not take the last boot reason on
face value especially if coming from more than one boot sessions ago.
We shift and clear the value from persist.sys.boot.reason to
sys.boot.reason.last and establish a correct last reboot reason in
the canonical sys.boot.reason property.  As a result, the power
manager should read the canonical sys.boot.reason for a definitive
result rather than relying on the possibly incorrect values in the
persistent storage.  sys.boot.reason should be a core property as
it represents the canonical boot reason API.

Test: compile
Bug: 86671991
Bug: 63736262
Change-Id: If3742c487d6c0ab69c464f056bf48c786b66a945
2018-06-11 09:30:25 -07:00
Jiyong Park
bacf36480d adbd is allowed to execute shell in recovery mode
The shell is now available directly in the recovery ramdisk. We no
longer need to mount system.img to /system as the recovery ramdisk is
self-contained. However, there is a problem that every file in the
ramdisk is labeled as rootfs because the ramdisk does not support xattr.

This CL adds several recovery-only rules that are required to make the
recovery ramdisk self-contained. Most importantly, adbd is allowed to
domain_trans to shell. Also shell is allowe to execute files of type
rootfs. Finally, the recovery is allowed to mount on tmpfs since it now
mounts system.img to /mnt/system.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: `adb root && adb shell` and then
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: If21b069aee63541344a5ca8939fb9a46ffef4d3e
2018-06-09 02:23:10 +09:00
Neil Fuller
4a77ea5eb3 Merge "Remove references to common_time / commontime" am: 44b86a3e5e
am: 304857d8be

Change-Id: I9d93260c280e8981a051bc4651a4a4942288acfe
2018-06-07 13:18:23 -07:00
Neil Fuller
44b86a3e5e Merge "Remove references to common_time / commontime" 2018-06-07 15:50:06 +00:00
Jeff Vander Stoep
d1f07835a7 Merge "Deprivilege haiku" am: 59f8e75a5d
am: b204ad930c

Change-Id: I23dd498f88e5d4fbff520defeef5baf7329e9ea4
2018-06-06 13:15:09 -07:00
Treehugger Robot
59f8e75a5d Merge "Deprivilege haiku" 2018-06-06 17:18:07 +00:00
Neil Fuller
c9fa040d1c Remove references to common_time / commontime
This change removes references to the common time management
service.

Bug: 80462439
Test: build / boot
Merged-In: I2c8fca44fe05e3a35f5580d23e23a4c033075613
Change-Id: I2c8fca44fe05e3a35f5580d23e23a4c033075613
2018-06-06 17:02:44 +01:00
Wale Ogunwale
dcf42c11f4 Merge "Added sepolicy for activity_task service" am: 2b7fbbe917
am: 93c6a36b07

Change-Id: If0038600c1fe4c97f55b3a09038586546ab1647c
2018-06-05 09:17:45 -07:00
Treehugger Robot
2b7fbbe917 Merge "Added sepolicy for activity_task service" 2018-06-05 16:02:51 +00:00
Steven Moreland
68e58a474b Merge "Find hal_foo_hwservice -> you are hal_foo_client." am: 58f4c6f01b
am: 0b783e875a

Change-Id: I6d760e257df73b8bf065563c9a1949cd8edca54a
2018-06-05 08:33:57 -07:00
Steven Moreland
58f4c6f01b Merge "Find hal_foo_hwservice -> you are hal_foo_client." 2018-06-05 15:19:23 +00:00
Wale Ogunwale
0075655ac3 Added sepolicy for activity_task service
Bug: 80414790
Test: boots
Change-Id: I3d6bb4e7da9d697ec8ff7502880543be89aee349
2018-06-05 14:13:45 +00:00
Neil Fuller
a7d92c64d6 Merge "selinux changes to add time detector service" am: 93953d0be6
am: c45525f7e3

Change-Id: I889eb40edaf765cdd7a7555403070cca4d0e2dd5
2018-06-04 17:07:38 -07:00
Treehugger Robot
93953d0be6 Merge "selinux changes to add time detector service" 2018-06-04 21:23:23 +00:00
Neil Fuller
e1dd6d07b5 selinux changes to add time detector service
This commit contains the changes needed to add the new
time detector system server service.

Bug: 78217059
Test: make / booted device
Change-Id: I7cfaac6cac876e4aa73e8af1aa5f837117bb9ad7
2018-06-04 19:40:37 +01:00
Jeff Vander Stoep
f45db06c2b Deprivilege haiku
Clatd and zygote
are all overprivileged
as is storaged

Test: Verify no "granted" messages from dogfooders. Build flash
aosp_taimen-userdebug. Verify no denials.
Change-Id: I735adcffed553962ad12072716a7200883930dcf
2018-06-04 11:07:08 -07:00
Jeff Vander Stoep
a5dd47fab3 Suppress denials for apps accessing storage too early am: 9c7396d554
am: 7c9b0ecf35

Change-Id: I94f5da3d8fafbea7746336c7d0d0cb6c4eea28d0
2018-06-01 15:45:39 -07:00
Jeff Vander Stoep
9c7396d554 Suppress denials for apps accessing storage too early
The recommended solution is to not access encrypted storage until
after the ACTION_USER_UNLOCKED intent is delivered.

Test: build
Fixes: 72811052
Fixes: 72550646
Change-Id: I80eb743e26047b7864de983c5a46c28b6f753a59
2018-06-01 19:15:55 +00:00
Steven Moreland
8fc7981885 Find hal_foo_hwservice -> you are hal_foo_client.
Before, it was possible to access a hwservice without declaring
that you were a client.

This introduces the following macro:
hal_attribute_hwservice_client(hal_foo, hal_foo_hwservice)

which makes sure the above implication holds using a neverallow rule.

Bug: 80319537
Test: boot + sanity
Change-Id: Iededae68f14f0f3bd412c1205aa3b650a54d55c6
2018-05-30 16:46:57 -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
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
Treehugger Robot
db459a1b71 Merge "Improve tests protecting private app data" 2018-05-30 16:20:31 +00: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
Joel Galenson
24b6158118 Hide bpfloader sys_admin denials.
am: d65f26f1b0

Change-Id: I0435b600f5a163089650c02417646109a97e3e56
2018-05-23 14:28:48 -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
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
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
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
Jordan Liu
05497ede82 Merge "Setup policy for downloaded apns directory" am: fdb38fa6d0
am: a968e32d7c

Change-Id: Ia7aa0f73ef36ec9c8f992a8e1412585ab54a10be
2018-05-21 14:49:22 -07:00
Carmen Jackson
e22f04c975 Add sync and fence tracepoints to user-visible list of tracepoints.
The 'sync' tracepoint was updated to be 'fence' in kernel 4.9, so this
change also adds that one to the list.

Bug: 79935503
Test: Took a trace using 'sync' in user mode and saw the tracepoints
being saved.

Change-Id: I793c6f54cd9364f33853983f8c5dfb28b98c2708
Merged-In: I793c6f54cd9364f33853983f8c5dfb28b98c2708
2018-05-21 14:18:46 -07:00
Carmen Jackson
8640cffa1e Merge "Add sync and fence tracepoints to user-visible list of tracepoints." into pi-dev
am: 09648d9ae3

Change-Id: I1821400703aa5dc41a485d3430946345978045c0
2018-05-21 14:12:20 -07:00
TreeHugger Robot
09648d9ae3 Merge "Add sync and fence tracepoints to user-visible list of tracepoints." into pi-dev 2018-05-21 21:06:39 +00:00
Carmen Jackson
f47f0c3869 Add sync and fence tracepoints to user-visible list of tracepoints.
The 'sync' tracepoint was updated to be 'fence' in kernel 4.9, so this
change also adds that one to the list.

Bug: 79935503
Test: Took a trace using 'sync' in user mode and saw the tracepoints
being saved.

Change-Id: I793c6f54cd9364f33853983f8c5dfb28b98c2708
2018-05-21 12:18:18 -07:00
Jordan Liu
fdb38fa6d0 Merge "Setup policy for downloaded apns directory" 2018-05-21 19:06:54 +00:00
Paul Crowley
c9e9b326d0 Merge "Move more metadata policy from device to here" into pi-dev
am: 5252ad93e2

Change-Id: I591f253f82a91b1e953f46ff2c29e48e4929665b
2018-05-21 10:46:45 -07:00
Tri Vo
87cd58bb33 Merge "audioserver: add access to wake locks." am: 7710647a65
am: 68760afb6c

Change-Id: I7695e7d5f20eda1820ff31663f74c72613f62c82
2018-05-21 10:33:12 -07:00
Niklas Lindgren
f3626f3a86 Setup policy for downloaded apns directory
apns downloaded will enter a new directory that
TelephonyProvider can access.

Bug: 79948106
Test: Manual
Change-Id: I1e7660adf020dc7052da94dfa03fd58d0386ac55
2018-05-21 18:45:50 +02:00