Skip to content

Commit

Permalink
2.24b
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-huet committed Aug 3, 2016
1 parent f090791 commit bf3975f
Show file tree
Hide file tree
Showing 8 changed files with 335 additions and 12 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ HELPER_PATH = $(PREFIX)/lib/afl
DOC_PATH = $(PREFIX)/share/doc/afl
MISC_PATH = $(PREFIX)/share/afl

# PROGS intentionally omit afl-as, which gets installed to its own dir.
# PROGS intentionally omit afl-as and libdislocator.so, which get installed
# to a different location.

PROGS = afl-gcc afl-fuzz afl-showmap afl-tmin afl-gotcpu afl-analyze
SH_PROGS = afl-plot afl-cmin afl-whatsup
Expand All @@ -44,7 +45,7 @@ endif

COMM_HDR = alloc-inl.h config.h debug.h types.h

all: test_x86 $(PROGS) afl-as test_build all_done
all: test_x86 $(PROGS) afl-as libdislocator.so test_build all_done

ifndef AFL_NO_X86

Expand Down Expand Up @@ -84,6 +85,9 @@ afl-analyze: afl-analyze.c $(COMM_HDR) | test_x86
afl-gotcpu: afl-gotcpu.c $(COMM_HDR) | test_x86
$(CC) $(CFLAGS) $@.c -o $@ $(LDFLAGS)

libdislocator.so: libdislocator.so.c $(COMM_HDR) | test_x86
$(CC) $(CFLAGS) -shared $@.c -o $@ $(LDFLAGS)

ifndef AFL_NO_X86

test_build: afl-gcc afl-as afl-showmap
Expand Down Expand Up @@ -111,7 +115,7 @@ all_done: test_build
.NOTPARALLEL: clean

clean:
rm -f $(PROGS) afl-as as afl-g++ afl-clang afl-clang++ *.o *~ a.out core core.[1-9][0-9]* *.stackdump test .test test-instr .test-instr0 .test-instr1 qemu_mode/qemu-2.3.0.tar.bz2 afl-qemu-trace
rm -f $(PROGS) libdislocator.so afl-as as afl-g++ afl-clang afl-clang++ *.o *~ a.out core core.[1-9][0-9]* *.stackdump test .test test-instr .test-instr0 .test-instr1 qemu_mode/qemu-2.3.0.tar.bz2 afl-qemu-trace
rm -rf out_dir qemu_mode/qemu-2.3.0
$(MAKE) -C llvm_mode clean

Expand All @@ -126,6 +130,7 @@ install: all
if [ -f afl-llvm-rt-64.o ]; then set -e; install -m 755 afl-llvm-rt-64.o $${DESTDIR}$(HELPER_PATH); fi
set -e; for i in afl-g++ afl-clang afl-clang++; do ln -sf afl-gcc $${DESTDIR}$(BIN_PATH)/$$i; done
install -m 755 afl-as $${DESTDIR}$(HELPER_PATH)
install -m 755 libdislocator.so $${DESTDIR}$(HELPER_PATH)
ln -sf afl-as $${DESTDIR}$(HELPER_PATH)/as
install -m 644 docs/README docs/ChangeLog docs/*.txt $${DESTDIR}$(DOC_PATH)
cp -r testcases/ $${DESTDIR}$(MISC_PATH)
Expand Down
2 changes: 1 addition & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/* Version string: */

#define VERSION "2.23b"
#define VERSION "2.24b"

/******************************************************
* *
Expand Down
8 changes: 8 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Not sure if you should upgrade? The lowest currently recommended version
is 2.21b. If you're stuck on an earlier release, it's strongly advisable
to get on with the times.

--------------
Version 2.24b:
--------------

- Added libdislocator.so, an experimental, abusive allocator. Try
it out with AFL_LD_PRELOAD=/path/to/libdislocator.so when running
afl-fuzz.

--------------
Version 2.23b:
--------------
Expand Down
4 changes: 3 additions & 1 deletion docs/README
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ $ CC=/path/to/afl/afl-gcc ./configure --disable-shared

Setting AFL_HARDEN=1 when calling 'make' will cause the CC wrapper to
automatically enable code hardening options that make it easier to detect
simple memory bugs.
simple memory bugs. Preloading 'libdislocator.so' (an abusive allocator) can
help uncover heap corruption isses, too; see libdislocator.so.c for info and
usage tips.

PS. ASAN users are advised to review notes_for_asan.txt file for important
caveats.
Expand Down
21 changes: 19 additions & 2 deletions docs/env_variables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ checks or alter some of the more exotic semantics of the tool:
- In QEMU mode (-Q), AFL_PATH will be searched for afl-qemu-trace.

- Setting AFL_LD_PRELOAD causes AFL to set LD_PRELOAD for the target binary
without disrupting the afl-fuzz process itself.
without disrupting the afl-fuzz process itself. This is useful, among other
things, for bootstrapping libdislocator.so.

- If you are Jakub, you may need AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES.
Others need not apply.
Expand Down Expand Up @@ -183,7 +184,23 @@ Virtually nothing to play with. Well, in QEMU mode (-Q), AFL_PATH will be
searched for afl-qemu-trace. In addition to this, TMPDIR may be used if a
temporary file can't be created in the current working directory.

7) Third-party variables set by afl-fuzz & other tools
7) Settings for libdislocator.so
--------------------------------

The library honors three environmental variables:

- AFL_LD_LIMIT_MB caps the size of the maximum heap usage permitted by the
library, in megabytes. The default value is 1 GB. Once this is exceeded,
allocations will return NULL.

- AFL_LD_LIMIT_HARD alters the behavior by calling abort() on excessive
allocations, thus causing what AFL would perceive as a crash. Useful for
programs that are supposed to maintain a specific memory footprint.

- AFL_LD_VERBOSE causes the library to output some diagnostic messages
that may be useful for pinpointing the cause of any observed issues.

8) Third-party variables set by afl-fuzz & other tools
------------------------------------------------------

Several variables are not directly interpreted by afl-fuzz, but are set to
Expand Down
9 changes: 5 additions & 4 deletions docs/status_screen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,12 @@ there are several things to look at:
- Replace pthreads with GNU Pth (https://www.gnu.org/software/pth/), which
allows you to use a deterministic scheduler.

- In persistent mode, minor reduction in the "stability" metric can be
normal, because not all the code behaves identically when re-entered; but
major drops may signify that the code within __AFL_LOOP() not working
- In persistent mode, minor drops in the "stability" metric can be normal,
because not all the code behaves identically when re-entered; but major
dips may signify that the code within __AFL_LOOP() is not behaving
correctly on subsequent iterations (e.g., due to incomplete clean-up or
reinitialization of the state).
reinitialization of the state) and that most of the fuzzing effort goes
to waste.

The paths where variable behavior is detected are marked with a matching entry
in the <out_dir>/queue/.state/variable_behavior/ directory, so you can look
Expand Down
Loading

0 comments on commit bf3975f

Please sign in to comment.