Skip to content

Commit ef1cd9a

Browse files
committed
update headers
1 parent 4d837f0 commit ef1cd9a

File tree

4 files changed

+40
-16
lines changed

4 files changed

+40
-16
lines changed

qemuafl/imported/cmplog.h

+9-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Forkserver design by Jann Horn <[email protected]>
88
99
Now maintained by Marc Heuse <[email protected]>,
10-
Heiko Eißfeldt <[email protected]>,
10+
Heiko Eissfeldt <[email protected]>,
1111
Andrea Fioraldi <[email protected]>,
1212
Dominik Maier <[email protected]>
1313
@@ -53,21 +53,24 @@ struct cmp_header { // 16 bit = 2 bytes
5353
struct cmp_operands {
5454

5555
u64 v0;
56-
u64 v1;
5756
u64 v0_128;
57+
u64 v0_256_0; // u256 is unsupported by any compiler for now, so future use
58+
u64 v0_256_1;
59+
u64 v1;
5860
u64 v1_128;
59-
u64 unused;
60-
u8 unused1;
61-
u8 unused2;
61+
u64 v1_256_0;
62+
u64 v1_256_1;
63+
u8 unused[8]; // 2 bits could be used for "is constant operand"
6264

6365
} __attribute__((packed));
6466

6567
struct cmpfn_operands {
6668

6769
u8 v0[32];
68-
u8 v0_len;
6970
u8 v1[32];
71+
u8 v0_len;
7072
u8 v1_len;
73+
u8 unused[6]; // 2 bits could be used for "is constant operand"
7174

7275
} __attribute__((packed));
7376

qemuafl/imported/config.h

+28-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* Version string: */
2727

2828
// c = release, a = volatile github dev, e = experimental branch
29-
#define VERSION "++4.20a"
29+
#define VERSION "++4.32a"
3030

3131
/******************************************************
3232
* *
@@ -39,7 +39,7 @@
3939
However if a target has problematic constructors and init arrays then
4040
this can fail. Hence afl-fuzz deploys a larger default map. The largest
4141
map seen so far is the xlsx fuzzer for libreoffice which is 5MB.
42-
At runtime this value can be overriden via AFL_MAP_SIZE.
42+
At runtime this value can be overridden via AFL_MAP_SIZE.
4343
Default: 8MB (defined in bytes) */
4444
#define DEFAULT_SHMEM_SIZE (8 * 1024 * 1024)
4545

@@ -52,6 +52,18 @@
5252
/* Default file permission umode when creating files (default: 0600) */
5353
#define DEFAULT_PERMISSION 0600
5454

55+
#ifdef __APPLE__
56+
#include <TargetConditionals.h>
57+
#if TARGET_OS_IOS
58+
#undef DEFAULT_PERMISSION
59+
#define DEFAULT_PERMISSION 0666
60+
#endif
61+
#endif
62+
#ifdef __ANDROID__
63+
#undef DEFAULT_PERMISSION
64+
#define DEFAULT_PERMISSION 0666
65+
#endif
66+
5567
/* SkipDet's global configuration */
5668

5769
#define MINIMAL_BLOCK_SIZE 64
@@ -85,11 +97,17 @@
8597
/* Maximum allowed fails per CMP value. Default: 96 */
8698
#define CMPLOG_FAIL_MAX 96
8799

100+
/*
101+
* Effective fuzzing with selective feeding inputs
102+
*/
103+
104+
#define MAX_EXTRA_SAN_BINARY 4
105+
88106
/* -------------------------------------*/
89107
/* Now non-cmplog configuration options */
90108
/* -------------------------------------*/
91109

92-
/* If a persistent target keeps state and found crashes are not reproducable
110+
/* If a persistent target keeps state and found crashes are not reproducible
93111
then enable this option and set the AFL_PERSISTENT_RECORD env variable
94112
to a number. These number of testcases prior and including the crash case
95113
will be kept and written to the crash/ directory as RECORD:... files.
@@ -324,9 +342,9 @@
324342
#define SYNC_INTERVAL 8
325343

326344
/* Sync time (minimum time between syncing in ms, time is halfed for -M main
327-
nodes) - default is 30 minutes: */
345+
nodes) - default is 20 minutes: */
328346

329-
#define SYNC_TIME (30 * 60 * 1000)
347+
#define SYNC_TIME (20 * 60 * 1000)
330348

331349
/* Output directory reuse grace period (minutes): */
332350

@@ -464,7 +482,7 @@
464482
/* Do not change this unless you really know what you are doing. */
465483

466484
#define MAP_SIZE (1U << MAP_SIZE_POW2)
467-
#if MAP_SIZE <= 65536
485+
#if MAP_SIZE <= 2097152
468486
#define MAP_INITIAL_SIZE (2 << 20) // = 2097152
469487
#else
470488
#define MAP_INITIAL_SIZE MAP_SIZE
@@ -492,6 +510,9 @@
492510

493511
#define CMPLOG_SHM_ENV_VAR "__AFL_CMPLOG_SHM_ID"
494512

513+
/* ASAN SHM ID */
514+
#define AFL_ASAN_FUZZ_SHM_ENV_VAR "__AFL_ASAN_SHM_ID"
515+
495516
/* CPU Affinity lockfile env var */
496517

497518
#define CPU_AFFINITY_ENV_VAR "__AFL_LOCKFILE"
@@ -523,7 +544,7 @@
523544

524545
#define AFL_TXT_MAX_LEN 65535
525546

526-
/* What is the minimum percentage of ascii characters present to be classifed
547+
/* What is the minimum percentage of ascii characters present to be classified
527548
as "is_ascii"? */
528549

529550
#define AFL_TXT_MIN_PERCENT 99

qemuafl/imported/snapshot-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Forkserver design by Jann Horn <[email protected]>
88
99
Now maintained by Marc Heuse <[email protected]>,
10-
Heiko Eißfeldt <[email protected]>,
10+
Heiko Eissfeldt <[email protected]>,
1111
Andrea Fioraldi <[email protected]>,
1212
Dominik Maier <[email protected]>
1313

qemuafl/imported/types.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Originally written by Michal Zalewski
66
77
Now maintained by Marc Heuse <[email protected]>,
8-
Heiko Eißfeldt <[email protected]>,
8+
Heiko Eissfeldt <[email protected]>,
99
Andrea Fioraldi <[email protected]>,
1010
Dominik Maier <[email protected]>
1111
@@ -155,7 +155,7 @@ typedef int128_t s128;
155155
({ \
156156
\
157157
char *d = (char *)(_x), *s = (char *)(_y); \
158-
u32 i, l = (_l)-1; \
158+
u32 i, l = (_l) - 1; \
159159
for (i = 0; i <= l; i++) \
160160
d[l - i] = s[i]; \
161161
\

0 commit comments

Comments
 (0)