Skip to content

Conversation

nj00001
Copy link

@nj00001 nj00001 commented Sep 29, 2025

In addition to upgrading the forkserver version, some ijon support code has been added. However, the afl-fuzz part also needs to be modified, mainly to expand the bitmap, but it is a bit complicated.

In addition to upgrading the forkserver version, some ijon support code has been added. However, the afl-fuzz part also needs to be modified, mainly to expand the bitmap, but it is a bit complicated.

static void qemu_ijon_init() {
use_ijon = !!getenv("AFL_QEMU_IJON");
if (use_ijon == 0) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that line is pointless :-)

@vanhauser-thc
Copy link
Member

You could just add an AFL_QEMU_MAP_SIZE=xxxx and set this size in the qemu code for the map.
but beware, you may only allow x^2 numbers, so 2^7, 2^8, x^9 ...

__afl_map_size += MAP_SIZE_IJON_MAP + MAP_SIZE_IJON_BYTES;

ijon_map_ptr = afl_area_ptr + MAP_SIZE;
ijon_max_ptr = ijon_map_ptr + MAP_SIZE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be MAP_SIZE_IJON_MAP instead

@nj00001
Copy link
Author

nj00001 commented Sep 30, 2025

You could just add an AFL_QEMU_MAP_SIZE=xxxx and set this size in the qemu code for the map. but beware, you may only allow x^2 numbers, so 2^7, 2^8, x^9 ...

On the afl-fuzz side, the map_size set by qemu mode seems to be fixed at 64k. If the map_size passed by qemu through forkserver is larger than 64k, an error will be thrown. The current idea is to delete the qemu_mode part in line 2570.

https://github.com/AFLplusplus/AFLplusplus/blob/b5b5af1becbc31cdb03de508f841f7abc8edd1c0/src/afl-fuzz.c#L2570
image

image

@nj00001 nj00001 marked this pull request as draft September 30, 2025 02:02
…pository

Updated forkserver code and ijon code. Next, we will add yaml parsing function to read user ijon settings from the configuration file.
@vanhauser-thc
Copy link
Member

vanhauser-thc commented Sep 30, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants