Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(669)

Side by Side Diff: src/processor/exploitability.cc

Issue 1273823004: Add check for Linux minidump ending on bad write for exploitability rating. (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 Google Inc. 1 // Copyright (c) 2010 Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 : dump_(dump), 51 : dump_(dump),
52 process_state_(process_state) {} 52 process_state_(process_state) {}
53 53
54 ExploitabilityRating Exploitability::CheckExploitability() { 54 ExploitabilityRating Exploitability::CheckExploitability() {
55 return CheckPlatformExploitability(); 55 return CheckPlatformExploitability();
56 } 56 }
57 57
58 Exploitability *Exploitability::ExploitabilityForPlatform( 58 Exploitability *Exploitability::ExploitabilityForPlatform(
59 Minidump *dump, 59 Minidump *dump,
60 ProcessState *process_state) { 60 ProcessState *process_state) {
61 return ExploitabilityForPlatform(dump, process_state, false);
62 }
63
64 Exploitability *Exploitability::ExploitabilityForPlatform(
65 Minidump *dump,
66 ProcessState *process_state,
67 bool enable_objdump) {
61 Exploitability *platform_exploitability = NULL; 68 Exploitability *platform_exploitability = NULL;
62 MinidumpSystemInfo *minidump_system_info = dump->GetSystemInfo(); 69 MinidumpSystemInfo *minidump_system_info = dump->GetSystemInfo();
63 if (!minidump_system_info) 70 if (!minidump_system_info)
64 return NULL; 71 return NULL;
65 72
66 const MDRawSystemInfo *raw_system_info = 73 const MDRawSystemInfo *raw_system_info =
67 minidump_system_info->system_info(); 74 minidump_system_info->system_info();
68 if (!raw_system_info) 75 if (!raw_system_info)
69 return NULL; 76 return NULL;
70 77
71 switch (raw_system_info->platform_id) { 78 switch (raw_system_info->platform_id) {
72 case MD_OS_WIN32_NT: 79 case MD_OS_WIN32_NT:
73 case MD_OS_WIN32_WINDOWS: { 80 case MD_OS_WIN32_WINDOWS: {
74 platform_exploitability = new ExploitabilityWin(dump, process_state); 81 platform_exploitability = new ExploitabilityWin(dump, process_state);
75 break; 82 break;
76 } 83 }
77 case MD_OS_LINUX: { 84 case MD_OS_LINUX: {
78 platform_exploitability = new ExploitabilityLinux(dump, process_state); 85 platform_exploitability = new ExploitabilityLinux(dump,
86 process_state,
87 enable_objdump);
79 break; 88 break;
80 } 89 }
81 case MD_OS_MAC_OS_X: 90 case MD_OS_MAC_OS_X:
82 case MD_OS_IOS: 91 case MD_OS_IOS:
83 case MD_OS_UNIX: 92 case MD_OS_UNIX:
84 case MD_OS_SOLARIS: 93 case MD_OS_SOLARIS:
85 case MD_OS_ANDROID: 94 case MD_OS_ANDROID:
86 case MD_OS_PS3: 95 case MD_OS_PS3:
87 default: { 96 default: {
88 platform_exploitability = NULL; 97 platform_exploitability = NULL;
(...skipping 12 matching lines...) Expand all
101 uint8_t byte = (address >> (8*i)) & 0xff; 110 uint8_t byte = (address >> (8*i)) & 0xff;
102 if ((byte >= ' ' && byte <= '~') || byte == 0) 111 if ((byte >= ' ' && byte <= '~') || byte == 0)
103 continue; 112 continue;
104 return false; 113 return false;
105 } 114 }
106 return true; 115 return true;
107 } 116 }
108 117
109 } // namespace google_breakpad 118 } // namespace google_breakpad
110 119
OLDNEW
« no previous file with comments | « src/google_breakpad/processor/minidump_processor.h ('k') | src/processor/exploitability_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698