-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This commit adds support for the `write` syscall to symbolic execution and rarity simulation. It also changes how invalid addresses passed to `read` and `write` are handled by reporting them as bugs now.
- Loading branch information
1 parent
6e73284
commit d2fffde
Showing
9 changed files
with
256 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "monster-rs" | ||
description = "Monster is a symbolic execution engine for 64-bit RISC-U code" | ||
authors = ["Alexander Lackner <[email protected]>", "Alexander Linz <[email protected]>", "Christian Mösl <[email protected]>", "Fabian Nedoluha <[email protected]>"] | ||
authors = ["Alexander Lackner <[email protected]>", "Alexander Linz <[email protected]>", "Christian Mösl <[email protected]>", "Fabian Nedoluha <[email protected]>", "Michael Starzinger <[email protected]>"] | ||
documentation = "https://docs.rs/monster" | ||
repository = "https://github.com/cksystemsgroup/monster" | ||
homepage = "https://cksystemsgroup.github.io/monster" | ||
|
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,17 @@ | ||
uint64_t main() { | ||
uint64_t a; | ||
uint64_t* x; | ||
|
||
a = 16; | ||
x = malloc(8); | ||
|
||
*x = 0; | ||
|
||
while (a) { | ||
read(0, x, 8); | ||
write(1, x, 8); | ||
a = a - 1; | ||
} | ||
|
||
return *x == 23; | ||
} |
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,12 @@ | ||
uint64_t main() { | ||
uint64_t* x; | ||
|
||
x = malloc(8); | ||
|
||
// address out of range | ||
x = x + 268435456 | ||
|
||
read(0, x, 1); | ||
|
||
return 0; | ||
} |
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,12 @@ | ||
uint64_t main() { | ||
uint64_t* x; | ||
|
||
x = malloc(8); | ||
|
||
// address out of range | ||
x = x + 268435456 | ||
|
||
write(1, x, 1); | ||
|
||
return 0; | ||
} |
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,12 @@ | ||
uint64_t main() { | ||
uint64_t* x; | ||
|
||
x = malloc(16); | ||
|
||
*x = 0; | ||
|
||
// accesses uninitialized memory | ||
write(1, x, 12); | ||
|
||
return 0; | ||
} |
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
Oops, something went wrong.