3 ms·
TL;DR: Debug information can contain absolute paths which can leak usernames and similar. --- More precisely the debug information about dependencies can cont
by dathinab 6y ago
TL;DR: Debug information can contain absolute paths which can leak usernames and similar.
---
More precisely the debug information about dependencies can contain the absolute path to that dependency.
For example:
/home/<user>/.cargo/registry/src/github.com-1ecc6299db9ec823/terminfo-0.6.1/src/parser/compiled.rs
Note: The github.com-... is not leaking private information.
As you can see this might leak:
- your home directory and with this implicitly your user name.
- the CARGO_HOME path
- the dependency the binary uses, including it's version (but there are many ways you can potentially find that out, still a leak).
Especially in case of `path` and `git` dependencies this might leak more information.
BUT for debug builds I would prefer it to be this way as it allows me easily to navigate to the file which caused the panic. As this are potentially files not relative to the project root using relative path wouldn't work!!
But then on release builds I would prefer them to be obfuscated by default (maybe with an option to disable it).
There are various ways how you sometimes can not have this options included, e.g. by changing how panics work, so there is no need to include this. But they seem to not work always and are not reliable.
Still lets be honest building any binaries you plan to distribute not in CI or at least a container is generally a terrible idea so in practice this shouldn't be to much of an issue, which is also why no one bothered fixing it in 4 years (Rust isn't sold by a company, so if anyone wants fixes they either need to do them themself or hope someone else happen to fix them because they are interested in it being fixed).