Skip to content

Commit f27c5c0

Browse files
committed
1.93b
1 parent d3f5661 commit f27c5c0

File tree

7 files changed

+52
-7
lines changed

7 files changed

+52
-7
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515

1616
PROGNAME = afl
17-
VERSION = 1.92b
17+
VERSION = 1.93b
1818

1919
PREFIX ?= /usr/local
2020
BIN_PATH = $(PREFIX)/bin

docs/ChangeLog

+10-3
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,23 @@ is 1.92b. If you're stuck on an earlier release, it's strongly advisable
1717
to get on with the times.
1818

1919
--------------
20-
Version 1.91b:
20+
Version 1.93b:
21+
--------------
22+
23+
- Hopefully fixed a problem with MacOS X and persistent mode, spotted by
24+
Leo Barnes.
25+
26+
--------------
27+
Version 1.92b:
2128
--------------
2229

23-
- Yet another C++ fix (namespaces). Reported by Daniel Lockyer.
30+
- Made yet another C++ fix (namespaces). Reported by Daniel Lockyer.
2431

2532
--------------
2633
Version 1.91b:
2734
--------------
2835

29-
- Another fix to make 1.90b actually work properly with C++ (d'oh).
36+
- Made another fix to make 1.90b actually work properly with C++ (d'oh).
3037
Problem spotted by Daniel Lockyer.
3138

3239
--------------

docs/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ bug reports, or patches from:
423423
Richo Healey Martijn Bogaard
424424
rc0r Jonathan Foote
425425
Christian Holler Dominique Pelle
426-
Jacek Wielemborek
426+
Jacek Wielemborek Leo Barnes
427427

428428
Thank you!
429429

docs/notes_for_asan.txt

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Because of this, fuzzing with ASAN is recommended only in four scenarios:
2727

2828
To compile with ASAN, set AFL_USE_ASAN=1 before calling 'make clean all'. The
2929
afl-gcc / afl-clang wrappers will pick that up and add the appropriate flags.
30+
Note that ASAN is incompatible with -static, so be mindful of that.
3031

3132
(You can also use AFL_USE_MSAN=1 to enable MSAN instead.)
3233

docs/sister_projects.txt

+7
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ afl-fuzzing-scripts (Tobias Ospelt)
118118

119119
https://github.com/floyd-fuh/afl-fuzzing-scripts/
120120

121+
afl-sid (Jacek Wielemborek)
122+
---------------------------
123+
124+
Allows users to more conveniently build and deploy AFL via Docker.
125+
126+
https://github.com/d33tah/afl-sid
127+
121128
-------------------------------------
122129
Crash triage, coverage analysis, etc:
123130
-------------------------------------

experimental/persistent_demo/persistent_demo.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ int main(int argc, char** argv) {
8080

8181
}
8282

83-
/* Once the loop is exited, terminate normally - AFL will restat the process
84-
from scratch. */
83+
/* Once the loop is exited, terminate normally - AFL will restart the process
84+
when this happens, with a clean slate when it comes to allocated memory,
85+
leftover file descriptors, etc. */
8586

8687
return 0;
8788

llvm_mode/afl-clang-fast.c

+29
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,45 @@ static void edit_params(u32 argc, char** argv) {
178178

179179
cc_params[cc_par_cnt++] = "-D__AFL_HAVE_MANUAL_CONTROL=1";
180180

181+
/* When the user tries to use persistent or deferred forkserver modes by
182+
appending a single line to the program, we want to reliably inject a
183+
signature into the binary (to be picked up by afl-fuzz) and we want
184+
to call a function from the runtime .o file. This is unnecessarily
185+
painful for three reasons:
186+
187+
1) We need to convince the compiler not to optimize out the signature.
188+
This is done with __attribute__((used)).
189+
190+
2) We need to convince the linker, when called with -Wl,--gc-sections,
191+
not to do the same. This is done by forcing an assignment to a
192+
'volatile' pointer.
193+
194+
3) We need to declare __afl_persistent_loop() in the global namespace,
195+
but doing this within a method in a class is hard - :: and extern "C"
196+
are forbidden and __attribute__((alias(...))) doesn't work. Hence the
197+
__asm__ aliasing trick.
198+
199+
*/
200+
181201
cc_params[cc_par_cnt++] = "-D__AFL_LOOP(_A)="
182202
"({ static volatile char *_B __attribute__((used)); "
183203
" _B = (char*)\"" PERSIST_SIG "\"; "
204+
#ifdef __APPLE__
205+
"int _L(unsigned int) __asm__(\"___afl_persistent_loop\"); "
206+
#else
184207
"int _L(unsigned int) __asm__(\"__afl_persistent_loop\"); "
208+
#endif /* ^__APPLE__ */
185209
"_L(_A); })";
186210

187211
cc_params[cc_par_cnt++] = "-D__AFL_INIT()="
188212
"do { static volatile char *_A __attribute__((used)); "
189213
" _A = (char*)\"" DEFER_SIG "\"; "
214+
#ifdef __APPLE__
215+
"void _I(void) __asm__(\"___afl_manual_init\"); "
216+
#else
190217
"void _I(void) __asm__(\"__afl_manual_init\"); "
218+
#endif /* ^__APPLE__ */
219+
191220
"_I(); } while (0)";
192221

193222
if (maybe_linking) {

0 commit comments

Comments
 (0)