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

Side by Side Diff: src/processor/exploitability_linux.h

Issue 1291603002: Add check for executable stack/heap when rating Linux exploitability. (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
« no previous file with comments | « src/google_breakpad/processor/minidump.h ('k') | src/processor/exploitability_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 Google Inc. 1 // Copyright (c) 2013 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 namespace google_breakpad { 44 namespace google_breakpad {
45 45
46 class ExploitabilityLinux : public Exploitability { 46 class ExploitabilityLinux : public Exploitability {
47 public: 47 public:
48 ExploitabilityLinux(Minidump *dump, 48 ExploitabilityLinux(Minidump *dump,
49 ProcessState *process_state); 49 ProcessState *process_state);
50 50
51 virtual ExploitabilityRating CheckPlatformExploitability(); 51 virtual ExploitabilityRating CheckPlatformExploitability();
52 52
53 private: 53 private:
54 // This method takes the address of the instruction pointer and returns 54 // Takes the address of the instruction pointer and returns
55 // whether the instruction pointer lies in a valid instruction region. 55 // whether the instruction pointer lies in a valid instruction region.
56 bool InstructionPointerInCode(uint64_t instruction_ptr); 56 bool InstructionPointerInCode(uint64_t instruction_ptr);
57 57
58 // This method checks the exception that triggered the creation of the 58 // Checks the exception that triggered the creation of the
59 // minidump and reports whether the exception suggests no exploitability. 59 // minidump and reports whether the exception suggests no exploitability.
60 bool BenignCrashTrigger(const MDRawExceptionStream *raw_exception_stream); 60 bool BenignCrashTrigger(const MDRawExceptionStream *raw_exception_stream);
61 61
62 // Checks if the stack pointer points to a memory mapping that is not 62 // Checks if the stack pointer points to a memory mapping that is not
63 // labelled as the stack. 63 // labelled as the stack.
64 bool StackPointerOffStack(uint64_t stack_ptr); 64 bool StackPointerOffStack(uint64_t stack_ptr);
65
66 // Checks if the stack or heap are marked executable according
67 // to the memory mappings.
68 bool ExecutableStackOrHeap();
65 }; 69 };
66 70
67 } // namespace google_breakpad 71 } // namespace google_breakpad
68 72
69 #endif // GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_LINUX_H_ 73 #endif // GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_LINUX_H_
OLDNEW
« no previous file with comments | « src/google_breakpad/processor/minidump.h ('k') | src/processor/exploitability_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698