New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 3 users
Status: Fixed
Owner:
Email to this user bounced
Closed: Nov 2014
Cc:



Sign in to add a comment
Adobe Flash incorrect jit optimization with op_setglobalslot
Project Member Reported by ianbeer@google.com, Sep 23 2014 Back to list
See previous similar bugs for more details.

op_setglobalslot is marked as not throwing an exception in opcodes.tbl, yet looking at the verifier:

opcode.tbl:

//              opCount  throw  stack  internal  name                   hex      
ABC_OP(         0,       0,     -1,    0,        pushscope)             // 0x30  

            case OP_setglobalslot:
            {
                // FIXME need test case
                const ScopeTypeChain* scope = info->declaringScope();
                if (!state->scopeDepth && !scope->size)
                    verifyFailed(kNoGlobalScopeError);
                Traits *globalTraits = scope->size > 0 ? scope->getScopeTraitsAt(0) : state->scopeValue(0).traits;
                checkStack(1,0);
                checkEarlySlotBinding(globalTraits);
                Traits* slotTraits = checkSlot(globalTraits, imm30-1);
                emitCoerce(slotTraits, state->sp());              <-- (a)
                coder->writeOp1(state, pc, opcode, imm30-1, slotTraits);
                state->pop();
                break;
            }

At point (a) we can invoke a callback during the coercion if the particular slot of the global object has an early-bound trait of a type which can invoke a callback and we provide an object which implements such a callback (for example, the global object has a slot with an early-bound String and we provide an object atom which implements toString, as the attached PoC does.)

If that callback throws an exception then this will invoke a control-flow path not seen by the verifier which can be abused to achieve code execution.

PoC attached for avmshell.
 
setglobalslot_crash_avmshell.abc
795 bytes Download
Project Member Comment 1 by ianbeer@google.com, Sep 23 2014
Labels: ReportedOn-2014-September-23
Project Member Comment 2 by ianbeer@google.com, Sep 23 2014
Labels: -ReportedOn-2014-September-23 ReportedOn-2014-Sep-23
Project Member Comment 3 by ianbeer@google.com, Sep 24 2014
Labels: Id-3051
Comment 4 by cevans@google.com, Nov 8 2014
Labels: CVE-2014-0584
Comment 5 by cevans@google.com, Nov 20 2014
Labels: -Restrict-View-Commit Fixed-2014-Nov-11
Status: Fixed
http://helpx.adobe.com/security/products/flash-player/apsb14-24.html
Sign in to add a comment