Closed MatthewTingum closed 1 year ago
Related: #42
qemuafl is not supposed to be used in system mode, it can only support usermode targets. We are not interested in supporting neither maintaining system mode for qemuafl as it is superseded by libafl_qemu and would be a double effort for nothing.
Builds configured with
--enable-system
and--target-list=x86_64-softmmu
are broken. Other target architectures are possibly broken as well.To reproduce, apply AFLplusplus patches to qemu in master (currently a8af9cbde71e333ce72a46f15e655d0b82ed0939). This is the commit used by
AFLplusplus
tag4.05c
. By apply patches I mean copy the correspondingAFLplusplus
files toimported/
.Then do the following:
The build will fail:
The
abi_ulong
error is resolved by includingabitypes.h
.page_get_flags
is aCONFIG_USER_ONLY
function. The desire of this issue is compile withoutCONFIG_USER_ONLY
. Hacking past it, there are more errors.Why is this an issue? From a maintainability perspective, it feels wrong to break other configurations for our own. Breaking these configurations seems hackish.
If we wish to build upon
qemuafl
and support kernel mode full system tracing, this is also an issue. I know thatnyx
exists, but to my knowledge, that requires Intel PT and the KVM-PT kernel module. AMD users can't use it nor can users forced to operate within a VM (nested virtualization does not yet support Intel PT). I would assume users on Windows cannot use this either.nyx
has limitations on the architectures it can trace: You can only trace architectures supported by your host CPU. Resolving this issue would be the first step in bringing TriforceAFL up to date which would allow for cross-architecture full system fuzzing.