Skip to content
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

obfuscate all assembly filenames #606

Merged
merged 1 commit into from
Nov 12, 2022

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented Nov 11, 2022

(see commit message)

Fixes #605.

@mvdan
Copy link
Member Author

mvdan commented Nov 11, 2022

cc @Ne0nd0g

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 mvdan force-pushed the obfuscate-asm-filenames branch from 78e3070 to 3e192f9 Compare November 11, 2022 20:29
@lu4p lu4p merged commit ff52178 into burrowers:master Nov 12, 2022
@mvdan mvdan deleted the obfuscate-asm-filenames branch November 12, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Filenames and import paths leaked via assembly files
2 participants