New issue
Advanced search Search tips

Issue 681438 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Security



Sign in to add a comment

crashed caused by a READ memory access on different addresses

Reported by cdsrc2...@gmail.com, Jan 16 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce the problem:
1. open asan flag and build chromium.
2. launch chromium with these flags.> ./chrome --js-flags="--allow-natives-syntax" --no-sandbox ./crash.html

(The testcase and crash log are in the attachment.)

What is the expected behavior?

What went wrong?
The browser crashed caused by a READ memory access on a unknown address.

"var a = a&a&a&a&a^a&a&a&a&a&a&a...."
Seems that different number of variable 'a' result in different addresses.Maybe you can control the address from reading a specific memory.

And some addresses just look like ascii strings.
==30281==ERROR: AddressSanitizer: SEGV on unknown address 0x72657473696e 

==7983==ERROR: AddressSanitizer: SEGV on unknown address 0x0074756f5f6b 

It looks like "var a = a&a&a&a&a^a&a&a&a&a&a&a...." lead to a memory reading, and the destination could controlled by the number of 'a'.

Did this work before? N/A 

Chrome version: 57.0.2961.0  Channel: n/a
OS Version: Ubuntu 14.04.5
Flash Version:
 
attachment.zip
6.4 KB Download

Comment 1 Deleted

Comment 2 by cdsrc2...@gmail.com, Jan 16 2017

After a quick debugging,we found the crash is caused by this asm code "cmp DWORD PTR [esi+0x3], ebx" in CALL_GENERATED_CODE (v8/src/execution.cc -> Invoke -> CALL_GENERATED_CODE).

(gdb) i r
...
ebx          0x32489431
...
esi          0x0
...

It seems that esi register can be controlled by the compiled js code.
Components: Blink>JavaScript

Comment 4 by aarya@google.com, Jan 17 2017

Cc: ishell@chromium.org machenb...@chromium.org
Owner: rossberg@chromium.org
Status: Assigned (was: Unconfirmed)
Assigning to v8 sheriff to triage.
Project Member

Comment 5 by ClusterFuzz, Jan 17 2017

ClusterFuzz is analyzing your testcase. Developers can follow the progress at https://cluster-fuzz.appspot.com/testcase?key=6250161035804672
Owner: ahaas@chromium.org
Reassigning to Stability Sheriff, since this is not a ClusterFuzz issue.

Comment 7 by ahaas@chromium.org, Jan 18 2017

I can reproduce this issue on version 57.0.2961.0, but it seems to have been fixed in version 57.0.2986.0.

Comment 8 by ahaas@chromium.org, Jan 18 2017

Cc: jkummerow@chromium.org

Comment 9 by ahaas@chromium.org, Jan 18 2017

Cc: ahaas@chromium.org
Owner: mythria@chromium.org
mythria, it seems like your CL (https://codereview.chromium.org/2594543003) fixed this issue. Is your CL an actual fix, or does it only hide the real cause of this issue?
Yes, that cl could be the actual fix. 

In the testcase %BaselineFunctionOnNextCall is called even before the function was compiled. Before my cl landed, BaselineFunctionOnNextCall would expect that type feedback vector is initialized. Since the function was never compiled, it is never initialized and hence it crashes when accessing type feedback vector. 

My cl fixes this by changing  BaselineFunctionOnNextCall to check if a function is already compiled. If it is not compiled it will request for a compilation before baselining the function.

Comment 11 by ahaas@chromium.org, Jan 19 2017

Status: Fixed (was: Assigned)
I change the status to fixed in that case.
Project Member

Comment 12 by sheriffbot@chromium.org, Jan 20 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: Security_Impact-None
Assuming nothing needs to be done here with merges. 
Project Member

Comment 14 by sheriffbot@chromium.org, Apr 28 2017

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: reward-topanel
Labels: -reward-topanel reward-0

Sign in to add a comment