Commit graph

10311 commits

Author SHA1 Message Date
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
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
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
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
b022447a3a 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 14:47:59 +00:00
Sergio Giro
247ac63c69 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6 am: d0ad14ca21
am: 3841c92912  -s ours

Change-Id: Ia555a7e1a9eaf3f00dfa91ceb8afe85c48e4b7d5
2016-07-14 13:01:44 +00:00
Sergio Giro
3841c92912 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6
am: d0ad14ca21

Change-Id: Id0901a86ea469d664badfee75db32948c88e72f7
2016-07-14 12:55:58 +00:00
Sergio Giro
d0ad14ca21 DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 5fce0542b6

Change-Id: I348b457decce08d6d08819a16d618b0bc194aa91
2016-07-14 12:49:59 +00:00
Sergio Giro
5fce0542b6 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)

Bug: 29250543
Change-Id: Ia2d6a550f5594280505fb0835c752e53898700ed
2016-07-14 12:34:30 +00:00
Sergio Giro
605de74373 Revert \\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\" am: 311002936e am: ddd0051968
am: b218b2d34d

Change-Id: Iced8e47993a39103aed3deafb5deb974995ecdba
2016-07-13 12:47:25 +00:00
Sergio Giro
b218b2d34d Revert \\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\" am: 311002936e
am: ddd0051968

Change-Id: Ia2a422c170a0d700a1d4d55ea920361689a9be8b
2016-07-13 12:44:00 +00:00
Sergio Giro
ddd0051968 Revert \"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\"
am: 311002936e

Change-Id: Ic21d2414fb13c14feee56403324d31b0198e10e7
2016-07-13 12:40:29 +00:00
Sergio Giro
311002936e Revert "libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8"
This reverts commit 53473c1607.

Change-Id: I27379317e08ecbd5e3b95b7ece58194838ab6c21
2016-07-13 11:47:53 +00:00
Sergio Giro
fd7bd2dfef libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c
am: 29ccafe5f0

Change-Id: If7c24750afcae3a4b73885b2c4fb9b99ffca5c45
2016-07-13 09:41:12 +00:00
Sergio Giro
29ccafe5f0 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607
am: 41e6690d0c

Change-Id: I0f7707c88684f9cc24fff878d3d3751b6025227f
2016-07-13 09:37:36 +00:00
Sergio Giro
41e6690d0c libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 53473c1607

Change-Id: I04d6546b426dfbab278491d831f8b47ec077839f
2016-07-13 09:33:58 +00:00
Sergio Giro
53473c1607 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)
(changed code for safetynet logging due to lack of sstream and string in klp)

Change-Id: If50d59a91a13fddbff9a8fff0d3eebe57c711e93
Bug: 29250543
2016-07-12 18:39:11 +01:00
Josh Gao
45a4bca09d DO NOT MERGE: adb: use asocket\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999
am: a3d96cfec9  -s ours

Change-Id: I4ca0f2890519c3450a15edab989ca424b6bb10ae
2016-06-22 18:07:24 +00:00
Josh Gao
a3d96cfec9 DO NOT MERGE: adb: use asocket\\'s close function when closing. am: 5218ad36ad
am: d7e24ec999

Change-Id: I9ca9e7e857de9e9679169cd7239f9e54a3d98dd2
2016-06-22 18:02:25 +00:00
Josh Gao
d7e24ec999 DO NOT MERGE: adb: use asocket\'s close function when closing.
am: 5218ad36ad

Change-Id: Ibc9ee3b566d34847f4e1e02413890449750ba2f5
2016-06-22 17:59:18 +00:00
Josh Gao
83cb3032d2 DO NOT MERGE: 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.

Backport of 53eb31d8 and 9b587de.

Bug: http://b/28347842
Change-Id: I05e071b3d5c7e55c7a59400c5c9bb0635eeef29f
2016-06-21 16:28:29 -07:00
Josh Gao
5218ad36ad DO NOT MERGE: 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.

Backport of 53eb31d8 and 9b587de.

Bug: http://b/28347842
Change-Id: I13ec6fd87a0691c72608baf6038adcc0f03dca9f
2016-06-21 16:28:21 -07:00
Elliott Hughes
de529e72b6 resolve merge conflicts of 7f5da85 to lmp-dev
Change-Id: I7a7547426a229ac99d187ec8bfabd49c4da51907
2016-05-24 15:23:48 -07:00
Elliott Hughes
7f5da85015 Fix scanf %s in lsof. am: 008efb756f
am: 491dfb11b7

* commit '491dfb11b762f44dc9848496d5d30514082aab64':
  Fix scanf %s in lsof.

Change-Id: Ife17fa56f125dfec08d0d4b0c5c368bdae51106e
2016-05-24 22:13:03 +00:00
Elliott Hughes
491dfb11b7 Fix scanf %s in lsof.
am: 008efb756f

* commit '008efb756fea8a9e66a1825b546e9dc392c72bec':
  Fix scanf %s in lsof.

Change-Id: I608ae2094649617308b45571df1b649724ec8ac3
2016-05-24 22:10:19 +00:00
Elliott Hughes
008efb756f Fix scanf %s in lsof.
Bug: http://b/28175237
Change-Id: Ief0ba299b09693ad9afc0e3d17a8f664c2fbb8c2
2016-04-19 14:57:09 -07:00
Daniel Rosenberg
ad431d2e2e Fix overflow in path building am: 6ea6c04 am: 9c44027
am: 4830087

* commit '4830087b3755b4c3498880369ccbe918aa136cd0':
  Fix overflow in path building

Change-Id: Ie2044be5b1c31b1fe128c90eda1c5df169dc0a3d
2016-04-14 19:34:33 +00:00
Daniel Rosenberg
4830087b37 Fix overflow in path building am: 6ea6c04
am: 9c44027

* commit '9c440272192d600c72659da5bfbe0c2e0a133cfe':
  Fix overflow in path building

Change-Id: Idb39dfc88adb854ffbc3bd40be0d28409248fc85
2016-04-14 19:31:17 +00:00
Daniel Rosenberg
9c44027219 Fix overflow in path building
am: 6ea6c04

* commit '6ea6c04ca695e0f0b6bcf3ea4529b9fd74fee8e4':
  Fix overflow in path building

Change-Id: Ia4388b694ddb12083e0d5a67a3a5f3f5bba2fb12
2016-04-14 19:27:58 +00:00
Daniel Rosenberg
6ea6c04ca6 Fix overflow in path building
An incorrect size was causing an unsigned value
to wrap, causing it to write past the end of
the buffer.

Bug: 28085658
Change-Id: Ie9625c729cca024d514ba2880ff97209d435a165
2016-04-13 00:11:52 +00:00
Josh Gao
69147994ba Merge "Don't demangle symbol names." into lmp-dev 2016-03-23 18:13:20 +00:00
Josh Gao
ba1f9d50bd Don\'t demangle symbol names. DO NOT MERGE am: a183654 -s ours
am: 908c511  -s ours

* commit '908c511e50c2ed5f69dcafbe82af75d5a090275f':
  Don't demangle symbol names. DO NOT MERGE
2016-03-23 00:53:20 +00:00
Josh Gao
908c511e50 Don\'t demangle symbol names. DO NOT MERGE
am: a183654  -s ours

* commit 'a183654b820447e6bd9980413e1f7ff5b89f875b':
  Don't demangle symbol names. DO NOT MERGE
2016-03-23 00:49:48 +00:00
Josh Gao
7c903fbacf Don't demangle symbol names.
Bug: http://b/27299236
Change-Id: I3a698c6d93e262fd78e743c1e6e946b054b9dcd1
2016-03-22 11:51:36 -07:00
Josh Gao
a183654b82 Don't demangle symbol names. DO NOT MERGE
Bug: http://b/27299236
Change-Id: I80524d8d5df9c5abea8c6db8ded965a5dfa3d607
2016-03-22 11:33:28 -07:00
Josh Gao
1eb6ec56c2 resolve merge conflicts of 557749e55b to klp-modular-dev DO NOT MERGE
am: bdfb431467  -s ours

* commit 'bdfb43146770f631c7097c378c0dbb8e6f8619a1':
  Don't create tombstone directory. DO NOT MERGE
2016-02-24 21:30:37 +00:00
Josh Gao
adc3bcb1d5 resolve merge conflicts of 9515c23e16 to klp-modular-dev
am: 91b48c3796  -s ours

* commit '91b48c37962238e3568d6660aeadfcd4d6eb4207':
  debuggerd: use O_NOFOLLOW|O_CLOEXEC for tombstones. DO NOT MERGE
2016-02-24 21:23:55 +00:00
Josh Gao
bdfb431467 resolve merge conflicts of 557749e55b to klp-modular-dev DO NOT MERGE
Change-Id: I51653e2ba8e7d1fa345206a4dd8b15f2e29429f2
2016-02-24 13:20:48 -08:00
Josh Gao
91b48c3796 resolve merge conflicts of 9515c23e16 to klp-modular-dev
Change-Id: I4b39875ce57bb1ea55898db3ffc004a491bbeaa4
2016-02-24 12:08:28 -08:00
Nick Kralevich
d61ebb0851 ensure /data/tombstones exists on all Android device. DO NOT MERGE am: 9c0ed66313
am: c61a896f20  -s ours

* commit 'c61a896f2006d76fd3d805ace2282b9590432a67':
  ensure /data/tombstones exists on all Android device. DO NOT MERGE
2016-02-24 19:18:41 +00:00