12 Commits

Author SHA1 Message Date
Joshua Peraza
7b5a55c3b1 Move whitelist ownership to ProcessSnapshotSanitized
Change-Id: Ie57117229520e52aeff83d0cbf95057690894e5b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1773772
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2019-08-29 21:30:02 +00:00
Vlad Tsyrklevich
5a4c2f2b83 Plumb in support for ProcessMemorySanitized
A previous change added a ProcessMemorySanitized class, in this change
plumb support for ProcessMemorySanitized into ProcessSnapshotSanitized.
This involves reading whitelisted regions using the a new field in the
SanitizationInformation struct and returning an initialized
ProcessMemorySanitized object from ProcessSnapshotSanitized::Memory().

Bug: crashpad:263, chromium:973167
Change-Id: I121c5a584a1704ad043757c113099978a9ec2f4e
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1754737
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
2019-08-15 20:06:14 +00:00
Vlad Tsyrklevich
5a0e18e417 Refactor 'whitelist' -> 'annotations whitelist'
In preparation for an upcoming change that will introduce a second
whitelist (for memory ranges), rename variables/functions to explicitly
reference the annotations whitelist.

Bug: chromium:973167
Change-Id: I1bf232e370990571230a247f9d9022d56ba4fedf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1752361
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2019-08-14 23:22:43 +00:00
Eric Astor
48675b4bd3 Remove pid_t in platform-independent code.
Change-Id: Ia58e07bf85a09cd7e63784220800431ad1366584
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1565273
Commit-Queue: Eric Astor <epastor@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-04-24 16:02:00 +00:00
Casey Dahlin
5f77cf41b6 Add CodeViewRecordBuildId
Until now we've been stuffing ELF debug symbol link information into a
CodeViewPDB70. This has reached the limits of its usefulness. We now add
a CodeViewRecord that can contain a proper ELF build ID.

Change-Id: Ice52cb2a958a1b9031943f280d9054da02d2f17d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1574107
Commit-Queue: Casey Dahlin <sadmac@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-04-22 23:16:22 +00:00
Vlad Tsyrklevich
fe05eb7c99 Update ASan disabled tests to exclude all platforms
Use-after-return detection happens to currently be enabled on Linux and
Android but is not exclusive to those platforms. Disable tests
incompatible with ASan UAR detection on all platforms.

Bug: 915245
Change-Id: I40447c126dac9dc7d0f72e400136afb8c292324d
Reviewed-on: https://chromium-review.googlesource.com/c/1414614
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-01-16 18:56:06 +00:00
Mark Mentovai
cc166d71f4 Use base::size where appropriate, and ArraySize elsewhere
This is a follow-up to c8a016b99d97, following the post-landing
discussion at
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1393921/5#message-2058541d8c4505d20a990ab7734cd758e437a5f7

base::size, and std::size that will eventually replace it when C++17 is
assured, does not allow the size of non-static data members to be taken
in constant expression context. The remaining uses of ArraySize are in:

minidump/minidump_exception_writer.cc (×1)
minidump/minidump_system_info_writer.cc (×2, also uses base::size)
snapshot/cpu_context.cc (×4, also uses base::size)
util/misc/arraysize_test.cc (×10, of course)

The first of these occurs when initializing a constexpr variable. All
others are in expressions used with static_assert.

Includes:
Update mini_chromium to 737433ebade4d446643c6c07daae02a67e8deccao

f701716d9546 Add Windows ARM64 build target to mini_chromium
87a95a3d6ac2 Remove the arraysize macro
1f7255ead1f7 Placate MSVC in areas of base::size usage
737433ebade4 Add cast

Bug: chromium:837308
Change-Id: I6a5162654461b1bdd9b7b6864d0d71a734bcde19
Reviewed-on: https://chromium-review.googlesource.com/c/1396108
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-01-04 22:42:57 +00:00
Avi Drissman
c8a016b99d Remove base's arraysize from Crashpad.
BUG=837308
R=mark@chromium.org

Change-Id: Ibecbfc7bc2d61ee54bc1114e4b20978adbc77db2
Reviewed-on: https://chromium-review.googlesource.com/c/1393921
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
2019-01-03 19:44:15 +00:00
Vlad Tsyrklevich
1c4c1277e8 Add a ProcessSnapshot::Memory method
Add a method to the ProcessSnapshot to expose a ProcessMemory object to
allow reading memory directly from the underlying process.

CQ-DEPEND=CL:1278830

BUG=crashpad:262

Change-Id: Ied2a5510a9b051c7ac8c41cdd060e8daa531086e
Reviewed-on: https://chromium-review.googlesource.com/c/1315428
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-11-14 19:13:39 +00:00
Joshua Peraza
0909bee2e2 linux: Fix broken tests with address sanitizer
These fixes are mostly related to address sanitizer causing stack
variables to not be stored on the call-stack. Attempting to disable
safe-stack has no effect.

Change-Id: Ib5718bfb74ce91dee560b397ccdbf68d78e4ec6a
Reviewed-on: https://chromium-review.googlesource.com/1140507
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-07-24 19:52:58 +00:00
Joshua Peraza
d1e6a2130d android/linux: add a client interface to control sanitization
Sanitization is controlled by a SanitizationInformation struct to be
read from the client's memory. The address of this struct is either
passed in a ClientInformation when the client requests a crash dump,
or as a flag to the handler --sanitization_information.

Bug: crashpad:30
Change-Id: I2744f8fb85b4fea7362b2b88faa4bef1da74e36b
Reviewed-on: https://chromium-review.googlesource.com/1083143
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-06-12 15:37:11 +00:00
Joshua Peraza
a42b5269b4 Add ProcessSnapshotSanitized
A ProcessSnapshotSanitized enables filtering possibly sensitive
information from a snapshot.

WebView has different privacy constraints than Chrome and needs to
avoid collecting data in annotations or from stack memory that may
contain PII. This CL enables:

1. Filtering annotations by name using a whitelist.
2. Filtering for crashes which reference a particular module.
3. Redacting non-essential information from stack memory.

This CL does not provide a client interface to enable sanitization.

Bug: crashpad:30
Change-Id: I8944c70fdcca6d6d4b7955d983320909bf871254
Reviewed-on: https://chromium-review.googlesource.com/1070472
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-06-11 16:46:29 +00:00