smitebot: avoid afl-cmin filename overflow on direct corpus minimize - #190
Open
Ashish-Kumar-Dash wants to merge 2 commits into
Open
smitebot: avoid afl-cmin filename overflow on direct corpus minimize#190Ashish-Kumar-Dash wants to merge 2 commits into
Ashish-Kumar-Dash wants to merge 2 commits into
Conversation
Ashish-Kumar-Dash
force-pushed
the
corpus-minimize-longnames
branch
from
August 6, 2026 19:43
b2591f4 to
e05db7a
Compare
afl-cmin -X copies each input to `<8hex>_<basename>`; smite-ir queue filenames embed the full mutation stack and already approach NAME_MAX (255), so the prefix overflows (ENAMETOOLONG) on a direct minimize of raw runner queues. Stage the queues through the existing merge dedup into a short-named temp corpus first, then run afl-cmin on that and clean it up. A user-supplied --input is passed through unchanged.
Ashish-Kumar-Dash
force-pushed
the
corpus-minimize-longnames
branch
from
August 7, 2026 04:43
54490b2 to
fb3af5f
Compare
morehouse
requested changes
Aug 7, 2026
morehouse
left a comment
Collaborator
There was a problem hiding this comment.
I think we probably want to always do the merge step first, not just in the default-no-input case. A manually-specified a queue dir as input is going to have the same long-pathname issue. This probably also means we need the ability to specify multiple --input flags.
| /// Stages a campaign's runner queues into `stage_dir` with short, sequential | ||
| /// filenames, returning the directory to hand to `afl-cmin -i`. | ||
| /// | ||
| /// afl-cmin -X hardlinks each input to `<8hex>_<basename>` (batch mode); smite-ir |
Collaborator
There was a problem hiding this comment.
Is this true? I don't recall seeing such name formats; I thought it just preserved the existing filenames.
Contributor
Author
There was a problem hiding this comment.
Yes. That is afl-cmin's own temp staging, in its batched processing it hardlinks each input into .filelist..d/ as rand_bit function, which is exactly the path from the error you posted. That's where the length overflows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the corpus command #184 .
The default path now stages the campaign's queues through the same content-dedup as
mergeinto a short-named temp corpus, runs afl-cmin on that, and removes it afterward. A supplied--inputstays passthrough.