Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CVE-2018-0818] Add ProcessContexts for OOP JIT #4427

Merged
merged 2 commits into from Dec 15, 2017

Conversation

MikeHolman
Copy link
Contributor

@MikeHolman MikeHolman commented Dec 14, 2017

Adds early handshake to pass in runtime process addresses, with the assurance that this handshake is only done once per runtime process.

OS:14980597

ServerContextManager::RegisterThreadContext(contextInfo);
}
catch (Js::OutOfMemoryException)
{
CloseHandle(targetHandle);
if (!contextInfo)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contextInfo [](start = 13, length = 11)

if there's OOM after HeapNew, we should free contextInfo
if it's not possible to OOM after HeapNew, the we don't need the check here

ProcessContexts.Add(pid, context);
}
catch (Js::OutOfMemoryException)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to free context if OOM in ProcessContexts.Add()

{
ProcessContext* context = iter.CurrentValue();
// We can delete a ProcessContext if no ThreadContexts refer to it and the process is terminated
if (!context->HasRef() && WaitForSingleObject(context->processHandle, 0) != WAIT_TIMEOUT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WAIT_TIMEOUT [](start = 84, length = 12)

use WAIT_OBJECT_0 instead? other than time out, wait function can have other failure

Copy link
Contributor

@leirocks leirocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@chakrabot chakrabot merged commit a0fd3cd into chakra-core:release/1.8 Dec 15, 2017
chakrabot pushed a commit that referenced this pull request Dec 15, 2017
Merge pull request #4427 from MikeHolman:oopprocessinit

Adds early handshake to pass in runtime process addresses, with the assurance that this handshake is only done once per runtime process.

OS:14980597
chakrabot pushed a commit that referenced this pull request Dec 15, 2017
Merge pull request #4427 from MikeHolman:oopprocessinit

Adds early handshake to pass in runtime process addresses, with the assurance that this handshake is only done once per runtime process.

OS:14980597
@MikeHolman MikeHolman changed the title Add ProcessContexts for OOP JIT [CVE-2018-0818] Add ProcessContexts for OOP JIT Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants