-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Filenames and import paths leaked via assembly files #605
Comments
Using my merlin-agent-dll repository I see:
I get 888 lines for |
Thanks for reporting, I can reproduce even with |
mvdan
changed the title
Module Paths Persist in Binary
Filenames and import paths leaked via assembly files
Nov 11, 2022
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Nov 11, 2022
We were still leaking the filenames for assembly files. In our existing asm.txtar test's output binary, the string `test/main/garble_main_amd64.s` was present. This leaked full import paths on one hand, and the filenames of each assembly file on the other. We avoid this in Go files by using `/*line` directives, but those are not supported in assembly files. Instead, obfuscate the paths in the temporary directory. Note that we still need a separate temporary directory per package, because otherwise any included header files might collide. We must remove the `main` package panic in obfuscatedImportPath, as we now need to use that function for all packages. While here, remove the outdated comment about `-trimpath`. Fixes burrowers#605.
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Nov 11, 2022
We were still leaking the filenames for assembly files. In our existing asm.txtar test's output binary, the string `test/main/garble_main_amd64.s` was present. This leaked full import paths on one hand, and the filenames of each assembly file on the other. We avoid this in Go files by using `/*line` directives, but those are not supported in assembly files. Instead, obfuscate the paths in the temporary directory. Note that we still need a separate temporary directory per package, because otherwise any included header files might collide. We must remove the `main` package panic in obfuscatedImportPath, as we now need to use that function for all packages. While here, remove the outdated comment about `-trimpath`. Fixes burrowers#605.
lu4p
pushed a commit
that referenced
this issue
Nov 12, 2022
We were still leaking the filenames for assembly files. In our existing asm.txtar test's output binary, the string `test/main/garble_main_amd64.s` was present. This leaked full import paths on one hand, and the filenames of each assembly file on the other. We avoid this in Go files by using `/*line` directives, but those are not supported in assembly files. Instead, obfuscate the paths in the temporary directory. Note that we still need a separate temporary directory per package, because otherwise any included header files might collide. We must remove the `main` package panic in obfuscatedImportPath, as we now need to use that function for all packages. While here, remove the outdated comment about `-trimpath`. Fixes #605.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
What did you expect to see?
To run strings on the output binary and NOT see references for modules in GOGARBLE like github.com.
What did you see instead?
There were 490 lines, this is just a snippet:
The text was updated successfully, but these errors were encountered: