Skip to content

build(deps): Bump golang.org/x/sync from 0.22.0 to 0.23.0 - #1444

Merged
lklimek merged 1 commit into
v1.8-devfrom
dependabot/go_modules/golang.org/x/sync-0.23.0
Sep 9, 2026
Merged

lklimek merged 1 commit into
v1.8-devfrom
dependabot/go_modules/golang.org/x/sync-0.23.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Bumps golang.org/x/sync from 0.22.0 to 0.23.0.

Commits
  • f75267d semaphore: panic on negative capacity
  • 3ffd83c all: upgrade go directive to at least 1.26.0 [generated]
  • See full diff in compare view

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Sep 8, 2026
@Claudius-Maginificent

Claudius-Maginificent commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

🔒 Dependency Security Audit — golang.org/x/sync 0.22.0 → 0.23.0

Audited at PR head f6de50a. Verdict up front: Safe to merge — once CI is green. The failing check is not attributable to this bump, and I can demonstrate that structurally rather than by assertion.


1. Change summary

Package golang.org/x/sync (direct, production)
Versions v0.22.0 → v0.23.0 (semver-minor)
Files touched go.mod, go.sum only — no source, no vendor/
Upstream commits 2

The go.mod diff reports 329 changed lines, which is alarming at a glance and is exactly where a second, unannounced change would be smuggled in. I did not trust the textual diff. I extracted and sorted the full module@version set from both revisions and compared them:

346c346
< golang.org/x/sync v0.22.0
---
> golang.org/x/sync v0.23.0

One line. 362 modules before, 362 after. // indirect markers: identical. replace directives: identical. go directive: unchanged at 1.27.1. go.sum: exactly 4 lines, all golang.org/x/sync. The remaining churn is a pure go mod tidy require-block reshuffle with zero semantic content.

Why the churn appeared at all (verified against history, since an unexplained diff shape is itself a finding): the previous bump of this very package, c4063ef0b (x/sync 0.21.0→0.22.0), was go.mod | 2 +-, go.sum | 4 ++-- — 3 insertions, 3 deletions. This PR is the first Dependabot run after 4cc364e6a (chore(deps): bump Go to 1.27.1, #1438), and the newer toolchain recomputes the module graph and re-partitions the require blocks on go mod tidy. The churn is a one-off toolchain artifact, not authored content — consistent with, and fully explained by, the one-line module-set delta above.

CONTRIBUTING.md:78-81 asks contributors to "only update the particular dependencies you need", while explicitly permitting a go mod tidy fallback — so this is not a policy violation, but it does bury a one-line change in ~330 lines of noise. Worth knowing for the next reviewer who sees a 329-line "dependency bump" and has to decide whether to trust it.

2. Supply-chain integrity — verified, not assumed

Check Result
go.sum hashes vs. signed sum.golang.org transparency log ✅ Exact match, both h1: and /go.mod
Module origin go.googlesource.com/sync, refs/tags/v0.23.0 → f75267d8412fc1dfd12b343644a7ea46e4d9c85d
Tag integrity (moved-tag attack) ✅ Independently cloned upstream; v0.23.0 resolves to f75267d…, identical to the hash the proxy recorded at publish time
Publish date 2026-08-31

A moved or re-pointed tag is the standard shape of a tampered release. It is not present here.

3. Diff integrity — the actual upstream change

Two commits, and the full diff is 3 files:

go.mod                      |  2 +-   (go directive 1.25.0 → 1.26.0)
semaphore/semaphore.go      |  9 +++---
semaphore/semaphore_test.go | 22 ++++++-

The only functional change, in its entirety:

 func NewWeighted(n int64) *Weighted {
-	w := &Weighted{size: n}
-	return w
+	if n < 0 {
+		panic("semaphore: size < 0")
+	}
+	return &Weighted{size: n}
 }

semaphore: panic on negative capacity (upstream golang/go#80183) — rejects a nonsensical construction that previously produced a semaphore no acquisition could ever satisfy.

  • No install/build/lifecycle hooks — not applicable to Go modules, and none introduced.
  • No new network calls, no new env/credential reads, no obfuscated or encoded content.
  • Diff shape matches the stated change type. Nothing undocumented.
  • Provenance: authored by an outside contributor (racequite), but landed through Gerrit with Reviewed-by from two Go team maintainers (Alan Donovan, David Chase) and green LUCI TryBot results. The change is four lines and I read every one of them.

4. Known vulnerabilities

Source Result
OSV.dev (golang.org/x/sync, Go ecosystem) {} — no advisories, any version
GitHub Advisory Database None
govulncheck (CI check on this PR) ✅ SUCCESS

golang.org/x/sync has no CVE history. Nothing to cross-reference.

5. Impact on this codebase — the part that actually matters

The concern worth raising for a consensus-critical node is not a CVE; it is a behavioural regression in goroutine coordination causing a deadlock or liveness fault. I checked it directly, and the answer is conclusive:

  • tenderdash imports only golang.org/x/sync/errgroup, in three files:
    • internal/inspect/inspect.go:103 — errgroup.WithContext
    • internal/mempool/mempool.go:789 — errgroup.Group + SetLimit(2 * runtime.NumCPU())
    • scripts/keymigrate/migrate.go:637 — errgroup.Group
  • errgroup/ and singleflight/ are byte-identical between v0.22.0 and v0.23.0 (git diff --name-only v0.22.0..v0.23.0 -- errgroup/ singleflight/ → empty).
  • errgroup does not import semaphore; it coordinates via a chan token. Its only imports are context, fmt, sync.
  • golang.org/x/sync/semaphore — the sole package that changed — is not imported anywhere in this repository.

Therefore the x/sync machine code linked into a tenderdash binary is unchanged by this PR. There is no consensus, mempool, or inspect-server behaviour that this bump can alter. The new panic is unreachable: it lives in a package this project does not compile in, and it fires only on a negative constant capacity, which no call site here supplies.

6. The failing check — e2e-test (dashcore)

15 of 16 checks pass, including govulncheck, golangci-lint, Build, and all six unit-test shards. The one failure:

ERROR chain stalled at height 1006 [3 of 4 nodes map[validator01:1006 validator02:1006 validator04:1006]]

(e2e-test (rotate) is CANCELLED — confirmed collateral: .github/workflows/e2e.yml:17 sets fail-fast: true over matrix.testnet: ["dashcore", "rotate"], so it was killed by the dashcore failure, not by one of its own.)

Assessment: environmental/flaky, not caused by this bump. Reasoning, in order of strength:

  1. Structural — decisive. Per §5, this PR changes no code that ends up in the binary under test. A bump that alters zero linked instructions cannot cause a consensus stall.
  2. The stall signature matches the harness's own deliberate chaos injection. test/e2e/networks/dashcore.toml perturbs the network on purpose: validator03 has perturb = ["kill"], validator04 ["pause"], validator01 ["disconnect"], validator02 and seed01 ["restart"], and one node carries all three. The failure reports validator03 absent from the height map at 1006 — precisely the killed node. With only four active validators at that point (validator_update.0), a killed validator03 overlapping a paused validator04 transiently drops the active set below the ⅔ threshold and halts the chain. That is a timing race in perturbation scheduling.
  3. The e2e job is demonstrably fragile on unrelated Dependabot PRs. The concurrent golang.org/x/sys 0.47.0→0.48.0 bump also fails e2e-test (dashcore) — though with a different signature (Go module-proxy connection reset by peer), so I am citing this as evidence of job fragility, not as an identical fault.

⚠️ One caveat I will not paper over: this is a genuine consensus liveness stall, not a build or network error. It is not this PR's doing, but a chain halting at 1006 — four blocks before the validator_update.1010 rotation — under a survivable perturbation is worth its own investigation. Recommend tracking it separately; do not let a green rebase quietly retire the question.

7. Risk assessment

Overall rating: 🟢 Safe.

Concern Status
Malicious/tampered release ❌ None — sumdb + tag/commit hash independently verified
Known CVEs/advisories ❌ None in any version
Undocumented changes in diff ❌ None
Behavioural risk to consensus paths ❌ None — changed package not imported; errgroup byte-identical
Breaking change for this repo ❌ None

ℹ️ Informational only: upstream raised its go directive to 1.26.0, so x/sync v0.23.0 no longer builds on Go < 1.26. This repo is on go 1.27.1 with GOTOOLCHAIN=local on 1.27.1 in CI, so there is no impact — noted for anyone maintaining an older build environment.

8. Recommendations

  1. Do not merge while e2e-test (dashcore) is red. I have requested @dependabot rebase to re-run against current base and clear the flake.
  2. If the rebase comes back green, this is a clean merge on the security axis.
  3. If it fails again with the same chain stalled signature, stop treating it as flake and open an issue for the perturbation/liveness race — the bump is still exonerated by §5, but the harness would be telling you something real.
  4. Consider grouping golang.org/x/* Dependabot bumps. .github/dependabot.yml has no groups: key on the gomod ecosystem, so x/net, x/crypto, x/sys, x/sync and x/term each open a separate PR and each pays the full e2e chaos-suite lottery independently — which is precisely how flakes come to look like signal. A groups: golang-x-deps: patterns: ["golang.org/x/*"] entry would collapse them into one PR per cycle.

Findings tally: 🍬 0 vulnerabilities · 0 supply-chain anomalies · 2 informational (Go toolchain floor; go.mod churn provenance) · 2 pre-existing items flagged for separate tracking (e2e liveness stall; Dependabot x/* grouping).

Verified twice. The dependency is clean; the red check is the harness, not the code.

🤖 Co-authored by Claudius the Magnificent AI Agent


Appendix — independent execution-level verification

The above was re-verified by a second reviewer executing against the same head, rather than reasoning from the diff. Two results worth recording:

A. go mod why golang.org/x/sync/semaphore reports a path — and it is a false alarm. The path runs github.com/dashpay/tenderdash/tools → bufbuild/buf → … , but tools/tools.go is gated behind //go:build tools (the standard dev-tool-pinning idiom that blank-imports buf, golangci-lint, mockery). It is never compiled into a shipped binary. Under default build tags, go list -deps ./... enumerates 855 packages with zero matches for sync/semaphore. Anyone re-auditing this should use go list -deps, not go mod why, or they will chase a ghost.

B. The committed manifests are exactly reproducible. go mod tidy at this head produces zero diff against the committed go.mod/go.sum, and go mod verify reports "all modules verified" (module cache fetched fresh this session, not stale). This independently confirms §1: the 329-line reshuffle is precisely what Go 1.27.1's tidy emits — there is nothing hand-authored hiding in it.

Also executed clean at this head: go build ./..., go vet on all three errgroup consumers, and go test ./internal/mempool/... ./scripts/keymigrate/... (both ok). Additionally confirmed that errgroup.SetLimit does not panic on negative input in any case (negative means "unlimited"), and that runtime.NumCPU() is spec-guaranteed ≥ 1 — so the call sites could not reach a negative-capacity path even if semaphore were linked in.

Conclusion unchanged: 🟢 Safe. The red check is the chaos harness, not this dependency.

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

@dependabot rebase

@dependabot @github

dependabot Bot commented on behalf of github Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, only users with push access can use that command.

@dependabot
dependabot Bot force-pushed the dependabot/go_modules/golang.org/x/sync-0.23.0 branch 2 times, most recently from de1f801 to 9d1a7da Compare September 9, 2026 10:50
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.22.0 to 0.23.0.
- [Commits](golang/sync@v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/golang.org/x/sync-0.23.0 branch from 9d1a7da to 00bce1d Compare September 9, 2026 10:54
@lklimek
lklimek merged commit 350b763 into v1.8-dev Sep 9, 2026
17 checks passed
@lklimek
lklimek deleted the dependabot/go_modules/golang.org/x/sync-0.23.0 branch September 9, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants