aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-09-06 12:16:31 +0200
committerGitHub <noreply@github.com>2024-09-06 12:16:31 +0200
commit75d8c47a6b8ae94cd7ded2f0574e4d35a2021ab7 (patch)
treeb702e4d7c53835439ed83ed9291723cb32b7ebfa /src
parent598a3c6b5e24bd33e84b914e145810d39f88adf6 (diff)
parent3ec794c806f9e5fbdd4bdb55cac11b2eb9d010c7 (diff)
downloadafl++-75d8c47a6b8ae94cd7ded2f0574e4d35a2021ab7.tar.gz
Merge pull request #2204 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-init.c15
-rw-r--r--src/afl-fuzz-queue.c5
2 files changed, 10 insertions, 10 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 4f366b0d..d3085d42 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -495,7 +495,9 @@ static void shuffle_ptrs(afl_state_t *afl, void **ptrs, u32 cnt) {
}
/* Read all testcases from foreign input directories, then queue them for
- testing. Called at startup and at sync intervals.
+ testing. Called at sync intervals. Use env AFL_IMPORT_FIRST to sync at
+ startup (but may delay the startup depending on the amount of fails
+ and speed of execution).
Does not descend into subdirectories! */
void read_foreign_testcases(afl_state_t *afl, int first) {
@@ -2443,20 +2445,19 @@ void check_crash_handling(void) {
SAYF(
"\n" cLRD "[-] " cRST
- "Hmm, your system is configured to send core dump notifications to an\n"
+ "Your system is configured to send core dump notifications to an\n"
" external utility. This will cause issues: there will be an "
"extended delay\n"
" between stumbling upon a crash and having this information "
"relayed to the\n"
" fuzzer via the standard waitpid() API.\n"
- " If you're just testing, set "
+ " If you're just experimenting, set "
"'AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1'.\n\n"
- " To avoid having crashes misinterpreted as timeouts, please log in "
- "as root\n"
- " and temporarily modify /proc/sys/kernel/core_pattern, like so:\n\n"
+ " To avoid having crashes misinterpreted as timeouts, please \n"
+ " temporarily modify /proc/sys/kernel/core_pattern, like so:\n\n"
- " echo core >/proc/sys/kernel/core_pattern\n");
+ " echo core | sudo tee /proc/sys/kernel/core_pattern\n");
if (!getenv("AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES")) {
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index 599d31f6..8db89775 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -455,9 +455,8 @@ void mark_as_variable(afl_state_t *afl, struct queue_entry *q) {
if (symlink(ldest, fn)) {
- s32 fd = open(fn, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
- if (fd < 0) { PFATAL("Unable to create '%s'", fn); }
- close(fd);
+ s32 fd = permissive_create(afl, fn);
+ if (fd >= 0) { close(fd); }
}