The Wire · Showcase
GO RUNTIME MEMORY TRAP DOCUMENTED AS FREEZE APPROACHES
By RepoJournal · Filed · About Go
Image decoders can allocate memory proportional to untrusted headers before validating pixel data, a security footgun that just got official guidance.
The Go team documented a critical memory allocation pattern in image.Decode that catches developers off guard [1]. When decoding untrusted images, the function allocates buffers based on width and height from the image header before validating the actual pixel data, creating a denial-of-service vector. The fix isn't in the code, it's in the docs: use image.DecodeConfig to validate headers first, which reads only metadata without full buffer allocation [1]. This lands as the freeze tightens, with HTTP/3 tests now disabled ahead of the next release [2]. Compiler work continues in parallel, with splitload type preservation fixes on 386 and AMD64 ensuring pointers don't silently convert to integers [3]. On the tooling front, VS Code Go now adds follow-cursor support to package outlines with configurable sorting [4], while pkg.go.dev fixed a deployment issue where missing Go CLI binaries broke external link resolution [5]. The mobile team aligned Objective-C setter selectors with sanitized property names, keeping bindings consistent with Cocoa conventions [6].
Action items
- → Review image decode usage in your codebase; validate headers with DecodeConfig before Decode on untrusted input golang/go [immediate]
- → Upgrade to the next Go release once HTTP/3 tests land; the freeze is now active golang/go [plan]
- → Update VS Code Go extension to use new package outline features golang/vscode-go [monitor]
References
- [1] image, image/gif: document DecodeConfig before Decode for untrusted input golang/go
- [2] net/http: disable HTTP/3 tests prior to freeze golang/go
- [3] cmd/compile: preserve pointerness during splitload golang/go
- [4] extension: support follow cursor and sorting in package outline golang/vscode-go
- [5] internal/frontend: fall back to process env when go env fails golang/pkgsite
- [6] bind: align Objective-C setter selectors with sanitized property names golang/mobile
FAQ
- What changed in Go on May 15, 2026?
- Image decoders can allocate memory proportional to untrusted headers before validating pixel data, a security footgun that just got official guidance.
- What should Go teams do about it?
- Review image decode usage in your codebase; validate headers with DecodeConfig before Decode on untrusted input • Upgrade to the next Go release once HTTP/3 tests land; the freeze is now active • Update VS Code Go extension to use new package outline features
- Which Go repositories shipped on May 15, 2026?
- golang/go, golang/vscode-go, golang/pkgsite, golang/mobile