-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
debug/elf: use saferio.SliceCap when decoding ELF sections #56405
Conversation
This avoids allocating an overly large slice for corrupt input. No test case because the problem can only happen for invalid data. Let the fuzzer find cases like this.
This PR (HEAD: 6c62fc3) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/445076 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/445076. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/445076. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/445076. |
Message from Ian Lance Taylor: Patch Set 1: Run-TryBot+1 Auto-Submit+1 Code-Review+2 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/445076. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I confirm that this change fixes the issue for me.
This avoids allocating an overly large slice for corrupt input. No test case because the problem can only happen for invalid data. Let the fuzzer find cases like this. Updates #33121. Change-Id: Ie2d947a3865d3499034286f2d08d3e3204015f3e GitHub-Last-Rev: 6c62fc3 GitHub-Pull-Request: #56405 Reviewed-on: https://go-review.googlesource.com/c/go/+/445076 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
This PR is being closed because golang.org/cl/445076 has been merged. |
@ZekeLu Just out of curiosity (and for planning): Will the fix go into 1.19.3 or only into 1.20 ? |
Hi @rockdaboot, no backport request is created, so it won't go into 1.19.x. If you want to make it capable for fuzzing, I think the following commits should be backported too: I'm not sure whether they are qualified for backporting to the 1.19 branch. Maybe @ianlancetaylor can answer your question. |
I don't think these kinds of changes meet our backport criteria (https://go.dev/wiki/MinorReleases). Sorry. |
@ZekeLu Thanks GTN. I fuzz using latest |
it shouldn't be too hard to use your own copy of the master version of debug/elf for now. |
This avoids allocating an overly large slice for corrupt input. No test case because the problem can only happen for invalid data. Let the fuzzer find cases like this. Updates golang#33121. Change-Id: Ie2d947a3865d3499034286f2d08d3e3204015f3e GitHub-Last-Rev: 6c62fc3 GitHub-Pull-Request: golang#56405 Reviewed-on: https://go-review.googlesource.com/c/go/+/445076 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
This avoids allocating an overly large slice for corrupt input.
No test case because the problem can only happen for invalid data. Let
the fuzzer find cases like this.
Updates #33121.