Commit Graph

54826 Commits

Author SHA1 Message Date
Nick Kralevich
7fd2d8ea31 system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2 am: f5bd84b82d
am: 982b8018af

Change-Id: I8cb5052694668ee8021f75778244e4d1b6cc3bb5
2017-05-22 23:18:24 +00:00
Nick Kralevich
982b8018af system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2
am: f5bd84b82d

Change-Id: I163a9224d6b0ff5f42f52656773e1c297661b977
2017-05-22 23:02:13 +00:00
Nick Kralevich
f5bd84b82d system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973
am: c46889e2d2

Change-Id: I840740012d9ba0c434f7de0fd9ca83a44926d018
2017-05-22 22:45:44 +00:00
Nick Kralevich
c46889e2d2 system_server: add CAP_SYS_PTRACE am: 966619d0ab
am: b8d972e973

Change-Id: I4d9e2d9b53523b9182a9f9272d06a93a87b0c61b
2017-05-22 22:23:47 +00:00
Nick Kralevich
b8d972e973 system_server: add CAP_SYS_PTRACE
am: 966619d0ab

Change-Id: Ie5f95f2c078cd0bec7a2b2321c3303301ec9ec74
2017-05-22 22:04:57 +00:00
Nick Kralevich
966619d0ab system_server: add CAP_SYS_PTRACE
Commit https://android.googlesource.com/kernel/common/+/f0ce0eee added
CAP_SYS_RESOURCE as a capability check which would allow access to
sensitive /proc/PID files. system_server uses this capability to collect
smaps from managed processes. Presumably this was done to avoid the
implications of granting CAP_SYS_PTRACE to system_server.

However, with SELinux enforcement, we can grant CAP_SYS_PTRACE but not
allow ptrace attach() to other processes. The net result of this is that
CAP_SYS_PTRACE and CAP_SYS_RESOURCE have identical security controls, as
long as system_server:process ptrace is never granted.

Add CAP_SYS_PTRACE to the set of capabilities granted to system_server.

Don't delete CAP_SYS_RESOURCE for now. SELinux has blocked the use of
CAP_SYS_RESOURCE, but we still want to generate audit logs if it's
triggered. CAP_SYS_RESOURCE can be deleted in a future commit.

Bug: 34951864
Bug: 38496951
Test: Device boots, functionality remains identical, no sys_resource
denials from system_server.
Change-Id: I2570266165396dba2b600eac7c42c94800d9c65b
(cherry picked from commit 3082eb7c72)
2017-05-22 11:28:48 -07:00
Phil Weaver
3a7cf1f057 Make a11y node info parceling more robust am: 1d8eb49073
am: 93c47c9d07

Change-Id: I8677c77968c202c8c6a0553db919610a140fda58
2017-04-07 23:16:55 +00:00
Phil Weaver
93c47c9d07 Make a11y node info parceling more robust
am: 1d8eb49073

Change-Id: I5280a23cbfff5abfcc83e9e6d9afb4f8960ece44
2017-04-07 23:09:28 +00:00
Phil Weaver
a0f874d5c1 Make a11y node info parceling more robust am: d0e54c1c09
am: d87b12a4df

Change-Id: Ic10324338024f86cfc64b3e01c6380b26334d5a3
2017-04-07 22:46:31 +00:00
Phil Weaver
d87b12a4df Make a11y node info parceling more robust
am: d0e54c1c09

Change-Id: Ie4c34b84540bc928859ef1c271b4eb9d520fa6bc
2017-04-07 22:39:22 +00:00
Phil Weaver
1d8eb49073 Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.

(Manual merge from commit 687bb44b43)

Change-Id: I7746c9175a2da28f75d4f4b169d7997abadf1852
2017-04-07 15:21:39 -07:00
Phil Weaver
d0e54c1c09 Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.
Change-Id: I10f24747e3ab87d77cd1deba56db4526e3aa5441
(cherry picked from commit 687bb44b43)
2017-04-07 18:53:26 +00:00
Jeff Sharkey
75f767afa1 DO NOT MERGE. Grant MMS Uri permissions as the calling UID. am: 3f3da42ef9
am: 32c71b078c

Change-Id: I1af83dbf9869bd93ecc5c07e1ce6155206f73290
2017-02-12 09:51:37 +00:00
Jeff Sharkey
a0b1198e70 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
am: 6f754e48e9

Change-Id: I2f6dd5ba1e266b3d451533e518ec7f2fe24b262c
2017-02-12 09:48:46 +00:00
Jeff Sharkey
32c71b078c DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
am: 3f3da42ef9

Change-Id: I222c32931827d906db5fc1e3258f2095e6013481
2017-02-12 09:47:33 +00:00
Jeff Sharkey
6f754e48e9 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
A recent security fix prevents the system UID from handing out Uri
permission grants directly from itself.  Instead, services need to
issue grants as the original calling UID to ensure that the caller
actually has access to the Uris.

Test: builds, boots, send/recv MMS works in primary/secondary users
Bug: 33231106
Change-Id: Ia9fe19843b52977c8a94ee5349b907beda1882fc
(cherry picked from commit 7ff418d9a9)
2017-02-07 04:46:19 +00:00
Jeff Sharkey
3f3da42ef9 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
A recent security fix prevents the system UID from handing out Uri
permission grants directly from itself.  Instead, services need to
issue grants as the original calling UID to ensure that the caller
actually has access to the Uris.

Test: builds, boots, send/recv MMS works in primary/secondary users
Bug: 33231106
Change-Id: Ia9fe19843b52977c8a94ee5349b907beda1882fc
(cherry picked from commit 7ff418d9a9)
2017-02-07 04:43:24 +00:00
Charles He
e5156ec1e9 Prevent writing to FRP partition during factory reset. am: a9437bd1ca am: 2ce5c4320d am: 133ff4d611
am: 00a581f882

Change-Id: I016955744e48d7a91380c2ff39f7c64536a39c7e
2016-12-29 10:18:49 +00:00
Charles He
00a581f882 Prevent writing to FRP partition during factory reset. am: a9437bd1ca am: 2ce5c4320d
am: 133ff4d611

Change-Id: I54b163f645f561243aac3df1a55c1023531997b3
2016-12-29 10:11:20 +00:00
Charles He
133ff4d611 Prevent writing to FRP partition during factory reset. am: a9437bd1ca
am: 2ce5c4320d

Change-Id: I29339a634fd22cd46bfc08619464da8fe159a2b7
2016-12-29 10:03:53 +00:00
Charles He
2ce5c4320d Prevent writing to FRP partition during factory reset.
am: a9437bd1ca

Change-Id: Ib0b8db2357317dc3e680910c08f15f098baf2af9
2016-12-29 09:48:45 +00:00
Charles He
a9437bd1ca Prevent writing to FRP partition during factory reset.
Avoid potential race condition between FRP wipe and write operations
during factory reset by making the FRP partition unwritable after
wipe.

Bug: 30352311
Test: manual
Change-Id: If3f024a1611366c0677a996705724458094fcfad
(cherry picked from commit a629c772f4)
2016-12-14 12:08:30 +00:00
Jeff Sharkey
792d49dfb5 DO NOT MERGE. Check provider access for content changes.
am: 91add43ae7

Change-Id: I158a5dab0643fb5d2c07393f0df030e93b3c006a
2016-12-02 18:19:51 +00:00
Jeff Sharkey
7340749c2a DO NOT MERGE: Check provider access for content changes.
am: ff2fede0dd

Change-Id: I7de766d1acc1f20e83f07953dedfe3810f906db8
2016-12-02 18:19:42 +00:00
Jeff Sharkey
6b89229d14 Merge "DO NOT MERGE. Check provider access for content changes." into lmp-mr1-dev 2016-12-02 18:10:16 +00:00
Jeff Sharkey
ae7d4b1339 Merge "DO NOT MERGE. Check provider access for content changes." into lmp-dev 2016-12-02 18:10:15 +00:00
Jeff Sharkey
48f6bdfce4 Merge "DO NOT MERGE: Check provider access for content changes." into mnc-dr-dev 2016-12-02 18:10:14 +00:00
Jeff Sharkey
8e14278209 Merge "DO NOT MERGE: Check provider access for content changes." into mnc-dev 2016-12-02 18:10:11 +00:00
Jeff Sharkey
2d549764be DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
am: fbf395c220

Change-Id: I453445723ea9f6124d876dc32c6defab42432351
2016-12-02 00:56:26 +00:00
Jeff Sharkey
b9a0b79675 DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
am: 1de465bec2

Change-Id: I14f82fa9c555bea0e71553713436a6836a421691
2016-12-02 00:50:29 +00:00
Jeff Sharkey
f279a5bc0d DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
As part of fixing a recent security issue, DownloadManager now needs
to issue Uri permission grants for all downloads.  However, if an app
that requested a download is upgraded or otherwise force-stopped,
the required permission grants are removed.

We could tell DownloadManager about the app being stopped, but that
would be racy (due to background broadcast), and waking it up would
degrade system health.  Instead, as a special case we now only
consider clearing DownloadManager permission grants when app data
is being cleared.

Bug: 32172542, 30537115
Test: builds, boots, app upgrade doesn't clear grants
Change-Id: I7e3d4546fd12bfe5f81b9fb9857ece58d574a6b9
(cherry picked from commit 23ec811266)
2016-12-01 23:54:50 +00:00
Jeff Sharkey
1de465bec2 DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
As part of fixing a recent security issue, DownloadManager now needs
to issue Uri permission grants for all downloads.  However, if an app
that requested a download is upgraded or otherwise force-stopped,
the required permission grants are removed.

We could tell DownloadManager about the app being stopped, but that
would be racy (due to background broadcast), and waking it up would
degrade system health.  Instead, as a special case we now only
consider clearing DownloadManager permission grants when app data
is being cleared.

Bug: 32172542, 30537115
Test: builds, boots, app upgrade doesn't clear grants
Change-Id: I7e3d4546fd12bfe5f81b9fb9857ece58d574a6b9
(cherry picked from commit 23ec811266)
2016-12-01 23:54:04 +00:00
Jeff Sharkey
fbf395c220 DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
As part of fixing a recent security issue, DownloadManager now needs
to issue Uri permission grants for all downloads.  However, if an app
that requested a download is upgraded or otherwise force-stopped,
the required permission grants are removed.

We could tell DownloadManager about the app being stopped, but that
would be racy (due to background broadcast), and waking it up would
degrade system health.  Instead, as a special case we now only
consider clearing DownloadManager permission grants when app data
is being cleared.

Bug: 32172542, 30537115
Test: builds, boots, app upgrade doesn't clear grants
Change-Id: I7e3d4546fd12bfe5f81b9fb9857ece58d574a6b9
(cherry picked from commit 23ec811266)
2016-12-01 23:51:25 +00:00
Jeff Sharkey
3b0aa060a3 DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
As part of fixing a recent security issue, DownloadManager now needs
to issue Uri permission grants for all downloads.  However, if an app
that requested a download is upgraded or otherwise force-stopped,
the required permission grants are removed.

We could tell DownloadManager about the app being stopped, but that
would be racy (due to background broadcast), and waking it up would
degrade system health.  Instead, as a special case we now only
consider clearing DownloadManager permission grants when app data
is being cleared.

Bug: 32172542, 30537115
Test: builds, boots, app upgrade doesn't clear grants
Change-Id: I7e3d4546fd12bfe5f81b9fb9857ece58d574a6b9
(cherry picked from commit 23ec811266)
2016-12-01 16:50:29 -07:00
Jeff Sharkey
91add43ae7 DO NOT MERGE. Check provider access for content changes.
For an app to either send or receive content change notifications,
require that they have some level of access to the underlying
provider.

Without these checks, a malicious app could sniff sensitive user data
from the notifications of otherwise private providers.

Test: builds, boots, PoC app now fails
Bug: 32555637
Change-Id: If2dcd45cb0a9f1fb3b93e39fc7b8ae9c34c2fdef
2016-11-18 15:37:57 -07:00
Jeff Sharkey
9b85862620 DO NOT MERGE. Check provider access for content changes.
For an app to either send or receive content change notifications,
require that they have some level of access to the underlying
provider.

Without these checks, a malicious app could sniff sensitive user data
from the notifications of otherwise private providers.

Test: builds, boots, PoC app now fails
Bug: 32555637
Change-Id: If2dcd45cb0a9f1fb3b93e39fc7b8ae9c34c2fdef
2016-11-18 15:37:08 -07:00
Jeff Sharkey
ff2fede0dd DO NOT MERGE: Check provider access for content changes.
For an app to either send or receive content change notifications,
require that they have some level of access to the underlying
provider.

Without these checks, a malicious app could sniff sensitive user data
from the notifications of otherwise private providers.

Test: builds, boots, PoC app now fails
Bug: 32555637
Change-Id: If2dcd45cb0a9f1fb3b93e39fc7b8ae9c34c2fdef
2016-11-17 21:02:40 +00:00
Jeff Sharkey
4ddbf942a0 DO NOT MERGE: Check provider access for content changes.
For an app to either send or receive content change notifications,
require that they have some level of access to the underlying
provider.

Without these checks, a malicious app could sniff sensitive user data
from the notifications of otherwise private providers.

Test: builds, boots, PoC app now fails
Bug: 32555637
Change-Id: If2dcd45cb0a9f1fb3b93e39fc7b8ae9c34c2fdef
2016-11-17 21:02:37 +00:00
Andriy Naborskyy
11da2b5de3 Merge "DO NOT MERGE ANYWHERE Revert "DO NOT MERGE ANYWHERE libhwui: make setSurface asynchronous"" into cw-e-dev 2016-11-12 03:18:55 +00:00
Andriy Naborskyy
c5bf8bc74d DO NOT MERGE ANYWHERE Revert "DO NOT MERGE ANYWHERE libhwui: make setSurface asynchronous"
This reverts commit 80e6d8873b.

Bug: 32771832

Change-Id: Ia2f2ffd08dfd87cbce1ec750d6b61277799b536f
2016-11-10 03:17:08 +00:00
Shuo Gao
1b5d5bd119 DO NOT MERGE ANYWHERE Enable shader cache for applications that shared UID with multiple packages
from AOSP: https://android-review.googlesource.com/#/c/209490/

Frameworks supported a mature mechanism for shader cache per each package already,
but as a special case such as Settings APP, if there are several packages in this
application which means that multiple packages shared the same SharedUserID with it,
it won't initialize the graphics disk caches, thereby APP like Settings have to
rebuild and relink shader every time during launch, which cause a bad launching
performance, so here to enable the GFX and RS cache initialization for multiple
shared packages case too.

Change-Id: If0f927e3399b775804abf1d9a868887951f471c5
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2016-10-25 18:49:47 -07:00
Thomas Buhot
80e6d8873b DO NOT MERGE ANYWHERE libhwui: make setSurface asynchronous
from AOSP: https://android-review.googlesource.com/#/c/183305/

On the critical path of the cold launch of applications
the main thread of the started application tells the RenderThread
to create a surface. This process is synchronous and blocks
the main thread of the application until the creation
of the EGLContext is complete.
As a consequence the launch time of the application is delayed
by time spent allocating the EGL Context in the RenderThread.

With this optimization the launch time of any application
is improved (for example settings by 20 to 40 ms).

Change-Id: Ibf47aaa0abb8dedf7aa00693073db3785d9d6b08
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2016-10-25 18:48:50 -07:00
Xin Li
7e0483fcec Merge "Merge "DO NOT MERGE - Added Emergency affordance feature" into
lollipop-mr1-dev" into lmp-mr1-dev.

Change-Id: Ia47211f647d0d49b0adf3cb65eba4b9b686bcbff
2016-10-13 13:54:54 -07:00
Xin Li
ee2903686f Merge "Merge "DO NOT MERGE - Added Emergency affordance feature" into
marshmallow-dev" into mnc-dev.

Change-Id: I7215eebd4a2cc9a4b6ccf2a3e36ed8edc556d208
2016-10-13 13:51:42 -07:00
Selim Cinek
cd22634003 DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.

If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.

Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-10-06 02:15:31 +00:00
Selim Cinek
5fbc86bfd6 DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.

If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.

Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-10-05 18:40:07 -07:00
Ajay Panicker
46442d1be1 [DO NOT MERGE] Prevent FDs from being leaked when accepted sockets are closed
am: 85bc33a8f4

Change-Id: I2194d4c01e8bff53a7d6fcdf25513b216a511155
2016-09-21 21:15:32 +00:00
Ajay Panicker
447ac4b31d Merge "[DO NOT MERGE] Prevent FDs from being leaked when accepted sockets are closed" into lmp-mr1-dev 2016-09-21 21:08:10 +00:00
Ajay Panicker
f78ff48d0d Merge "[DO NOT MERGE] Prevent FDs from being leaked when accepted sockets are closed" into lmp-dev 2016-09-21 21:08:07 +00:00
Ajay Panicker
cc4fd13113 [DO NOT MERGE] Fix setPairingConfirmation permissions issue (2/2)
am: bb9b38b957

Change-Id: I8083cdc24b838d235c83360372afc198c2f9f6c5
2016-09-21 01:02:28 +00:00