Add check for Linux minidump ending on bad write for exploitability rating.

If a crash occurred as a result to a write to unwritable memory, it is reason
to suggest exploitability. The processor checks for a bad write by
disassembling the command that caused the crash by piping the raw bytes near
the instruction pointer through objdump. This allows the processor to see if
the instruction that caused the crash is a write to memory and where the
target of the address is located.

R=ivanpe@chromium.org

Review URL: https://codereview.chromium.org/1273823004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1497 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
Liu.andrew.x@gmail.com
2015-08-21 16:22:19 +00:00
parent ee2d76fe90
commit f073540795
13 changed files with 584 additions and 8 deletions

View File

@@ -51,7 +51,8 @@ MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier,
SourceLineResolverInterface *resolver)
: frame_symbolizer_(new StackFrameSymbolizer(supplier, resolver)),
own_frame_symbolizer_(true),
enable_exploitability_(false) {
enable_exploitability_(false),
enable_objdump_(false) {
}
MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier,
@@ -59,14 +60,16 @@ MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier,
bool enable_exploitability)
: frame_symbolizer_(new StackFrameSymbolizer(supplier, resolver)),
own_frame_symbolizer_(true),
enable_exploitability_(enable_exploitability) {
enable_exploitability_(enable_exploitability),
enable_objdump_(false) {
}
MinidumpProcessor::MinidumpProcessor(StackFrameSymbolizer *frame_symbolizer,
bool enable_exploitability)
: frame_symbolizer_(frame_symbolizer),
own_frame_symbolizer_(false),
enable_exploitability_(enable_exploitability) {
enable_exploitability_(enable_exploitability),
enable_objdump_(false) {
assert(frame_symbolizer_);
}
@@ -289,7 +292,9 @@ ProcessResult MinidumpProcessor::Process(
// rating.
if (enable_exploitability_) {
scoped_ptr<Exploitability> exploitability(
Exploitability::ExploitabilityForPlatform(dump, process_state));
Exploitability::ExploitabilityForPlatform(dump,
process_state,
enable_objdump_));
// The engine will be null if the platform is not supported
if (exploitability != NULL) {
process_state->exploitability_ = exploitability->CheckExploitability();