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

Unified Diff: src/trusted/validator_arm/validator.cc

Issue 11361222: ARM validator: fix sandbox escape with SP update at the end of the last bundle (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix comments from mseaborn. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/validator_arm/model.h ('k') | src/trusted/validator_arm/validator_small_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_arm/validator.cc
diff --git a/src/trusted/validator_arm/validator.cc b/src/trusted/validator_arm/validator.cc
index 2e19a8dd495bad2aa33607866880432055cf61ed..e2691706db241a0856de13ad925437b8347f39fe 100644
--- a/src/trusted/validator_arm/validator.cc
+++ b/src/trusted/validator_arm/validator.cc
@@ -721,6 +721,12 @@ bool SfiValidator::validate_fallthrough(const CodeSegment& segment,
pred.Copy(inst);
}
+ // Validate the last instruction, paired with a nop.
+ const Instruction nop(nacl_arm_dec::kNop);
+ DecodedInstruction one_past_end(segment.end_addr(), nop,
+ decode_state_.decode(nop));
+ complete_success &= apply_patterns(pred, one_past_end, critical, out);
+
return complete_success;
}
« no previous file with comments | « src/trusted/validator_arm/model.h ('k') | src/trusted/validator_arm/validator_small_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698