Skip to content

Deleting C++ FBI! - #117

Open
AndrewQuijano wants to merge 4 commits into
masterfrom
remove
Open

AndrewQuijano wants to merge 4 commits into
masterfrom
remove

Conversation

@AndrewQuijano

@AndrewQuijano AndrewQuijano commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Your checklist for this pull request

  • I've documented or updated the documentation of every function and struct that this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

Replace the C++ FBI miner with the Python mining and bug-generation pipeline. Consolidating this logic in Python simplifies maintenance and provides the foundation for experimenting with candidate ranking and off-main-path bug placement.

  • Validation against the saved C++ runs shows matching Phase I dump contents for libpng, SQLite, and OpenSSL.
  • Generated bug records match exactly for libpng (610,725 bugs) and SQLite (2,713,837 bugs). Libxml2 validation is pending.

OpenSSL produces the same 234,295 bug identities and counts, with different selections in 471 bugs (~0.2%), confined to CHAFF_STACK_CONST, CHAFF_HEAP_CONST, and CHAFF_DIVZERO.

The discrepancy was traced to query ordering: C++ generates chaff after each individual lval query, while Python updates all DUAs sharing an instruction before generating chaff. This can change the selected extra DUA and consequently the trigger bytes and recorded liveness.

We accept this known chaff selection discrepancy as trying to fix this might end up causing more problems in our Python implementation. Exact historical selection parity is not a requirement for this transition; as the LAVA 1.0 exploitable bugs parity is enforced, which is the most important part for the first paper in deeper bug injection.

I should note, curtail for 5000 DUAs was used in all targets to ensure a quick completion of mining to not be blocked on other LAVA improvements before deprecating the C++ code.

...

Test plan

Confirm CI/CD passes, which it should look identical to C++ on toy.
...

Closing issues

...

@github-actions github-actions Bot added the Github-files GitHub CI/CD label Oct 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Github-files GitHub CI/CD Lava-Core LAVA C/C++ code Pyroclastic Python LAVA code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant