Skip to content

test: fuzz on-disk parsers and fix the journal crashers they found - #10

Merged
mattmattox merged 3 commits into
mainfrom
claude/modest-poitras-3d0e21
Oct 24, 2026
Merged

mattmattox merged 3 commits into
mainfrom
claude/modest-poitras-3d0e21

Conversation

@mattmattox

Copy link
Copy Markdown
Contributor

Adds testing.F fuzz targets for the superblock, inode, snapshot descriptor and journal decoders, plus the journal recovery scan. Plain go test runs only the seeds and saved crashers.

Each target ran ~2 min on .68. Superblock, inode and snapshot found nothing. Journal recovery had four crashers, fixed here: an entry Length < 8 panicked, a hostile EntryCount allocated up to 32 GB, DataAreaSize = 0 divided by zero, and an unaligned tail made the scan loop forever.

Reviewer note: ScanAndRecover already treats a journal it can't open as "nothing to recover", so mount re-inits a journal with bad geometry instead of crashing.

Not covered: internal/extent, internal/fsck (other PRs in flight).

🤖 Generated with Claude Code

mattmattox and others added 3 commits October 24, 2026 08:01
Cover superblock, inode, snapshot descriptor, journal superblock,
journal transaction records, and the journal recovery scan. Seeds come
from the encoders plus truncated and boundary cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A transaction entry with Length < 8 made parseTxnEntries slice with
start > end and panic during recovery. A hostile EntryCount made it
preallocate up to 32 GB before reading any entry. Both inputs came
from the fuzzer and are kept under testdata/fuzz.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recovery trusted DataAreaSize, HeadOffset and TailOffset from disk. A
zero data area divided by zero in Region.ReadAt, an unaligned tail made
the intent-completion scan loop forever, and a data area larger than
the region let one record allocate gigabytes. readSuperblock now
rejects these as ErrJournalCorrupt. The fuzz seeds cover all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox merged commit 611d493 into main Oct 24, 2026
4 of 5 checks passed
mattmattox added a commit that referenced this pull request Oct 24, 2026
…rnal fixes

Cover PRs #5, #6, #7 and #10, which merged to main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattmattox added a commit that referenced this pull request Oct 24, 2026
…elog, and templates (#9)

* docs: add security policy, contributing guide, code of conduct, changelog, and templates

Adds the community files GitHub expects for a public release:
SECURITY.md (GitHub private vulnerability reporting, main only),
CONTRIBUTING.md, CODE_OF_CONDUCT.md (Contributor Covenant 2.1),
CHANGELOG.md with an Unreleased section, issue templates, and a
pull request template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: correct build, CI, and changelog claims in community files

Write CONTRIBUTING against main after the CI gates PR: make build also
builds goclusterfs-fsck, and CI adds golangci-lint, govulncheck, a
go mod tidy check, and race/coverage unit tests.

In the changelog, mark SFB, snapshots/clones, and fsck as experimental
with their known issues, say file writes skip the distributed locks,
and narrow the concurrency fix to create/mkdir lock ordering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): add upgrade notes for mixed-version clusters

Older binaries zero an inode's generations on free and its extent-tree
generation on rewrite, so all nodes must be upgraded together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): add CI gates, prototype removal, stale-inode and journal fixes

Cover PRs #5, #6, #7 and #10, which merged to main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant