Uh oh!
There was an error while loading. Please reload this page.
Don't use env::current_exe with libbacktrace - #33554
Conversation
There was a problem hiding this comment.
Could you elaborate here and indicate that it's a security concern for not reading an arbitrary executable? Basically emphasize the facts of:
- You can probably trick
current_exeto point at any file, or rather that's the worst case. - There's been at least one bug reported in libbacktrace for corrupt dwarf info
- We don't know of any other vulnerabilities, but at worse we assume that arbitrary code execution is possible with corrupt dwarf info to libbacktrace (until we find evidence to the contrary)
And thus we don't pass a pathname to libbacktrace
semarie
commented
May 11, 2016
I agree with the comment of @alexcrichton. I expect also some tests should be marked ignored for some platforms (like |
sfackler
commented
May 11, 2016
Updated. I fixed run-pass/backtrace-debuginfo.rs - I guess we'll let the builders find out what other tests need to be fixed. |
alexcrichton
commented
May 11, 2016
…hton Don't use env::current_exe with libbacktrace If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc rust-lang#21889 r? @alexcrichton cc @semarie
nagisa
commented
May 12, 2016
This is probably the cause for http://buildbot.rust-lang.org/builders/auto-win-gnu-64-nopt-t/builds/4202/steps/test/logs/stdio. (rollup #33589) |
If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc rust-lang#21889
sfackler
commented
May 12, 2016
Thanks, fixed. @bors r=alexcrichton |
bors
commented
May 12, 2016
📌 Commit 9393e52 has been approved by |
…hton Don't use env::current_exe with libbacktrace If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc rust-lang#21889 r? @alexcrichton cc @semarie
…hton Don't use env::current_exe with libbacktrace If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc rust-lang#21889 r? @alexcrichton cc @semarie
alexcrichton
commented
May 17, 2016
Accepted for backport at libs triage |
| // be in "permanent memory", so we copy it to a static and then use the | ||
| // static as the pointer. | ||
| // Things don't work so well on not-Linux since libbacktrace can't track | ||
| // down that executable this is. We at one point used env::current_exe but |
There was a problem hiding this comment.
is this meant to say: "down what executable this is. ..." ?
If the path we give to libbacktrace doesn't actually correspond to the
current process, libbacktrace will segfault at best.
cc #21889
r? @alexcrichton
cc @semarie