Commit Graph

161295 Commits

Author SHA1 Message Date
Suprabh Shukla
835c8b3d69 DO NOT MERGE Do not call RecoverySystem with DPMS lock held
Note DPM.wipeData() on a secondary user is now blocking, just like
it's been always blocking on the primary user.

Bug 30681079

Change-Id: Ia832bed0f22396998d6307ab46e262dae9463838
2017-01-30 20:52:07 -08:00
Charles He
63a27d773b Merge "Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable." into lmp-mr1-dev 2016-12-29 09:43:14 +00:00
Charles He
4bd97eb888 Merge "Prevent writing to FRP partition during factory reset." into lmp-mr1-dev 2016-12-29 09:42:30 +00:00
Tom O'Neill
1684e5f344 Fix exploit where can hide the fact that a location was mocked am: a206a0f17e am: d417e54872 am: 3380a77516
am: 0a8978f04b

Change-Id: I693665a57465ec57f946fad57cda9ce48389408f
2016-12-22 17:14:05 +00:00
Tom O'Neill
0a8978f04b Fix exploit where can hide the fact that a location was mocked am: a206a0f17e am: d417e54872
am: 3380a77516

Change-Id: Ice61f337e1fcfd0569431538e475d94f9d205423
2016-12-22 17:09:09 +00:00
Tom O'Neill
3380a77516 Fix exploit where can hide the fact that a location was mocked am: a206a0f17e
am: d417e54872

Change-Id: I2f47020055f962b36f095137d75c9cbfe6b1a6db
2016-12-22 17:04:07 +00:00
Tom O'Neill
d417e54872 Fix exploit where can hide the fact that a location was mocked
am: a206a0f17e

Change-Id: Ib3af056919a4b909d3d11dd3fe2b46eaa7cdf0f4
2016-12-22 16:58:33 +00:00
Tom O'Neill
a206a0f17e Fix exploit where can hide the fact that a location was mocked
- Even if call setTestProviderLocation() with inconsistent providers,
should still end up with a location that is flagged as mocked

- Bug: 33091107

Change-Id: I39e038f25b975989c2e8651bfd9ec9e74073e6cd
2016-12-15 10:26:28 -08:00
Charles He
71d2a41dd9 Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable.
Change-Id: I1024f2a56badde5c123d025d6fe02f42559cbcb1
Test: manual
Bug: 30352311
(cherry picked from commit f6f1d62748)
2016-12-14 13:28:55 +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
ce477912a2 Merge "DO NOT MERGE. Check provider access for content changes." into lmp-dev
am: ae7d4b1339  -s ours

Change-Id: Idc5d7d7d695db9ac7e7007447c89ca0466ea158b
2016-12-02 18:19:53 +00:00
Jeff Sharkey
9277cce7fa DO NOT MERGE. Check provider access for content changes.
am: 9b85862620  -s ours

Change-Id: I2a67bbde8b3e131ba62cedd0b6629912e226ba90
2016-12-02 18:19:50 +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
704085119d DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
am: f279a5bc0d  -s ours

Change-Id: I7fde8a3cd529bc495aa7e886988d73e22815c0b4
2016-12-02 00:50:27 +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
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
Narayan Kamath
35b8453338 Zygote : Block SIGCHLD during fork.
am: b1f1209d9a

Change-Id: I3658f583c82dd6243089aaa74ad731a5bfa85b01
2016-11-10 11:05:42 +00:00
Narayan Kamath
b1f1209d9a Zygote : Block SIGCHLD during fork.
We close the android logging related sockets prior as late as possible
before every fork to avoid having to whitelist them. If one of the
zygote's children dies after this point (but prior to the fork), we can
end up reopening the logging sockets from the SIGCHLD signal handler.

To prevent this from happening, block SIGCHLD during this critical
section.

Bug: 32693692
Test: Manual

(cherry picked from commit e9a525829a)

Zygote: Unblock SIGCHLD in the parent after fork.

Follow up to change e9a525829a. Allows the zygote to
receive SIGCHLD again and prevents the zygote from getting into a
zombie state if it's killed.

Contributed-By: rhed_jao <rhed_jao@htc.com>
Bug: 32693692
Test: manual

(cherry picked from commit 1480dc3e97)

Change-Id: If89903a29c84dfc9b056f9e19618046874bba689
2016-11-10 10:06:01 +00:00
Narayan Kamath
a045aed7a2 Merge "Zygote: Additional whitelisting for legacy devices." into lmp-dev
am: 7bd25ab485

Change-Id: I0266e2fe129ac5ae0c7bbd84e7890d5c41872655
2016-11-09 10:24:57 +00:00
Narayan Kamath
f369b3ce75 Zygote: Additional whitelisting for legacy devices.
am: 7d302e018d

Change-Id: I15f8e0ec93f502ca45a9b00d93baa66780701996
2016-11-09 10:24:53 +00:00
Narayan Kamath
7bd25ab485 Merge "Zygote: Additional whitelisting for legacy devices." into lmp-dev 2016-11-09 10:20:04 +00:00
Narayan Kamath
fd23b9d509 Merge "Zygote: Additional whitelists for runtime overlay / other static resources." into lmp-dev
am: d60156dfc6

Change-Id: I3696ed3639492ae446ccd1c9ad4feaaa9e15a5ef
2016-11-09 09:39:23 +00:00
Narayan Kamath
1e6a5d11a6 Zygote: Additional whitelists for runtime overlay / other static resources.
am: 0ad0e859f6

Change-Id: Id24798deebb738ba6c6b6abef28ca96c0c61dc79
2016-11-09 09:39:20 +00:00
Narayan Kamath
d60156dfc6 Merge "Zygote: Additional whitelists for runtime overlay / other static resources." into lmp-dev 2016-11-09 09:30:50 +00:00
neo.chae
82537abc3b Fix idmap leak in zygote process
am: 0244ca8d10

Change-Id: Ia35ded23161ad5c5c6fe4dea388e74b8d8af2955
2016-11-09 09:21:46 +00:00
Xin Li
78f15948fb Merge "Merge "Merge "DO NOT MERGE - Added Emergency affordance feature" into lollipop-mr1-dev" into lmp-mr1-dev." into lmp-mr1-dev 2016-11-08 21:24:17 +00:00
neo.chae
0244ca8d10 Fix idmap leak in zygote process
Fix a idmap leak in AssetManager::addSystemOverlays.
And, The fix could also prevent fd leak of idmap.

Test: none
Bug: 32691930

Signed-off-by: Hyangseok Chae <neo.chae@lge.com>

(cherry picked from commit 6a742a3850)

Change-Id: Idc4af77db2b0cb739bd6b009b6af0f9123be1aac
2016-11-08 09:59:44 +00:00
Narayan Kamath
7d302e018d Zygote: Additional whitelisting for legacy devices.
On M and below, we provide a blanket whitelist for all files under
"/vendor/zygote_whitelist". This path is whitelisted purely to allow
this patch to be applied easily on legacy devices and configurations.

Note that this does not amount to a loosening of our security policy
because whitelisted files are reopened anyway.

Bug: 32691930
Test: manual

(cherry picked from commit 5e2f7c6229)

Change-Id: I9700fc7b469d0bc4d876c52292f25888b94a5223
2016-11-08 09:42:11 +00:00
Narayan Kamath
0ad0e859f6 Zygote: Additional whitelists for runtime overlay / other static resources.
Partially cherry picked from commit 1c15c63578.

These files are safe to reopen for the same reason that files in
/system/framework are. They're regular files and will not change after
the first zygote fork.

Bug: 32618130

Change-Id: I119e0bfcbf397cb331064adf148d92a5cd3ea92f
2016-11-08 09:41:49 +00:00
Sungsoo
ec44540d42 DO NOT MERGE) ExifInterface: Close the file when an exception happens am: 418e0869ba am: a5affb045e am: 9a15881184 -s ours
am: 21c4e6d532  -s ours

Change-Id: Ibf02e62ee13accd5d204c44faeb6aa8c05afb709
2016-10-18 17:47:58 +00:00
Sungsoo
21c4e6d532 DO NOT MERGE) ExifInterface: Close the file when an exception happens am: 418e0869ba am: a5affb045e
am: 9a15881184  -s ours

Change-Id: I67ba2d8b8d3c3f32fca417303ee422482acc40d8
2016-10-18 17:41:55 +00:00
Sungsoo
9a15881184 DO NOT MERGE) ExifInterface: Close the file when an exception happens am: 418e0869ba
am: a5affb045e

Change-Id: I4bb4440c019839073b4fcf6df54d726a02286680
2016-10-18 17:35:23 +00:00
Sungsoo
02cd808ab8 DO NOT MERGE) ExifInterface: Close the file when an exception happens
am: 135524f2c5  -s ours

Change-Id: I34fc1b37171ad6ea5d79035df6c4730260a0b47b
2016-10-18 17:29:03 +00:00
Sungsoo
a5affb045e DO NOT MERGE) ExifInterface: Close the file when an exception happens
am: 418e0869ba

Change-Id: Ifad08d681f67abc4dd9ad5d8c4e82b038cbd8322
2016-10-18 17:28:58 +00:00
Sungsoo
ad74e88f1d DO NOT MERGE) ExifInterface: Close the file when an exception happens
Bug: 32068647, Bug: 30936376
Change-Id: I22fa2384348c890ca726d2b1632cd54e59d25a8f
2016-10-18 16:18:35 +00:00
Sungsoo
135524f2c5 DO NOT MERGE) ExifInterface: Close the file when an exception happens
Bug: 32068647, Bug: 30936376
Change-Id: I22fa2384348c890ca726d2b1632cd54e59d25a8f
2016-10-18 16:18:15 +00:00
Sungsoo
418e0869ba DO NOT MERGE) ExifInterface: Close the file when an exception happens
Bug: 32068647, Bug: 30936376
Change-Id: I22fa2384348c890ca726d2b1632cd54e59d25a8f
2016-10-18 16:17:29 +00:00
Suprabh Shukla
0eef6b3ff2 Merge "DO NOT MERGE Isolated processes don't get precached system service binders" into klp-dev am: 6739ba0280 am: c36913e68a am: e3c0c509ea -s ours
am: 5bea7d3aee  -s ours

Change-Id: If66e50ff4d2f4c1b91ed3204d7a11000429489d5
2016-10-15 00:59:41 +00:00
Suprabh Shukla
7dfd05f0e5 DO NOT MERGE Isolated processes don't get precached system service binders am: 2aa7e5e861 am: 9df66924c0 am: e07b811d78 -s ours
am: 9c78d0ad9f  -s ours

Change-Id: I6e82648a135bd8ae17337eb97518eb8856d065e0
2016-10-15 00:56:40 +00:00
Suprabh Shukla
5bea7d3aee Merge "DO NOT MERGE Isolated processes don't get precached system service binders" into klp-dev am: 6739ba0280 am: c36913e68a
am: e3c0c509ea  -s ours

Change-Id: I287e60913bd2a3f6b46d1d5ef2413727e3e63cc2
2016-10-15 00:49:46 +00:00
Suprabh Shukla
9c78d0ad9f DO NOT MERGE Isolated processes don't get precached system service binders am: 2aa7e5e861 am: 9df66924c0
am: e07b811d78  -s ours

Change-Id: Ia9271aeed1c2953a318fc4bf50ee169739147d66
2016-10-15 00:48:51 +00:00
Suprabh Shukla
e3c0c509ea Merge "DO NOT MERGE Isolated processes don't get precached system service binders" into klp-dev am: 6739ba0280
am: c36913e68a

Change-Id: I65ab1551a4cdbbdf58bf9ec98f718e79c6ee9fe5
2016-10-15 00:41:36 +00:00
Suprabh Shukla
e07b811d78 DO NOT MERGE Isolated processes don't get precached system service binders am: 2aa7e5e861
am: 9df66924c0

Change-Id: I9bd2580a687037fe9c5d74765d47bb4500b4d096
2016-10-15 00:40:45 +00:00
Suprabh Shukla
c36913e68a Merge "DO NOT MERGE Isolated processes don't get precached system service binders" into klp-dev
am: 6739ba0280

Change-Id: Ib8534d2c7ae344d430a9ba2e227cb65d942f0222
2016-10-15 00:34:11 +00:00
Suprabh Shukla
9df66924c0 DO NOT MERGE Isolated processes don't get precached system service binders
am: 2aa7e5e861

Change-Id: Ied81e1f4b517627f0ced686e7485fa035b1f4c6a
2016-10-15 00:34:09 +00:00
Suprabh Shukla
40a13c5917 Merge "DO NOT MERGE Isolated processes don't get precached system service binders" into lmp-dev
am: 35bd0fc5f0  -s ours

Change-Id: I852b990d1715782f3332d56bba6f08b72da403c6
2016-10-15 00:34:06 +00:00
Suprabh Shukla
8d124e37f1 DO NOT MERGE Isolated processes don't get precached system service binders
am: 4779ee70a2  -s ours

Change-Id: Ie4aef1642ca6f23d78e732f27455ebd087866121
2016-10-15 00:34:04 +00:00