mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 20:28:08 +00:00
code-format
This commit is contained in:
@ -43,6 +43,10 @@ requires an Intel processor (6th generation onwards) and a special 5.10 kernel
|
||||
|
||||
## Preparing to fuzz a target with Nyx mode
|
||||
|
||||
For source instrumented fuzzing you can use any afl-cc mode, with LTO even
|
||||
auto-dictionary is supported.
|
||||
Note the CMPLOG is currently not supported (yet).
|
||||
|
||||
Nyx uses full system emulation hence your fuzzing targets have to be especially
|
||||
packaged.
|
||||
|
||||
|
@ -425,6 +425,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ck_free(x);
|
||||
|
||||
if (fsrv->nyx_runner == NULL) { FATAL("Something went wrong ..."); }
|
||||
@ -467,17 +468,23 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
|
||||
/* autodict in Nyx mode */
|
||||
if (!ignore_autodict) {
|
||||
|
||||
x = alloc_printf("%s/workdir/dump/afl_autodict.txt", fsrv->out_dir_path);
|
||||
int nyx_autodict_fd = open(x, O_RDONLY);
|
||||
ck_free(x);
|
||||
|
||||
if (nyx_autodict_fd >= 0) {
|
||||
|
||||
struct stat st;
|
||||
if (fstat(nyx_autodict_fd, &st) >= 0) {
|
||||
|
||||
u32 f_len = st.st_size;
|
||||
u8 *dict = ck_alloc(f_len);
|
||||
if (dict == NULL) {
|
||||
FATAL("Could not allocate %u bytes of autodictionary memory", f_len);
|
||||
|
||||
FATAL("Could not allocate %u bytes of autodictionary memory",
|
||||
f_len);
|
||||
|
||||
}
|
||||
|
||||
u32 offset = 0, count = 0;
|
||||
@ -497,6 +504,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
"Reading autodictionary fail at position %u with %u bytes "
|
||||
"left.",
|
||||
offset, len);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -516,8 +524,11 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
ck_free(dict);
|
||||
|
||||
}
|
||||
|
||||
close(nyx_autodict_fd);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
Reference in New Issue
Block a user