Expand description
§asan
asan is a library intended to be used by a guest running in QEMU to
support address sanitizer.
It has a modular design intended to support different use cases and environments. The following initial variants are proposed:
libafl_qemu_asan_host- Intended as a drop in replacement for the original libqasan, this will have dependency onlibcand will interact with QEMU using the bespoke syscall interface to perform memory tracking and shadowing.libafl_qemu_asan_guest- This is similar tolibafl_qemu_asan_host, but rather than having QEMU perform the management of the shadow memory and memory tracking, this work will be carried out purely in the guest (and hence should be more performant).libafl_qemu_asan_nolibc- This variant is intended to have no dependencies on libc, nor any other libraries. It is intended to be used in bare-metal targets or targets which have statically linkedlibc.
The following ancilliary crates are provided as follows:
libafl_asan_libc- A dummy libc library used during linking which provides only the symbolsdlsymanddlerror. This is intended to ensure thatlibafl_qemu_asan_guestandlibafl_qemu_asan_hostdo not have any direct dependency on libc and hence avoids the possibility of accidental re-entrancy. (e.g. in the case that we have hooked a function such asmallocand in our handling of the call inadvertently callmalloc, or one of our other hooked functions ourselves).libafl_asan_fuzz- A few different fuzzing harnesses used to testlibafl_asan.
The componentized nature of the design is intended to permit the user to
adapt asan to their needs with minimal modification by selecting and
combining alternative implementations of the various key components.
§Features
dlmalloc(enabled by default) — Enable support for thedlmallocallocator backenddocument-features(enabled by default) — Enable documentation of featuresglobal_allocator(enabled by default) — Configure a global allocator (using dlmalloc or mimalloc as configured)guest(enabled by default) — Enable support for shadow memory and tracking in the guesthooks(enabled by default) — Enable support for hooking functions in the guesthost(enabled by default) — Enable support for shadow memory and tracking in the hostinitialize— Intialize all allocations with 0xfflibc(enabled by default) — Enable use of thelibclibrary to support creation of mappings, read/write, logging etc (more OS agnostic)syscalls(enabled by default) — Enable the use of direct syscalls (supported byrustix) to interact with the operating system (Unix specific).mimalloc(enabled by default) — Enable thebaby_mimallocallocatortest(enabled by default) — Disable the magic used to supportno_stdenvironments for running unit and integration tests (we only run our tests on Linux right now).tracking(enabled by default) — Enable support for memory tracking
Re-exports§
pub use test::*;
Modules§
- allocator
- allocator
- env
- exit
- die
- file
- hooks
- hooks
- host
- host
- logger
- logger
- maps
- mmap
- mmap
- patch
- patch
- shadow
- shadow
- symbols
- symbols
- test
- tracking
- tracking