forked from googleprojectzero/winafl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create processes in a job object to enforce memory limitation
- Loading branch information
Axel '0vercl0k' Souchet
committed
Aug 22, 2017
1 parent
47dc7e9
commit c95ea5c
Showing
6 changed files
with
105 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
/* | ||
WinAFL - A simple test binary that crashes on certain inputs: | ||
- 'test1' with a normal write access violation at NULL | ||
- 'test2' with a /GS stack cookie violation | ||
- 'test3' with a hang | ||
WinAFL - A simple test binary that exercises various behaviors | ||
depending on inputs: | ||
- 'test1' crashes with a normal write access violation at NULL | ||
- 'test2' crashes with a /GS stack cookie violation | ||
- 'test3' triggers a hang | ||
- 'test4' triggers an exception that is caught and handled | ||
- 'test5' triggers an OutputDebugString | ||
- 'test6' triggers an allocation of 120MB (and a crash if the | ||
allocation fails) | ||
------------------------------------------------------------- | ||
Written by Axel "0vercl0k" Souchet <[email protected]> | ||
|
@@ -96,6 +101,12 @@ int test(int argc, char **argv) { | |
else if (c == '5') { | ||
OutputDebugString(TEXT("hello!")); | ||
} | ||
else if (c == '6') { | ||
printf("allocating 120MB\n"); | ||
char *buffer = (char*)malloc((1024 * 1024) * 120); | ||
*buffer = 0; | ||
free(buffer); | ||
} | ||
else { | ||
printf("Error 5\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters