Commit Graph

1706 Commits

Author SHA1 Message Date
8726d7b0a3 simplified read_timed 2020-05-30 06:51:51 +02:00
408ef5298b Merge pull request #383 from dgmelski/fix-read-timed
Fix read_timed when accumulating short reads
2020-05-29 18:58:25 +02:00
4b01d594c4 Fix read_timed when accumulating short reads
The existing code appears to use 'len_read' in several places where
'total_read' was intended.  The function may work if the first 1 or 2
iterations of the loop read the requested 'len' bytes.

If the first two reads are "short" and a third read is done, the bytes
will be placed over previously read bytes in buf and more than 'len'
bytes may be read in total, though buf is never overrun.

This commit changes read_timed to

  (1) correctly append short reads in buf
  (2) correctly terminate when the sum of the short reads
      equals the requested 'len' bytes
  (3) return an error when read() returns -1 or 0

The function also depends on select() decrementing the timeout
structure, as it does on Linux.  On other platforms, the exec_ms
returned is likely incorrect.  This patch does not attempt to address
this issue.
2020-05-28 20:25:30 -04:00
aace0d1192 code format 2020-05-27 11:28:29 +02:00
cee4b4593b Merge pull request #379 from arnow117/master
Fix MOpt implementation flaws
2020-05-27 11:27:11 +02:00
dab498c3b7 fix MOPT implementation flaws in core fuzzing 2020-05-27 16:01:44 +08:00
707145c491 persistent mode: shared memory test case transfer 2020-05-25 16:40:55 +02:00
0245f8438d forkserver: missing space in message 2020-05-23 08:15:20 +02:00
c64ea49432 AFL_LLVM_LAF_ALL 2020-05-23 01:37:21 +02:00
38fe1c6066 more help for LTO issues 2020-05-22 20:59:32 +02:00
c456e20750 better sync - lesser and better imports 2020-05-20 23:12:33 +02:00
982017a2ab remove master file on exit 2020-05-20 22:52:33 +02:00
0ed767fac5 forgot the unlink ... 2020-05-19 19:54:10 +02:00
25fbec6638 if no master is present a slave becomes a temporary master 2020-05-19 19:51:54 +02:00
30824bc58e afl-as fast system fix 2020-05-18 10:48:39 +02:00
d37a8f72d6 fix master creation file 2020-05-17 01:36:03 +02:00
9dd3e3e38a fix -M check 2020-05-17 00:13:55 +02:00
57637ba0b0 removed overlooked post_lib references, added post_lib examples to examples/custom_mutators 2020-05-15 13:39:42 +02:00
d536ddc240 change: slaves only sync from masters 2020-05-15 09:27:15 +02:00
63e2222af1 code format 2020-05-15 01:24:27 +02:00
65f9553365 unicorn mode may run scripts 2020-05-14 22:25:50 +02:00
7c9ff4bfe7 if target crashes add LTO fixed map as a possible reason 2020-05-14 01:12:00 +02:00
d334093606 deprecated AFL_POST_LIBRARY 2020-05-14 01:00:11 +02:00
044bd3cb41 init/deinit need to be optional for post lib 2020-05-13 18:58:32 +02:00
8cc5442401 fix GNUmakefile 2020-05-13 18:20:06 +02:00
60a5df5262 code-format and slight -S/-M modifications 2020-05-13 16:49:00 +02:00
645e331559 Fix previous commit bugs 2020-05-13 19:46:30 +05:30
45bddcd808 Fix bugs, remove intial post library test 2020-05-13 19:25:23 +05:30
9627458ecc Add post library API as custom mutator and rename pre_save 2020-05-13 18:59:12 +05:30
f8b3d34225 move has_new_bits for better performance 2020-05-13 00:41:24 +02:00
72f4a9f678 missing env var 2020-05-12 19:40:04 +02:00
060f4ea320 enforce mandatary custom functions 2020-05-12 17:05:12 +02:00
6177954773 fix custom mutators and add real test cases 2020-05-12 16:32:40 +02:00
7b40d7b942 new code formatting + applied 2020-05-12 11:12:25 +02:00
8bb10c3bf1 fix issue in describe_op showing time inside src 2020-05-12 09:20:02 +02:00
30bfd44dfd indenting preprocessor directives breaks compilation and cant be fixed, reverting ... :-( 2020-05-10 12:09:37 +02:00
26f8708fed fix warning, code format 2020-05-10 11:35:31 +02:00
2e553bcd69 code-format 2020-05-10 10:24:24 +02:00
515de0d68d Illumos biuld fix (#357) 2020-05-10 00:21:26 +02:00
c380819e02 remove debug output 2020-05-09 11:58:47 +02:00
fa84e52af0 custom mutator code enhancements and code-format 2020-05-09 11:35:54 +02:00
190f3024da Support multiple custom mutators (#282)
* Make a list of custom mutators using env variable

* Set up multiple custom mutators

* Add destroy custom mutator and changes to load_custom_mutator

* Use array instead of list, make changes to afl-fuzz-one for multiple mutators

* Make change to fuzz-one custom_queue_get to support multiple mutators

* Modify custom python mutator support

* Fix bug

* Fix missing afl->mutator->data

* Revert to list with max count

* Change custom_pre_save hook and code format

* Free custom_mutator struct in the list

* Add testcase for multiple custom mutators

* Resolve merge conflict
2020-05-08 20:08:27 +02:00
ef2ccc8117 added AFL_LLVM_SKIPSINGLEBLOCK and changed default behaviour to instrument single block functions 2020-05-07 14:59:12 +02:00
02887dc164 fix static and profiling compilation and add profiling calculation 2020-05-07 14:09:58 +02:00
5b1b986c89 fix for afl-tmin -f 2020-05-03 14:19:03 +02:00
378573ab8b AFL_LLVM_SKIP_NEVERZERO added 2020-05-02 00:39:13 +02:00
cc78fb721b code format 2020-05-01 01:11:54 +02:00
efa9df24c2 afl-untracer completed 2020-04-30 17:59:59 +02:00
a37eca9df5 afl-untracer - next step 2020-04-30 16:27:31 +02:00
fbd9994f6f better fix for showmap 2020-04-27 22:11:58 +02:00