winafl icon indicating copy to clipboard operation
winafl copied to clipboard

Disable out of memory notices / message boxes

Open tostercx opened this issue 5 years ago • 3 comments

Hello, I'm fuzzing a leaky program and decided to set the memory limit (afl-fuzz -m xxx). Each time the child process uses up it's memory limit I'm getting these Out of memory. Program aborted. notices which happens several times a minute. Really annoying.

Is there a way to disable these? Are these thrown by winafl or by DynamoRIO? I've read through most of winafl's and DynamoRIO's usage docs but couldn't find any related settings.

Running winafl @ current master with DynamoRIO 7.91.18271-0.

tostercx avatar Jan 25 '20 09:01 tostercx

Hi, just as a raw thought. You probably can leverage -fuzz_iterations option to control the amount of leaked data before the process will be restarted.

expend20 avatar Jan 25 '20 10:01 expend20

@expend20 Seems to be working, thank you! :)

tostercx avatar Jan 25 '20 11:01 tostercx

Hmm. Issue re-appeared. Seems like a part of my input file format is responsible for allocating arbitrary amounts of memory which is never cleaned up by the program and the fuzzer set it to something really high, still investigating tho.

Nothing critical but incredibly annoying if I need to do anything on the machine :/

edit

I think I've found it! Not sure how I missed it the first time. http://dynamorio.org/docs/using.html#op_msgbox_mask Seems like setting -msgbox_mask 0x0 or -ops "-msgbox_mask 0x0" should solve it. The only problem is I can only get it to work if I pass it before the -c option to drrun or it throws an error. And the instrumentation options seem to be inserted after -c in winafl: https://github.com/googleprojectzero/winafl/blob/2bc8c45fa552acc4f6b029c3295f1d7ca2498819/afl-fuzz.c#L2298-L2300

edit

Ohh, so "instrumentation options" == "winafl.dll options", not "DR options" - not obvious from the docs. And unless I missed something there's no way to set DR options without patching the source. Got my copy working but there should really be a way to set the DR options tho.

tostercx avatar Jan 27 '20 16:01 tostercx