Skip to content

Conversation

saruman9
Copy link
Contributor

@saruman9 saruman9 commented Aug 1, 2025

Overview

This PR introduces preliminary support for FreeBSD x86 (32-bit) systems in LibAFL with Frida instrumentation.

Key Changes

  • Added basic FreeBSD x86 support for Coverage runtime (including DrCov runtime)
  • Implemented partial allocator and ASAN support (currently disabled)
  • Fixed several minor issues discovered during implementation
  • Added compatibility with modified Frida components

Implementation Status

Working:

  • Coverage runtime
  • DrCov instrumentation
  • Basic fuzzing functionality

Incomplete:

  • ASAN support (scaffolding present but non-functional)
  • Allocator implementation

Dependencies

Requires modified Frida components:

Known Limitations

Testing

Successfully validated on real-world projects using Coverage runtime.

Checklist

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

@domenukk domenukk requested a review from s1341 August 4, 2025 19:01
@domenukk domenukk merged commit 824f553 into AFLplusplus:main Aug 4, 2025
109 checks passed
@domenukk
Copy link
Member

domenukk commented Aug 4, 2025

Thanks!

@saruman9 saruman9 deleted the fix/frida_freebsd branch August 4, 2025 19:40
rmalmain pushed a commit that referenced this pull request Aug 11, 2025
* fix(libafl): add cfg_attr for check in freebsd case

* feat(frida): add FreeBSD to cfg's conditions

* feat(bolts): add write_crash for freebsd x86

* fix(bolts): convert rss.ru_maxrss to i64 for freebsd x86

* feat(frida): initial commit for freebsd x86

* fix(frida): x86_64 register's size in asan

* fix(frida): set 1<<31 as default value for max_total_allocation, needed for 32bit

* feat(bolts): add parse_from method for cli

* fix(bolts): unaligned msg in freebsd x86

* fix(frida): use u32::MAX limit for ranges in x86 case

* chore(bolts): fix typo in minibsod crash message

* fix(frida): remove including of failed script.js and use without ext
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.

2 participants