Repository navigation
test: fuzz on-disk parsers and fix the journal crashers they found - #10
Merged
Merged
Conversation
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
added a commit
that referenced
this pull request
Oct 24, 2026
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>
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.
Adds
testing.Ffuzz targets for the superblock, inode, snapshot descriptor and journal decoders, plus the journal recovery scan. Plaingo testruns 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 < 8panicked, a hostileEntryCountallocated up to 32 GB,DataAreaSize = 0divided by zero, and an unaligned tail made the scan loop forever.Reviewer note:
ScanAndRecoveralready 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