-
Notifications
You must be signed in to change notification settings - Fork 18k
debug/buildinfo: slice bounds out of range #69066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note that there is no problem in go 1.23 |
Change https://go.dev/cl/608517 mentions this issue: |
Change https://go.dev/cl/608637 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Aug 27, 2024
An invalid executable may claim to have a data section bigger than the executable, causing readData in searchMagic to hit EOF. Since readData suppresses all EOF errors, searchData would keep attempting to search through a potentially huge "section" despite readData continuously failing. Fix by suppressing EOF only on partial read. If nothing is read, allow EOF. Note that most of the admittedly tedious EOF handling in this package is around ensuring we return errNotGoExe in most cases. This was discovered by the new fuzz test. This fuzz test was inspired by #69066, though it has not found that specific bug. Change-Id: Icf413e996cecc583c084c9e44249b9294c3d8f10 Reviewed-on: https://go-review.googlesource.com/c/go/+/608637 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go version
go version devel go1.24-96d8ff0 Sat Aug 24 00:51:40 2024 +0000 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Run https://go.dev/play/p/28-LPYiOuVt?v=gotip
What did you see happen?
What did you expect to see?
The program printing hello
This was found by ngolo-fuzzing on oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=71257
The text was updated successfully, but these errors were encountered: