Skip to content

smitebot: avoid afl-cmin filename overflow on direct corpus minimize - #190

Merged
morehouse merged 1 commit into
lnfuzz:masterfrom
Ashish-Kumar-Dash:corpus-minimize-longnames
Aug 12, 2026
Merged

smitebot: avoid afl-cmin filename overflow on direct corpus minimize#190
morehouse merged 1 commit into
lnfuzz:masterfrom
Ashish-Kumar-Dash:corpus-minimize-longnames

Conversation

@Ashish-Kumar-Dash

Copy link
Copy Markdown
Contributor

Follow-up to the corpus command #184 .

The default path now stages the campaign's queues through the same content-dedup as merge into a short-named temp corpus, runs afl-cmin on that, and removes it afterward. A supplied --input stays passthrough.

@Ashish-Kumar-Dash
Ashish-Kumar-Dash force-pushed the corpus-minimize-longnames branch 2 times, most recently from 54490b2 to fb3af5f Compare August 7, 2026 04:43

@morehouse morehouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread smitebot/src/commands/corpus.rs Outdated
/// 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true? I don't recall seeing such name formats; I thought it just preserved the existing filenames.

@Ashish-Kumar-Dash Ashish-Kumar-Dash Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread smitebot/src/commands/corpus.rs Outdated
Comment thread smitebot/src/commands/corpus.rs Outdated
Comment thread smitebot/src/commands/corpus.rs Outdated
Comment thread smitebot/README.md Outdated
Comment thread smitebot/src/commands/corpus.rs Outdated

@NishantBansal2003 NishantBansal2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified with a campaign: it was giving OSError: [Errno 36] File name too long: before this change, and the issue is fixed after this change.

Comment thread smitebot/src/commands/corpus.rs Outdated
Comment thread smitebot/src/commands/corpus.rs Outdated
Comment thread smitebot/README.md Outdated
Comment thread smitebot/src/commands/corpus.rs
Comment thread smitebot/README.md Outdated
Comment thread smitebot/src/commands/corpus.rs Outdated
Comment thread smitebot/src/commands/corpus.rs Outdated
Comment thread smitebot/README.md Outdated
@Ashish-Kumar-Dash
Ashish-Kumar-Dash force-pushed the corpus-minimize-longnames branch 2 times, most recently from b204b33 to bce3141 Compare August 11, 2026 16:48
Comment thread smitebot/src/commands/corpus.rs Outdated
@Ashish-Kumar-Dash
Ashish-Kumar-Dash force-pushed the corpus-minimize-longnames branch from bce3141 to b466554 Compare August 12, 2026 04:08
@morehouse
morehouse merged commit 7e6f750 into lnfuzz:master Aug 12, 2026
5 checks passed
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.

3 participants