Repository navigation
security: validate result shapes, bound empty-array work, guard every asm call; go 1.26.6 - #24
Merged
Merged
Conversation
…d asm operands Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e profiles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Security audit, 2026-10-04. Full write-up in
SECURITY.md.Found and fixed
Concatenatesummed axis lengths without an overflow check: 17 arrays(2^59, 0)gave a negative dimension. Fixed with a checked sum, plusvalidateShapeon the result. This also coversStack, which used to return(9, 2^58, 0), a shapeNewrejects.MatMul/Dot/Innerof(m, 0) @ (0, n)never validatedm*n.(2^32,0)@(0,2^32)returned a(2^32, 2^32)array withSize() == 0; a product wrapping to −1 panicked inmakeslice. Both are nowErrShapeMismatch.Linspace(…, 1<<62)panicked inmakeslice; it now returnsErrShapeMismatch.(2^58, 0)over axis 0, concatenating it along its last axis, orCumSumof(0, 2^58)walked 2^58 iterations doing nothing. The kernel is now skipped when the result is empty.Hardened
TestWrappersRefuseShortOperandschecks this; sabotaging one guard makes it fail.fence_test.go: each operand is mmap'd flush against aPROT_NONEpage, both head and tail, for n = 1…70 and GEMM kc = 1…9, and the FMA/LASX fallbacks run too. It passes on real amd64 (Zen 3), arm64 (cfarm185 + M-series), ppc64le (POWER9) and loong64 (3C5000L, LASX). Positive control: a kernel reading one element too far faults on all four page sizes (4K/16K/16K/64K).Other
go 1.26.6(root and generator module). govulncheck at 1.26.4 listed 10 stdlib vulns (none reachable); at 1.26.6 there are none. Regenerated.sare byte-identical on all 4 arches.cg*.out,cover2.out) that had been committed;*.outis now ignored.Cost
On a single Zen 3 core, an A/B of 10 interleaved rounds:
MatMul256²,Dot1DandAddInto16Ki all fall within ±2%, which is inside the spread between runs.Version: v0.3.0. The minimum Go version goes up, and some calls now return errors where they used to return arrays.
🤖 Generated with Claude Code