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

Issue 11361222: ARM validator: fix sandbox escape with SP update at the end of the last bundle (Closed)

Created:
8 years, 1 month ago by JF
Modified:
8 years, 1 month ago
Reviewers:
Mark Seaborn, kschimpf, Karl
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

ARM validator: fix sandbox escape with SP update at the end of the last bundle Updating the SP as the last instruction in the last bundle is currently accepted by the validator and shouldn't: SP must be followed by a mask. Test SP update mask; add NOP constant. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3137 R=mseaborn@chromium.org,kschimpf@chromium.org TEST=./scons run_arm_validator_small_tests Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=10238

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fix comments from mseaborn. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -8 lines) Patch
M src/include/arm_sandbox.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M src/trusted/validator_arm/model.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/trusted/validator_arm/validator.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/trusted/validator_arm/validator_small_tests.cc View 1 6 chunks +44 lines, -8 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
JF
8 years, 1 month ago (2012-11-12 18:08:40 UTC) #1
Karl
lgtm
8 years, 1 month ago (2012-11-12 21:55:44 UTC) #2
JF
The failures seem to all be flaky timeouts.
8 years, 1 month ago (2012-11-12 23:09:03 UTC) #3
Mark Seaborn
LGTM -- though I didn't check the hex encodings. https://codereview.chromium.org/11361222/diff/1/src/include/arm_sandbox.h File src/include/arm_sandbox.h (right): https://codereview.chromium.org/11361222/diff/1/src/include/arm_sandbox.h#newcode71 src/include/arm_sandbox.h:71: ...
8 years, 1 month ago (2012-11-13 00:30:18 UTC) #4
JF
8 years, 1 month ago (2012-11-13 00:49:42 UTC) #5
https://codereview.chromium.org/11361222/diff/1/src/include/arm_sandbox.h
File src/include/arm_sandbox.h (right):

https://codereview.chromium.org/11361222/diff/1/src/include/arm_sandbox.h#new...
src/include/arm_sandbox.h:71: * NOP.
Comment added.

https://codereview.chromium.org/11361222/diff/1/src/trusted/validator_arm/mod...
File src/trusted/validator_arm/model.h (right):

https://codereview.chromium.org/11361222/diff/1/src/trusted/validator_arm/mod...
src/trusted/validator_arm/model.h:290: static const uint32_t kNop =
NACL_INSTR_ARM_NOP;
It's following the pattern above of having validator names for the macros.

https://codereview.chromium.org/11361222/diff/1/src/trusted/validator_arm/val...
File src/trusted/validator_arm/validator_small_tests.cc (right):

https://codereview.chromium.org/11361222/diff/1/src/trusted/validator_arm/val...
src/trusted/validator_arm/validator_small_tests.cc:954: code[i + 1] =
0xE3CDD2FF;  // BIC SP, SP, #0xf000000f
There's a bunch of other code below that does the same, I'd rather fix this
issue in one CL instead of diverging for this one case: it'll make the fix
easier and prevent us from forgetting this one instance if the fix isn't what we
decide to do today.

https://codereview.chromium.org/11361222/diff/1/src/trusted/validator_arm/val...
src/trusted/validator_arm/validator_small_tests.cc:956:
validation_should_fail(&code[0], code.size(), kDefaultBaseAddr,
Done.

Powered by Google App Engine
This is Rietveld 408576698