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

Fix use-after-free on Windows in escript #1826

Merged
merged 1 commit into from
Jun 11, 2018
Merged

Conversation

filmor
Copy link
Contributor

@filmor filmor commented May 24, 2018

Since commit 385b18d, the emulator path was not copied anymore before pushing it to the args vector (before it was done within the push_words function. Since on Windows free_env_val is not a NOP as it is on Unix systems, the string is freed and afterwards used, leading to strange errors like this:

 escript: Error executing 'àyI': 2

This is fixed by removing the free_env_val call.

Since commit 385b18d, the emulator path was not
copied anymore before pushing it to the args vector (before it was done within
the `push_words` function. Since on Windows `free_env_val` is not a NOP as it is
on Unix systems, the string is freed and afterwards used, leading to strange
errors like this:

     escript: Error executing 'àyI': 2

This is fixed by removing the `free_env_val` call.
@CLAassistant
Copy link

CLAassistant commented May 24, 2018

CLA assistant check
All committers have signed the CLA.

@rickard-green rickard-green added the team:VM Assigned to OTP team VM label May 28, 2018
@garazdawi garazdawi self-assigned this Jun 4, 2018
@garazdawi garazdawi added fix testing currently being tested, tag is used by OTP internal CI labels Jun 4, 2018
@garazdawi garazdawi merged commit 558f649 into erlang:master Jun 11, 2018
@garazdawi garazdawi removed the testing currently being tested, tag is used by OTP internal CI label Jun 11, 2018
@filmor filmor deleted the patch-1 branch June 11, 2018 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants