10.01.2015 Views

2014_EN_BrowserFuzzing_RosarioValotta

2014_EN_BrowserFuzzing_RosarioValotta

2014_EN_BrowserFuzzing_RosarioValotta

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FUZZing with XHR (2/2)<br />

Similar considerations also apply to<br />

web sockets network calls<br />

• A race condition may happen If your callback code relies on some object/function that has been GC’ed or is uninitialized at<br />

the moment of callback execution<br />

• E.g. Suppose your callback code executes some mutation operations on an object bound to xhr and you’re running multiple<br />

concurrent xhr calls<br />

Create<br />

xhr#1<br />

object<br />

Open<br />

xhr#1<br />

Send<br />

xhr#1<br />

Execute<br />

callback<br />

2<br />

GC<br />

Create<br />

xhr#2<br />

object<br />

Open<br />

xhr#2<br />

Send<br />

xhr#2<br />

Execute<br />

callback<br />

1<br />

3<br />

XHR<br />

methods/<br />

attribute<br />

tweaking<br />

• Some other race conditions may happen when xhr are recursive:<br />

Create<br />

xhr<br />

object<br />

Open xhr<br />

Send xhr<br />

Execute<br />

callback

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!