AFLplusplus / AFLplusplus/LibAFL

Unmap LLMP Broker Pages eventually

Open
#848 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
2.6k
Forks
481
Avg merge
2d 30m
Merged PRs (30d)
16

Description

Right now, LLMP keeps pages from broker to the clients around indefinitely.
This is a deliberate choice: this way, a new client can be spawned and join fuzzing at any point in time and still replay all of the state.

However, this is an issue on low memory systems (...that cannot add enough swap) since all testcases may also be stored in memory, indefinitely this way.

Ideally, we'd have an optional feature in LLMP to delete old and unused broker pages.
To not crash newly spawned children, we are never allowed to remove the initial page, and we need to link the initial page to the currently active page before unmapping the next one.

It's definitely spicy WRT memory safety :)

For the pages from client to broker, we already have a method to reliably do this:
https://github.com/AFLplusplus/LibAFL/blob/4ccd85f568fe23f3012cb959a05e317c5ec405bd/libafl/src/bolts/llmp.rs#L928

From broker to client, we'll need proper ref counts on pages, and we have to unmap from oldest to newest page for this to work.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.