Repository navigation
fix: harden RBAC repo naming, archive bombs, tier/trash purge races and workq memory - #421
Merged
Merged
Conversation
Coverage
Go by area
Web by area (lines)
|
…nd workq memory - rbac: refuse /repos and /v2 requests that name no repository and percent-escapes in the repository segment, so RBAC (decoded path) and the router (escaped path) cannot name different repositories; add router test - storage: refuse deleting a tier/backend while retired copies are queued in blob_deletions (sweeper could never delete them) - trash: retention worker re-checks expiry under the purge lock - workq: remember a given-up request once, not once per claim - rubygems: cap Marshal link amplification in gemspec decoding - terraform/ansible: cap tar decompression incl. special headers - xz/zstd: cap dictionary/window (pacman, nix, deb/rpm merge); cap deb upstream Packages index size and line length
M0Rf30
force-pushed
the
fix/audit-uncovered-areas
branch
from
November 4, 2026 19:53
9360b09 to
04c345c
Compare
M0Rf30
added a commit
that referenced
this pull request
Nov 27, 2026
…it hid (#531) Refs #514. The nightly `batch` job was cancelled at its 2 h timeout on 11 of the last 16 nights. Timeout. 204 targets get 17 s each from ClusterFuzzLite, but start/stop, corpus clone and corpus push add ~6.6 s per target (23.6 s wall, 33 s max), so the run takes ~80 min for a 1 h budget. The build grew from 14-31 min to 34-56 min on 2026-11-12. Setup + build + run reached 120 min whenever the build took more than ~38 min (11-27: build 42 min, run 77.6 min, cancelled at target ~198 of 204). A cancelled run never uploads its crashes. - Timeout 120 -> 180 min. A new `Fuzz budget` step gives the targets the time left until the timeout (minus 15 min and 10 s per target), at most 3600 s, and fails fast when a target would get under 5 s. - A new `Wait for the storage repository` step outlasts a transient GitHub 403: on 2026-11-20 the clone returned 403 six times in 31 s and cifuzz gave up with exit 128. - `scripts/fuzz-issue.sh`: a timed-out job (annotation `exceeded the maximum execution time`) is a failure and updates the issue; a cancel by hand still changes nothing. The issue lists the failed jobs and steps and shows git errors and tracebacks, not only crashes (11-20 said `no crash lines found`). `report` jobs get `checks: read`. - `scripts/fuzz-issue_test.sh` runs in the CI job `go` (13 of its checks fail against the old script). Crashes the nightly run reported or hid: - rubygems `FuzzMarshalRoundTrip` (the recurring `Not reproducible` crash): the oracle demanded a round trip for any requirement, but `DecodeSpecification` rejects more than 64 clauses (#421). NUL bytes in the `%+v` failure message cut the log, so the crash file name was lost and ClusterFuzzLite re-ran another file. Reproduced with the OSS-Fuzz shim: the old build crashed 9 of 12 jobs in three 17 s runs and exits 77 on the saved input; the new build ran 12 of 12 jobs clean and exits 0. The oracle now asserts the cap; `rubymarshal.MaxRequirementClauses` is exported. - rubygems `FuzzServeGemGet`: the oracle did not strip the query string. - conda `FuzzParsePackageIndex`: the oracle read numbers as float64. The product bug behind it is real: PostgreSQL jsonb refuses numbers beyond numeric, so an upload with `"platform": 1e131072` failed the INSERT. `jsonbRefuses` now drops such keys like it drops NUL. Checked against PostgreSQL 18 with 20000 boundary literals: none accepted that jsonb refuses. - docs/development/fuzzing.md: time budget, storage wait, issue rules, and the real artifact layout of the OSS-Fuzz shim (go-fuzz-headers).
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.
Summary
Fixes from the audit of areas the first pass did not cover.
/repos/or/v2/naming no repository (/repos//x) were evaluated against the empty repo name, which every.*target matches; now 404. Percent-escapes in the repository-naming segment are refused (400), since RBAC reads the decoded path while chi routes on the escaped one. Router test added.blob_deletions(the sweeper could never reach them); delete now refuses until drained. Backend delete usesStorageBackendBusyReason;CountBlobsOnStorageBackendremoved.PurgeExpiredTrash); manual purge unchanged.gaveUpis a set, forgotten on re-claim/finish (unbounded growth for a request retried every lease).pkg/xzlimit); deb upstream index size and line caps.Audited and found OK (no change): projects members/groups/repos/tokens ownership, secrets responses, audit redaction/export, MCP scope enforcement, group ETag/Cache-Control, other
pkg/*readers, trash API authz, tier mover ordering.Tests
Regression tests for each fix;
make lint,make deadcode,go test -racefor touched packages, integration tests for database.