Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal handling in libafl_bolts is very unsafe #2477

Open
addisoncrump opened this issue Aug 6, 2024 · 1 comment
Open

Signal handling in libafl_bolts is very unsafe #2477

addisoncrump opened this issue Aug 6, 2024 · 1 comment
Labels
cleanup Reducing our technical debt

Comments

@addisoncrump
Copy link
Collaborator

There's a lot of potential for double-mutability here with &mut self in handle. We should either take the reference when a signal is being handled and replace it when finished or use &self.

@addisoncrump addisoncrump added the cleanup Reducing our technical debt label Aug 6, 2024
@domenukk
Copy link
Member

Signals don't really "finish", all signal handling we do (not in bolts, but in their respective users) will quit execution after the signal handler, so at least they never borrow mutably twice. The mutable reference moves into the signal handler in this case.

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

No branches or pull requests

2 participants