Commit graph

14699 commits

Author SHA1 Message Date
Connor O'Brien
2f78b2c3d6 Fix vold vulnerability in FrameworkListener am: 470484d2a2 am: e9e046df6c am: 109024f74a am: b906ad88b9 am: 2fadbb93a4 am: e04054d9bb
am: 9745b11db1

Change-Id: I61f685976803f51db9ba85729554fc14efaa4b2c
2016-08-19 22:36:29 +00:00
Connor O'Brien
9745b11db1 Fix vold vulnerability in FrameworkListener am: 470484d2a2 am: e9e046df6c am: 109024f74a am: b906ad88b9 am: 2fadbb93a4
am: e04054d9bb

Change-Id: Ia5f46e5b9622946ca0e44fbe7399729807d2d08a
2016-08-19 22:34:46 +00:00
Connor O'Brien
e04054d9bb Fix vold vulnerability in FrameworkListener am: 470484d2a2 am: e9e046df6c am: 109024f74a am: b906ad88b9
am: 2fadbb93a4

Change-Id: I19405fe2bbf0034db3fc0298d1616df5611e2a92
2016-08-19 22:18:34 +00:00
Connor O'Brien
2fadbb93a4 Fix vold vulnerability in FrameworkListener am: 470484d2a2 am: e9e046df6c am: 109024f74a
am: b906ad88b9

Change-Id: Ida2b33bd1db284dfa8ad3f130219481a92785e97
2016-08-19 22:14:57 +00:00
Connor O'Brien
b906ad88b9 Fix vold vulnerability in FrameworkListener am: 470484d2a2 am: e9e046df6c
am: 109024f74a

Change-Id: Ia6e8dca36bc28d442a6e374ecf033b79176f4b93
2016-08-19 22:11:27 +00:00
Connor O'Brien
109024f74a Fix vold vulnerability in FrameworkListener am: 470484d2a2
am: e9e046df6c

Change-Id: I8f2452782817ddf03051af08e70ba9d4c4fa578a
2016-08-19 22:08:22 +00:00
Connor O'Brien
e9e046df6c Fix vold vulnerability in FrameworkListener
am: 470484d2a2

Change-Id: Id27ae391c4c0e07f014fbde41d99d45bfa275554
2016-08-19 22:01:08 +00:00
Connor O'Brien
470484d2a2 Fix vold vulnerability in FrameworkListener
Modify FrameworkListener to ignore commands that exceed the maximum
buffer length and send an error message.

Bug: 29831647
Change-Id: I9e57d1648d55af2ca0191bb47868e375ecc26950
Signed-off-by: Connor O'Brien <connoro@google.com>
(cherry picked from commit baa126dc15)
2016-08-19 17:05:25 +00:00
Josh Gao
0790936473 Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee am: ac3fbb1a4a am: 7ed0995930 -s ours am: 58dd6f7cba -s ours am: 55259f320b am: 9183477cca
am: fdb4cd42f6  -s ours

Change-Id: Ie74b4d7f058f5309835467b1f2b0c7af10a3deb5
2016-08-15 19:38:14 +00:00
Josh Gao
dc83f1839b DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 8d6ca194ee am: 8f7cc0e387 -s ours am: be9d9fc379 -s ours am: 2071bcfa75 -s ours am: 7fe65ab421 am: b92fecf460
am: 48cd7ddd89  -s ours

Change-Id: Iaaf6bda3c6331c437116cde7913a5b8562854390
2016-08-15 19:38:14 +00:00
Josh Gao
fdb4cd42f6 Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee am: ac3fbb1a4a am: 7ed0995930 -s ours am: 58dd6f7cba -s ours am: 55259f320b
am: 9183477cca

Change-Id: Idf1fc233cf76a144b1f410962f6b2b5527867c42
2016-08-15 19:33:36 +00:00
Josh Gao
48cd7ddd89 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 8d6ca194ee am: 8f7cc0e387 -s ours am: be9d9fc379 -s ours am: 2071bcfa75 -s ours am: 7fe65ab421
am: b92fecf460

Change-Id: Ie10d035b8a18c39bd15e72afc6f270fe33aff63a
2016-08-15 19:33:35 +00:00
Josh Gao
9183477cca Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee am: ac3fbb1a4a am: 7ed0995930 -s ours am: 58dd6f7cba -s ours
am: 55259f320b

Change-Id: I7a4c95b1d5b4ec51fea7867e490d50cb9138871d
2016-08-15 19:10:12 +00:00
Josh Gao
b92fecf460 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 8d6ca194ee am: 8f7cc0e387 -s ours am: be9d9fc379 -s ours am: 2071bcfa75 -s ours
am: 7fe65ab421

Change-Id: I5ff20f785127d356eae5c0626cc4cc994d638109
2016-08-15 19:10:11 +00:00
Josh Gao
55259f320b Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee am: ac3fbb1a4a am: 7ed0995930 -s ours
am: 58dd6f7cba  -s ours

Change-Id: Ia416c2ddc18630671ab7e27d25792dd601f309df
2016-08-15 19:05:10 +00:00
Josh Gao
7fe65ab421 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 8d6ca194ee am: 8f7cc0e387 -s ours am: be9d9fc379 -s ours
am: 2071bcfa75  -s ours

Change-Id: I491d40595bf23ea2a8b9db6df1c57b6e6e281604
2016-08-15 19:05:10 +00:00
Josh Gao
58dd6f7cba Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee am: ac3fbb1a4a
am: 7ed0995930  -s ours

Change-Id: I5e4be4eaca413d2f1a8027cf5fa69be9e1d9a644
2016-08-15 19:01:10 +00:00
Josh Gao
2071bcfa75 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 8d6ca194ee am: 8f7cc0e387 -s ours
am: be9d9fc379  -s ours

Change-Id: I8c637fa765c4f6b79354855f245e78b82b87e3bf
2016-08-15 19:01:10 +00:00
Josh Gao
7ed0995930 Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee
am: ac3fbb1a4a

Change-Id: I6988483d7d461c1accdb27130517d11d0fdd7f0e
2016-08-15 18:57:27 +00:00
Josh Gao
be9d9fc379 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 8d6ca194ee
am: 8f7cc0e387  -s ours

Change-Id: I073d06e3ee81c39bfaca866783de2113ac13cf72
2016-08-15 18:57:09 +00:00
Josh Gao
ac3fbb1a4a Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev
am: 23effb07ee

Change-Id: If1aa441cf204ce5f3e56b9c1d2637acae72a83e1
2016-08-15 18:29:09 +00:00
Josh Gao
8f7cc0e387 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
am: 8d6ca194ee

Change-Id: I1459607b655da6e01bd5d59e31bdb6d79d504431
2016-08-15 18:29:09 +00:00
Josh Gao
23effb07ee Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev 2016-08-15 18:18:44 +00:00
TreeHugger Robot
73c59ad77c Merge "DO NOT MERGE: adb: reenable (and fix) Windows build." into mnc-dev 2016-08-11 20:09:30 +00:00
Josh Gao
804de7a29e DO NOT MERGE: adb: reenable (and fix) Windows build.
This branch is still getting used to build some SDK targets.

Bug: http://b/30767018
Change-Id: I85b03a80d69ceef5e5333505f0832129387ed2da
2016-08-11 11:29:43 -07:00
Josh Gao
8b6b654a5f debuggerd: fix missed use of ptrace(PTRACE_ATTACH).
Bug: http://b/29555636
Change-Id: Ibd8a2e2b619b74aac667555b7085d6f28e367c07
2016-08-09 15:52:26 -07:00
Josh Gao
e467cced5c DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644 am: 5920345eeb
am: cb4d905c96  -s ours

Change-Id: Ia99e7055a24da12133e48e03b466fe09ebcb811f
2016-07-19 20:42:28 +00:00
Josh Gao
cb4d905c96 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644
am: 5920345eeb

Change-Id: I06ba81a4abd04402ef250efebd333b878496cdab
2016-07-19 20:38:46 +00:00
Josh Gao
851f840835 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367 am: 9048b3bb8e
am: 6cb199bf4a  -s ours

Change-Id: I26ed6fa730d66419319a5832b7f011cd15601e03
2016-07-19 20:36:38 +00:00
Josh Gao
5920345eeb DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours
am: b9b6ec3644

Change-Id: Iaf40759e124c4a01a9a3d21021939729a73c48e9
2016-07-19 20:35:39 +00:00
Josh Gao
6cb199bf4a DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367
am: 9048b3bb8e

Change-Id: I2223884e41d15dabf94df861e28f9392b82678af
2016-07-19 20:33:40 +00:00
Josh Gao
b9b6ec3644 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
am: 0528829b73  -s ours

Change-Id: I1644cca9d9631f291a3e80b6813e9cc33a8d5833
2016-07-19 20:32:42 +00:00
Josh Gao
9048b3bb8e DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
am: 36dd144367

Change-Id: I29864f223541596e9ffccb44c0c257399b0d9cb0
2016-07-19 20:30:19 +00:00
Josh Gao
73922b82ee Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into mnc-dev 2016-07-19 20:20:56 +00:00
Josh Gao
a50e8ffa7d DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
Fix two races in debuggerd's PTRACE_ATTACH logic:
  1. The target thread in a crash dump request could exit between the
     /proc/<pid>/task/<tid> check and the PTRACE_ATTACH.
  2. Sibling threads could exit between listing /proc/<pid>/task and the
     PTRACE_ATTACH.

Backport of NYC change I4dfe1ea30e2c211d2389321bd66e3684dd757591
Bug: http://b/29555636
Change-Id: I6c6efcf82a49bca140d761b2d1de04215ba4d252
2016-07-18 13:23:29 -07:00
Josh Gao
36dd144367 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
Fix two races in debuggerd's PTRACE_ATTACH logic:
  1. The target thread in a crash dump request could exit between the
     /proc/<pid>/task/<tid> check and the PTRACE_ATTACH.
  2. Sibling threads could exit between listing /proc/<pid>/task and the
     PTRACE_ATTACH.

Backport of NYC change I4dfe1ea30e2c211d2389321bd66e3684dd757591
Bug: http://b/29555636
Change-Id: I320f47216b21018d3f613cfbbaaff40b3548ef36
2016-07-18 19:35:45 +00:00
Josh Gao
f71c01493a adb: use asocket's close function when closing.
close_all_sockets was assuming that all registered local sockets used
local_socket_close as their close function. However, this is not true
for JDWP sockets.

Bug: http://b/28347842
Change-Id: I40a1174845cd33f15f30ce70828a7081cd5a087e
(cherry picked from commit 53eb31d87c)
(cherry picked from commit 014b01706c)
2016-07-15 17:17:14 -07:00
Josh Gao
6f641adea5 adb: switch the socket list mutex to a recursive_mutex.
sockets.cpp was branching on whether a socket close function was
local_socket_close in order to avoid a potential deadlock if the socket
list lock was held while closing a peer socket.

Bug: http://b/28347842
Change-Id: I5e56f17fa54275284787f0f1dc150d1960256ab3
(functionally a cherrypick of 903b749f + 9b587dec, with windows disabled)
2016-07-15 17:17:14 -07:00
Josh Gao
0528829b73 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
Fix two races in debuggerd's PTRACE_ATTACH logic:
  1. The target thread in a crash dump request could exit between the
     /proc/<pid>/task/<tid> check and the PTRACE_ATTACH.
  2. Sibling threads could exit between listing /proc/<pid>/task and the
     PTRACE_ATTACH.

Backport of NYC change I4dfe1ea30e2c211d2389321bd66e3684dd757591
Bug: http://b/29555636
Change-Id: I320f47216b21018d3f613cfbbaaff40b3548ef36
2016-07-14 16:47:10 -07:00
Josh Gao
8d6ca194ee DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
Fix two races in debuggerd's PTRACE_ATTACH logic:
  1. The target thread in a crash dump request could exit between the
     /proc/<pid>/task/<tid> check and the PTRACE_ATTACH.
  2. Sibling threads could exit between listing /proc/<pid>/task and the
     PTRACE_ATTACH.

Backport of NYC change I4dfe1ea30e2c211d2389321bd66e3684dd757591
Bug: http://b/29555636
Change-Id: I93f6423e6de38e2bc6c75d8d33052da4cd2daa8a
2016-07-14 16:19:49 -07:00
Sergio Giro
72bad95df5 Merge \\\\"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\" into lmp-dev am: 8d2d6cedbb -s ours am: 71da8e7537 am: 5e03ed1dab
am: b00e3603ef  -s ours

Change-Id: Id73880ce44c4a1cb14c04b6e533e888ac28e1ae0
2016-07-14 18:03:17 +00:00
Sergio Giro
f611765aaf DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 2806397d1e am: 8c9d02551c
am: 28f28ce635  -s ours

Change-Id: I2ef3ab0e4e3c64c9b5c17454ab738f3d5bdb5dd3
2016-07-14 18:03:14 +00:00
Sergio Giro
b00e3603ef Merge \\\"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\" into lmp-dev am: 8d2d6cedbb -s ours am: 71da8e7537
am: 5e03ed1dab

Change-Id: I69b9c166dcd1f76cfe6555cae0580366f79258cc
2016-07-14 18:00:50 +00:00
Sergio Giro
28f28ce635 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 2806397d1e
am: 8c9d02551c

Change-Id: Ia8754c27d2d2a639280235c2dbf9043f3442421e
2016-07-14 17:59:56 +00:00
Sergio Giro
5e03ed1dab Merge \\"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\" into lmp-dev am: 8d2d6cedbb -s ours
am: 71da8e7537

Change-Id: I1c9b5abdf550bb2e6f294c7f0920ff72e6bcfc0e
2016-07-14 17:59:48 +00:00
Sergio Giro
8c9d02551c DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 2806397d1e

Change-Id: I28785c3aa9d2b11b045c53fea557c0d74bd65181
2016-07-14 17:52:06 +00:00
Sergio Giro
71da8e7537 Merge \"DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\" into lmp-dev
am: 8d2d6cedbb  -s ours

Change-Id: Id0e0d5176560cf883da2e5507ba9106ecc624536
2016-07-14 17:52:05 +00:00
Sergio Giro
8d2d6cedbb Merge "DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8" into lmp-dev 2016-07-14 17:36:23 +00:00
Sergio Giro
2806397d1e DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

(cherry picked from commit c4966a363e)

Change-Id: Idfb0eb29b305678608586d25c2f372146569ad39
Bug: 29250543
2016-07-14 17:25:27 +00:00
Sergio Giro
3411dd4457 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
(cherry picked from commit c4966a363e)
2016-07-14 16:49:50 +01:00