Commit Graph

7258 Commits

Author SHA1 Message Date
Josh Gao 1ceca95f8e adb: actually fix the windows build. am: 58eda35ace
am: bbd6d7b3e7

Change-Id: I0d2553e19b3e96e9af4e0aa3493a4b8b36e55431
2016-11-17 21:51:26 +00:00
Josh Gao bbd6d7b3e7 adb: actually fix the windows build.
am: 58eda35ace

Change-Id: If917d578acb8a0b289369f7b5b1aca7deff4a4b9
2016-11-17 21:43:26 +00:00
Josh Gao 58eda35ace adb: actually fix the windows build.
Bug: http://b/32292581
Change-Id: I714e1f47c2c2e89027989d485cb28891b905f931
2016-11-15 13:05:11 -08:00
Josh Gao 85b6b13175 Merge "adb: turn darwin/windows builds back on, hopefully fix them." into klp-dev am: b19b5fe08c
am: 50fb0a1f11

Change-Id: Id68902bdc816f3885f97e6ea1226ed538e9df506
2016-11-14 22:18:52 +00:00
Josh Gao ddf0740c08 adb: turn darwin/windows builds back on, hopefully fix them. am: a9c0ac0c46
am: e4e1ed0e5b

Change-Id: I36f3c0d34a64e7983a95607143e863d332e5324b
2016-11-14 22:18:39 +00:00
Josh Gao 50fb0a1f11 Merge "adb: turn darwin/windows builds back on, hopefully fix them." into klp-dev
am: b19b5fe08c

Change-Id: If4c9afd09de879519e4fd38d3b792af211c44d29
2016-11-14 22:10:40 +00:00
Josh Gao e4e1ed0e5b adb: turn darwin/windows builds back on, hopefully fix them.
am: a9c0ac0c46

Change-Id: Icc58ac512edaaa0a47dda375147a832214107556
2016-11-14 22:10:39 +00:00
Josh Gao b19b5fe08c Merge "adb: turn darwin/windows builds back on, hopefully fix them." into klp-dev 2016-11-14 21:53:50 +00:00
Josh Gao a9c0ac0c46 adb: turn darwin/windows builds back on, hopefully fix them.
Bug: http://b/32292581
Change-Id: Ie5182165a122f7aed4a5728906f005cc7d54ddd1
2016-11-14 13:06:44 -08:00
Tianjie Xu ccfb7619f4 DO NOT MERGE:Add missing SOCK_CLOEXEC flag when opening socket am: a7ba9ff00b
am: 4f3df4e131

Change-Id: I067fb2db1e83a0af84f248774b78c155f5e89c96
2016-11-08 23:03:21 +00:00
Tianjie Xu 4f3df4e131 DO NOT MERGE:Add missing SOCK_CLOEXEC flag when opening socket
am: a7ba9ff00b

Change-Id: I827b249f556667747b1978ec8500185a54094030
2016-11-08 22:57:51 +00:00
Tianjie Xu a7ba9ff00b DO NOT MERGE:Add missing SOCK_CLOEXEC flag when opening socket
Go through the code that opens socket in marshmallow, and backport the
SOCK_CLOEXEC usage for AF_NETLINK. In kitkat, SOCK_CLOEXEC is not defined;
therefore I used O_CLOEXEC instead.
Bug: 31242981
Test: mma

Change-Id: I792024c16b84ba3d6666d3df6002c89e0028f4b0
2016-11-03 06:08:55 +00:00
Narayan Kamath a47780b998 libzipfile: add additional validity checks. am: a1ec23634a
am: c307830f5d

Change-Id: I5d856cec4528541ff5416456cbe1338c78a09699
2016-09-21 08:26:10 +00:00
Narayan Kamath c307830f5d libzipfile: add additional validity checks.
am: a1ec23634a

Change-Id: I290e611776bd58b47266a2cb9371a832bdc0744e
2016-09-21 08:23:39 +00:00
Narayan Kamath a1ec23634a libzipfile: add additional validity checks.
- Make sure the start and end of the data for a given entry are
  within the allocated buffer.
- Make sure all central directory entries start and end within the
  central directory buffer.
- Reject zip file entries that have no filenames.

bug: 30916186
test: test_zipfile with known bad zip files.
Change-Id: Ibf3f6469e60c85ec1608f5ce613d40867d2d09b7
2016-09-13 16:08:38 +01:00
Mark Salyzyn 85b0dd64f1 liblog: add __android_log_close() am: c68706fe49
am: edc5507f76

Change-Id: Ia2acfa02bd8f7e35d83791ea8242139a7ac34435
2016-09-07 18:43:14 +00:00
Mark Salyzyn edc5507f76 liblog: add __android_log_close()
am: c68706fe49

Change-Id: I0f63dcafaa4b6bf40dddb3674c3768b0cb158fe4
2016-09-07 18:40:15 +00:00
Mark Salyzyn c68706fe49 liblog: add __android_log_close()
Bug: 30963384

(cherry picked from commit df7a4c6bae)

Change-Id: Iff0634a66c4b690331f5da66f7a6c2364b64480e
2016-09-05 15:44:22 +01: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 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 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 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 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 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 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 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 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 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 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 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 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 c61a896f20 ensure /data/tombstones exists on all Android device. DO NOT MERGE
am: 9c0ed66313

* commit '9c0ed663138138bb40396bfd350f137e5057277b':
  ensure /data/tombstones exists on all Android device. DO NOT MERGE
2016-02-24 19:11:38 +00:00