Skip to content

libafl_qemu snapshot.rs file-descriptor feature-extension#3732

Open
seal9055 wants to merge 3 commits intoAFLplusplus:mainfrom
seal9055:seal-patch-2
Open

libafl_qemu snapshot.rs file-descriptor feature-extension#3732
seal9055 wants to merge 3 commits intoAFLplusplus:mainfrom
seal9055:seal-patch-2

Conversation

@seal9055
Copy link

libafl_qemu snapshot.rs feature-extension

Description

Added optional feature (enabled by default, can be disabled using snapshot.disable_fd_tracking), that tracks files that were either already opened at snapshot time (tracks its current seak-offset), or are opened during a fuzz-case. At reset time previously opened files have their offset reset using seek, and files opened during the fuzzcase are closed. Not doing this can easily lead to the fuzzer crashing due to too many files being open if the target creates a file during the testcase but doesn't close it before the reset.

Also added additional syscalls for file-tracking.

Checklist

  • I have run ./scripts/precommit.sh and addressed all comments

## libafl_qemu snapshot.rs feature-extension

## Description

Added optional feature (enabled by default, can be disabled using `snapshot.disable_fd_tracking`), that tracks files that were either already opened at snapshot time (tracks its current seak-offset), or are opened during a fuzz-case. At reset time previously opened files have their offset reset using `seek`, and files opened during the fuzzcase are closed. Not doing this can easily lead to the fuzzer crashing due to too many files being open if the target creates a file during the testcase but doesn't close it before the reset.

Also added additional syscalls for file-tracking.

## Checklist

- [X] I have run `./scripts/precommit.sh` and addressed all comments
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.

1 participant

Comments