-
Notifications
You must be signed in to change notification settings - Fork 18k
debug/elf: timeout/oom in NewFile #54967
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
Is this related to #45599? CC @ianlancetaylor @thanm |
Note that #45599 was fixed about a month ago on tip. I see that you're running go.dev/play against tip, so maybe this is still an issue? |
Yes this is an issue on tip, so likely similar to #45599 but different... |
Change https://go.dev/cl/429601 mentions this issue: |
The test case uncovers another issue: incorrect huge size (3349099659509720927 bytes) of the It seems that there is not way to tell whether the section size is valid. So https://go.dev/cl/429601 returns the section data by calling I think a further fix is to set a limit for the size of the |
The docs at https://refspecs.linuxfoundation.org/LSB_2.1.0/LSB-Core-generic/LSB-Core-generic/elftypes.html have
I'd suggest that for this case we do
This reflects the wording from the docs in that no data is present, but the user can still obtain the |
Change https://go.dev/cl/430155 mentions this issue: |
@kortschak I like this solution! See also the discussion in #18667. Since the CL (https://go.dev/cl/375216) that introduced this behavior has been released since go1.18, it seems that it's too late to change the behavior now. And this solution requires the caller to check the section type. If the caller would like to check the section type, it can avoid calling Regarding the caller of Footnotes |
@aarzilli Can you take a look at https://go.dev/cl/429601 ? The consensus there is to let |
Changes: 1. When e_shstrndx holds the value SHN_UNDEF (0), the file has no section name string table. In this case, do not try to set section names . 2. e_shstrndx should point to an SHT_STRTAB section. If it does not, returns an error. Reference: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html Updates #54967. Change-Id: Ic8f228061d996fd7845dfa630719a1ba12d2bb60 GitHub-Last-Rev: aeb70ca GitHub-Pull-Request: #55001 Reviewed-on: https://go-review.googlesource.com/c/go/+/430155 Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run https://go.dev/play/p/yNYIA1Rditp?v=gotip
What did you expect to see?
The program finishing and printing Hello
What did you see instead?
Found by https://github.com/catenacyber/ngolo-fuzzing on oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51098
The text was updated successfully, but these errors were encountered: