7232 Commits

Author SHA1 Message Date
vanhauser-thc
af47531745 improved seed selection algorithm 2024-06-26 01:12:10 +02:00
van Hauser
e80bd2d30c
Merge pull request #2133 from visitorckw/optimize-bit-counting
Optimize bit counting using __builtin_popcount
2024-06-24 01:37:09 +02:00
Kuan-Wei Chiu
ac5815d994 Optimize bit counting using __builtin_popcount
Use the __builtin_popcount intrinsic to optimize the bit counting
function if the compiler supports it. This change replaces the manual
bit counting algorithm with the more efficient built-in function, which
leverages hardware support on compatible processors.

This modification ensures that the code remains backward-compatible by
falling back to the original implementation when __builtin_popcount is
not available.
2024-06-24 06:52:07 +08:00
vanhauser-thc
540d741df0 nits atnwalk 2024-06-22 22:22:01 +02:00
vanhauser-thc
ecb5854be0 add zlib compression for fast resume 2024-06-21 14:40:23 +02:00
van Hauser
25b650f59d
Merge pull request #2132 from tylzh97/stable
Fix typo in unicorn_mode
2024-06-21 09:22:38 +02:00
Chenhao
ed6f19d3d8
Fix typo in unicorn_mode
in `unicorn_mode/samples`, python example floder's name is `python_simple`, there is a typo in README file.
2024-06-21 09:52:28 +08:00
vanhauser-thc
aecd157244 nit 2024-06-20 18:49:40 +02:00
vanhauser-thc
43a98b0ec2 todos 2024-06-20 18:49:40 +02:00
van Hauser
3b00cee858
Merge pull request #2130 from killerra/dev
Auto disable memory limits for FASAN
2024-06-20 08:47:20 +02:00
killerra
2fbc0aefb1
Auto disable memory limits for FASAN 2024-06-20 00:10:40 +02:00
van Hauser
2276a2f5c3
Merge pull request #2129 from choller/persist-code-cov
Collect persistent coverage data and dump it at the end of the run
2024-06-19 14:09:06 +02:00
Christian Holler (:decoder)
8fcca6fb41 Collect persistent coverage data and dump it at the end of the run
With CODE_COVERAGE builds, we need to collect the coverage data of each
iteration in a persistant buffer that has the same size as the regular
trace buffer used for fuzzing. We dump this information at the end of
the run and when combined with pointer data and module info, this can be
used to calculate code coverage.
2024-06-19 12:36:58 +02:00
vanhauser-thc
b8568034f0 code format and changelog 2024-06-18 15:42:34 +02:00
van Hauser
3ebf41ba34
Merge pull request #2128 from AFLplusplus/fastrestart
Fastrestart
2024-06-18 15:28:56 +02:00
vanhauser-thc
304e84502d fast resume option 2024-06-18 15:24:38 +02:00
vanhauser-thc
a6e42d98d9 llvm 19 fixes 2024-06-18 15:09:11 +02:00
vanhauser-thc
de176a10bc nit 2024-06-17 09:31:42 +02:00
van Hauser
e3183f7cda
Merge pull request #2125 from visitorckw/fix-libradamsa-signed-integer-overflow
Fix signed integer overflow in radamsa
2024-06-14 08:14:03 +02:00
Kuan-Wei Chiu
b5e0fff6b9 Fix signed integer overflow in radamsa
When UBSan was enabled and 'make test' was executed, the following
runtime error was observed:

libradamsa.c:26055:29: runtime error: left shift of 16777215 by 8 places cannot be represented in type 'int'

This issue was caused by a left shift operation on a signed integer.
The fix involved changing the integer literal to an unsigned integer by
adding a 'U' suffix, ensuring the left shift operation produces the
correct value without overflow.

Fixes: 8178f4df ("remove radamsa, add radamsa custom mutator")
2024-06-14 09:53:57 +08:00
van Hauser
36db3428ab
Merge pull request #2123 from AFLplusplus/dev
push to stable
2024-06-13 09:20:42 +02:00
vanhauser-thc
e7da8b9d6b Revert "MONOTONIC"
This reverts commit 0c9b460cc46aebfa4eb6e1fbe928895c0a8fcfbd.
2024-06-13 09:19:11 +02:00
van Hauser
c134df30db
Merge pull request #2121 from visitorckw/remove-Wno-shift-count-overflow
Remove -Wno-shift-count-overflow flag and hashmap from compilation
2024-06-13 07:57:06 +02:00
Kuan-Wei Chiu
b5e6c2d6e2 Remove -Wno-shift-count-overflow flag and hashmap from compilation
After commit 0c9d8e59 ("Fix undefined behavior by casting to uint64_t
before left shift"), the -Wno-shift-count-overflow flag is no longer
necessary to suppress compilation warnings. This commit removes the
flag, allowing the compiler to provide appropriate warnings for any
potential future cases of shifting too many bits.

Additionally, after commit eaf4a299 ("make redqueen hashmap not
default"), the hashmap is no longer in use. Therefore, this commit also
removes the hashmap from the GNUmakefile.
2024-06-13 09:34:03 +08:00
van Hauser
b6f8509234
Merge pull request #2122 from visitorckw/fix-realloc-check
Fix memory allocation check in aflpp custom mutators
2024-06-12 19:27:13 +02:00
Kuan-Wei Chiu
d45cd63583 Fix memory allocation check in aflpp custom mutators
The memory allocation check in afl_custom_fuzz function was incorrect.
The condition was erroneously checking if ptr was non-null, whereas it
should return 0 when ptr is null. Correct the condition to properly
handle memory allocation failures.

Fixes: 32ffa266 ("max_len support")
2024-06-13 00:42:12 +08:00
vanhauser-thc
0c9b460cc4 MONOTONIC 2024-06-12 09:17:07 +02:00
vanhauser-thc
dd762726dc fastresume implementation 2024-06-12 09:10:35 +02:00
van Hauser
e68d57feec
Merge pull request #2120 from visitorckw/fix-shift-too-many-bits
Fix undefined behavior by casting to uint64_t before left shift
2024-06-12 08:23:14 +02:00
Kuan-Wei Chiu
0c9d8e5929 Fix undefined behavior by casting to uint64_t before left shift
According to the C standard, left-shifting a value by an amount greater
than or equal to the width of its promoted type results in undefined
behavior. To prevent potential unexpected results, explicitly cast the
uint8_t variable type to uint64_t before performing the left shift
operation by 56 bits. This ensures the operation is well-defined and
adheres to the standard.

Fixes: 40df85d1 ("adjust cmplog header")
2024-06-12 12:48:13 +08:00
vanhauser-thc
75c3fa91dc update changelog 2024-06-10 22:25:38 +02:00
van Hauser
a37c7e1246
Merge pull request #2119 from WorksButNotTested/frida-persistent
Frida persistent
2024-06-10 22:24:25 +02:00
Your
392dcd57c6 Fixes to build on arm32 2024-06-10 18:16:30 +01:00
Your Name
1369cf7176 Fixes for arm/arm64 2024-06-10 18:16:30 +01:00
Your Name
eccd0985a0 Fixes for x86 2024-06-10 18:16:30 +01:00
Your Name
0617b8898a Update comment 2024-06-10 18:16:30 +01:00
Your Name
fbcdeb8439 Improve persistent mode 2024-06-10 18:16:30 +01:00
vanhauser-thc
6ed0a2b4aa fast resume setup detection 2024-06-10 18:22:06 +02:00
vanhauser-thc
8e50c0c103 frida verbose 2024-06-10 09:08:44 +02:00
vanhauser-thc
f2cd5e1d8e v4.22a init 2024-06-09 19:15:12 +02:00
van Hauser
9f6b012fbf
Merge pull request #2117 from AFLplusplus/dev
push to stable
v4.21c
2024-06-09 19:09:17 +02:00
vanhauser-thc
ec0b83f127 4.21c 2024-06-09 18:39:56 +02:00
vanhauser-thc
0c81982e67 nit 2024-06-09 18:32:36 +02:00
vanhauser-thc
5014b86c3c fix AFL_FRIDA_DEBUG_MAPS 2024-06-09 15:44:10 +02:00
vanhauser-thc
44b5e1f488 fix no_forkserver mode 2024-06-09 12:26:48 +02:00
vanhauser-thc
31652eeb2a nit 2024-06-09 12:19:58 +02:00
vanhauser-thc
4bb4d4ad00 fix -n 2024-06-09 12:16:32 +02:00
vanhauser-thc
5331eca5d9 allow multiple -m 2024-06-09 12:02:59 +02:00
vanhauser-thc
74e264a20a move function 2024-06-07 13:46:15 +02:00
vanhauser-thc
f0937f96d4 target hash 2024-06-07 11:48:58 +02:00