Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zafl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
zafl
Commits
42850eb6
Commit
42850eb6
authored
6 years ago
by
Anh Nguyen-Tuong
Browse files
Options
Downloads
Patches
Plain Diff
Update test scripts
parent
9371fe01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/bc/test_bc.sh
+5
-2
5 additions, 2 deletions
test/bc/test_bc.sh
test/gzip/test_gzip.sh
+12
-15
12 additions, 15 deletions
test/gzip/test_gzip.sh
with
17 additions
and
17 deletions
test/bc/test_bc.sh
+
5
−
2
View file @
42850eb6
export
AFL_TIMEOUT
=
6
0
export
AFL_TIMEOUT
=
3
0
export
LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH
:
$SECURITY_TRANSFORMS_HOME
/lib/:.
session
=
/tmp/tmp.bc.
$$
cleanup
()
{
rm
-fr
/tmp/gzip.tmp
*
gzip
*
.zafl peasoup_exec
*
.gzip
*
zafl_in zafl_out
$session
rm
-fr
/tmp/gzip.tmp
*
gzip
*
.zafl peasoup_exec
*
.gzip
*
zafl_in zafl_out
}
log_error
()
...
...
@@ -74,6 +74,9 @@ fi
ls
-lt
log_message
"Fuzz for
$AFL_TIMEOUT
secs"
fuzz_with_zafl
$(
realpath
./bc.stars.zafl
)
popd
cleanup
This diff is collapsed.
Click to expand it.
test/gzip/test_gzip.sh
+
12
−
15
View file @
42850eb6
TMP_FILE_1
=
/tmp/gzip.tmp.
$$
TMP_FILE_2
=
/tmp/gzip.tmp.
$$
AFL_TIMEOUT
=
3000
AFL_TIMEOUT
=
30
session
=
/tmp/tmp.gzip.
$$
TMP_FILE_1
=
"
${
session
}
/gzip.tmp.
$$
"
TMP_FILE_2
=
"
${
session
}
/gzip.tmp.
$$
"
mkdir
-p
$session
cleanup
()
{
rm
-fr
/tmp/gzip.tmp
*
gzip
*
.zafl peasoup_exec
*
.gzip
*
zafl_in zafl_out
rm
-fr
/tmp/gzip.tmp
*
gzip
*
.zafl peasoup_exec
*
.gzip
*
zafl_in zafl_out
${
session
}
}
log_error
()
...
...
@@ -44,7 +47,7 @@ build_zafl()
test_zafl
()
{
gzip_zafl
=
$
1
gzip_zafl
=
$
(
realpath
$1
)
shift
LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH
:
$SECURITY_TRANSFORMS_HOME
/lib/
$gzip_zafl
$*
$TMP_FILE_1
...
...
@@ -85,42 +88,36 @@ fuzz_with_zafl()
}
pushd
/tmp
pushd
${
session
}
setup
cleanup
# test setting of entry point via address
setup
ep
=
$(
objdump
-Mintel
-d
/bin/gzip |
grep
text |
grep
-v
-i
disassembly |
cut
-d
' '
-f1
|
sed
's/^00000000//g'
)
build_zafl gzip.stars.entrypoint.
${
ep
}
.zafl
-o
zafl:--stars
-o
"zafl:--entrypoint=
$ep
"
test_zafl ./gzip.stars.entrypoint.
${
ep
}
.zafl
--fast
cleanup
# test setting of entry point via function name
setup
build_zafl gzip.entrypoint.zafl
-o
"zafl:--entrypoint=main"
test_zafl ./gzip.entrypoint.zafl
--best
cleanup
# test non-STARS version
setup
build_zafl gzip.nostars.zafl
test_zafl ./gzip.nostars.zafl
test_zafl ./gzip.nostars.zafl
--fast
test_zafl ./gzip.nostars.zafl
--best
cleanup
# test STARS version
setup
build_zafl gzip.stars.zafl
-o
zafl:--stars
test_zafl ./gzip.stars.zafl
test_zafl ./gzip.stars.zafl
--fast
test_zafl ./gzip.stars.zafl
--best
# test STARS version on AFL
log_message
"Fuzz for
$AFL_TIMEOUT
seconds"
fuzz_with_zafl ./gzip.stars.zafl
cleanup
log_success
"all tests passed: zafl instrumentation operational on gzip"
cleanup
popd
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment