Heap-buffer-overflow in v8::internal::Simulator::LoadStoreHelper |
||||||||
Issue descriptionDetailed report: https://cluster-fuzz.appspot.com/testcase?key=5757631041372160 Fuzzer: decoder_langfuzz Job Type: linux_asan_d8_v8_arm64_dbg Platform Id: linux Crash Type: Heap-buffer-overflow WRITE 8 Crash Address: 0x7fde134fc7f8 Crash State: v8::internal::Simulator::LoadStoreHelper v8::internal::Simulator::ExecuteInstruction v8::internal::Simulator::CheckPCSComplianceAndRun Recommended Security Severity: High Minimized Testcase (10.77 Kb): https://cluster-fuzz.appspot.com/download/AMIfv94mCHZYyG1LLjsQOmN-5M2u_XVzRJ-q3ATRhOJutS-z_iH3hrnqv2VjBV_O-j3-c4rfJejVW3hQoJtmbG51QWs9eCaNwGxa8X6QnAjkZG1PjBSxoG21_uFRMtEd8XnivgqzCwpdOUaFNLjPcnOJOCCM-55bMQ Filer: mstarzinger See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
,
May 9 2016
,
May 9 2016
,
May 17 2016
mstarzinger: Would you mind taking another look or closing if this isn't actionable? (Need an owner since it's in the security queue)
,
May 23 2016
I managed to reproduce it, looking...
,
May 23 2016
What is happening here is when we are near the stack limit we call a function with so many arguments that it "overflows" the allocated JS stack buffer including the stack protection area before we manage to do a call (which will do a next stack limit check). This is a simulator-only issue because on the real hardware where we use normal stack as a JS stack we will trigger the real stack overflow during attempt to push a next argument on the stack. I think we can remove the security labels and decrease the priority. In order to make V8 throw a StackOverflowError we could emit additional stack overflow checks after every Nth argument pushed on the stack.
,
May 23 2016
Even simplier, if the number of arguments is bigger that some limit we can generate a stack overflow check before pushing all the arguments (we do similar check if the number of locals is too big). Or we can check the worst case: if the maximum length of expression stack + current stack state will overflow. I'm not sure that we calculate the expression stack limit though.
,
May 23 2016
Re comment #7: As discussed offline, AFAIK we don't know the maximum operand stack size ahead of time. But the full code generator keeps track of the current operand stack size (i.e. FullCodeGenerator::OperandStackDepthIncrement and Decrement), so at least we know the depth while generating code.
,
May 24 2016
Removing security labels since this is a simulator only issue as per c#6.
,
Jun 21 2016
Issue 620251 has been merged into this issue.
,
Oct 18 2016
Issue 656816 has been merged into this issue.
,
Nov 1 2016
ClusterFuzz testcase is verified as fixed, closing issue. If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.
,
Feb 2 2018
Issue 801790 has been merged into this issue. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by mstarzinger@chromium.org
, May 9 2016