Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.

Commit

Permalink
Merge tag 'v1.29a'
Browse files Browse the repository at this point in the history
Version 1.29a

  - afl-collect updated to not use a hard-coded path to the gdb binary
    (suggested by Martin Lindhe).
  - Fixed #30: CPU affinity settings removed from afl-multicore. (The
    option for explicitly setting CPU affinity in afl was dropped in
    afl-2.17b.)
  • Loading branch information
rc0r committed Jul 26, 2016
2 parents c80ea37 + 14c4110 commit 92a840c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ python:
- "3.4"
- "3.5"
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y gdb
- pip install pytest pytest-cov
- pip install coveralls
install:
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,6 @@ specific target than were previously started. Obviously `afl-multicore` can
resume just as many afl instances as it finds output directories for! Use the
`add` command to start additional afl instances!

If you want to use afl's CPU affinity feature use the `cpu_affinity`
configuration option to provide a whitespace separated list of single (`1`) or
tuple (`2,3`) CPU ids. For info on when to use single vs. tuple id specifications
checkout out afl's `docs/perf_tips.txt`. In the `afl-multicore` configuration
you need to provide a CPU id for **every** afl instance you want to assign to a
specific CPU core. The first provided id is always used for the master afl
instance. When starting more afl instances than CPU ids have been specified,
all additional instances won't be assigned to a specific CPU core.
**Note:** Don't use whitespaces in your tuple specifications!

`afl-fuzz` can be run using its `-f <file>` argument to specify the location of
the generated sample. When using multiple `afl-fuzz` instances a single file
obviously can't do the trick, because multiple fuzzers running in parallel would
Expand Down
2 changes: 1 addition & 1 deletion afl_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
__author__ = 'rc0r <hlt99@blinkenshell.org> # @_rc0r'
__author_name__ = 'rc0r'
__author_email__ = 'hlt99@blinkenshell.org'
__version__ = "1.28a"
__version__ = "1.29a"
5 changes: 4 additions & 1 deletion afl_utils/afl_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
# gdb settings

# Path to gdb binary
gdb_binary = "/usr/bin/gdb"
gdb_binary = shutil.which("gdb")
if gdb_binary is None:
print_err("gdb binary not found!")
sys.exit(1)

# Path to 'exploitable.py' (https://github.com/rc0r/exploitable)
# Set to None if you already source exploitable.py in your .gdbinit file!
Expand Down
4 changes: 0 additions & 4 deletions afl_utils/afl_multicore.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ def afl_cmdline_from_config(config_settings, instance_number):
afl_cmdline.append("-m")
afl_cmdline.append(config_settings["mem_limit"])

if "cpu_affinity" in config_settings and instance_number < len(config_settings["cpu_affinity"]):
afl_cmdline.append("-Z")
afl_cmdline.append(config_settings["cpu_affinity"][instance_number])

if "qemu" in config_settings and config_settings["qemu"]:
afl_cmdline.append("-Q")

Expand Down
6 changes: 0 additions & 6 deletions config/afl-multicore.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"timeout": "200+",
"mem_limit": "150",
"qemu": false,
"cpu_affinity": [
"0,1",
"2,3",
"4,5",
"6,7"
],
"afl_margs": "-T banner",
"dirty": false,
"dumb": false,
Expand Down
8 changes: 8 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# afl-utils Changelog

Version 1.29a

- afl-collect updated to not use a hard-coded path to the gdb binary
(suggested by Martin Lindhe).
- Fixed #30: CPU affinity settings removed from afl-multicore. (The
option for explicitly setting CPU affinity in afl was dropped in
afl-2.17b.)

Version 1.28a

- afl-cron for periodic task execution added.
Expand Down
6 changes: 0 additions & 6 deletions testdata/afl-multicore.conf2.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,5 @@
"target": "/usr/bin/target",
"input": "./in",
"cmdline": "-a -b -c -d",
"cpu_affinity": [
"0,1",
"2,3",
"4,5",
"6,7"
],
"output": "./out"
}
3 changes: 1 addition & 2 deletions tests/test_afl_multicore.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
'target': '/usr/bin/target',
'input': './in',
'cmdline': '-a -b -c -d',
'cpu_affinity': ['0,1', '2,3', '4,5', '6,7'],
'output': './out'
}

Expand All @@ -72,7 +71,7 @@
]

test_afl_cmdline2 = [
'-Z', '2,3', '-i', './in', '-o', './out'
'-i', './in', '-o', './out'
]

test_afl_cmdline21 = [
Expand Down

0 comments on commit 92a840c

Please sign in to comment.