Skip to content

Commit

Permalink
2.30b
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-huet committed Aug 14, 2016
1 parent 323560e commit 23710f1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
14 changes: 9 additions & 5 deletions afl-fuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ EXP_ST u8 skip_deterministic, /* Skip deterministic stages? */
bitmap_changed = 1, /* Time to update bitmap? */
qemu_mode, /* Running in QEMU mode? */
skip_requested, /* Skip request, via SIGUSR1 */
run_over10m; /* Run time over 10 minutes? */
run_over10m, /* Run time over 10 minutes? */
persistent_mode; /* Running in persistent mode? */

static s32 out_fd, /* Persistent fd for out_file */
dev_urandom_fd = -1, /* Persistent fd for /dev/urandom */
Expand Down Expand Up @@ -396,7 +397,7 @@ static void bind_to_free_cpu(void) {
u8 cpu_used[4096] = { 0 };
u32 i;

if (!cpu_core_count) return;
if (cpu_core_count < 2) return;

if (getenv("AFL_NO_AFFINITY")) {

Expand Down Expand Up @@ -2401,7 +2402,8 @@ static u8 run_target(char** argv) {

}

child_pid = 0;
if (!WIFSTOPPED(status)) child_pid = 0;

it.it_value.tv_sec = 0;
it.it_value.tv_usec = 0;

Expand Down Expand Up @@ -4199,8 +4201,9 @@ static void show_stats(void) {
if (t_bytes) sprintf(tmp, "%0.02f%%", stab_ratio);
else strcpy(tmp, "n/a");

SAYF(" stability : %s%-10s " bSTG bV "\n", stab_ratio < 90 ? cLRD :
(queued_variable ? cMGN : cRST), tmp);
SAYF(" stability : %s%-10s " bSTG bV "\n", (stab_ratio < 85 && var_byte_count > 40)
? cLRD : ((queued_variable && (!persistent_mode || var_byte_count > 20))
? cMGN : cRST), tmp);

if (!bytes_trim_out) {

Expand Down Expand Up @@ -6858,6 +6861,7 @@ EXP_ST void check_binary(u8* fname) {

OKF(cPIN "Persistent mode binary detected.");
setenv(PERSIST_ENV_VAR, "1", 1);
persistent_mode = 1;

} else if (getenv("AFL_PERSISTENT")) {

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.29b"
#define VERSION "2.30b"

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

--------------
Version 2.30b:
--------------

- Made minor improvements to persistent mode to avoid the remote
possibility of "no instrumentation detected" issues with very low
instrumentation densities.

- Fixed a minor glitch with a leftover process in persistent mode.
Reported by Jakub Wilk and Daniel Stender.

- Made persistent mode bitmaps a bit more consistent and adjusted the way
this is shown in the UI, especially in persistent mode.

--------------
Version 2.29b:
--------------
Expand Down
8 changes: 4 additions & 4 deletions docs/status_screen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ number of inputs that produce seemingly variable behavior in the tested binary.

That last bit is actually fairly interesting: it measures the consistency of
observed traces. If a program always behaves the same for the same input data,
it will earn a score of 100%. When the value is over 90%, the fuzzing process
is still unlikely to be negatively affected. If it gets much lower, you may
be in trouble, since AFL will have difficulty discerning between meaningful
and "phantom" effects of tweaking the input file.
it will earn a score of 100%. When the value is lower but still shown in purple,
the fuzzing process is unlikely to be negatively affected. If it goes into red,
you may be in trouble, since AFL will have difficulty discerning between
meaningful and "phantom" effects of tweaking the input file.

Now, most targets will just get a 100% score, but when you see lower figures,
there are several things to look at:
Expand Down
6 changes: 6 additions & 0 deletions llvm_mode/afl-llvm-rt.o.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ int __afl_persistent_loop(unsigned int max_cnt) {
before the loop. */

if (is_persistent) {

memset(__afl_area_ptr, 0, MAP_SIZE);
__afl_area_ptr[0] = 1;
__afl_prev_loc = 0;
}

cycle_cnt = max_cnt;
Expand All @@ -191,6 +193,10 @@ int __afl_persistent_loop(unsigned int max_cnt) {
if (--cycle_cnt) {

raise(SIGSTOP);

__afl_area_ptr[0] = 1;
__afl_prev_loc = 0;

return 1;

} else {
Expand Down

0 comments on commit 23710f1

Please sign in to comment.