diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-11 09:44:07 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-11 09:46:29 -0500 |
commit | f5f6d13e4cc0d8e823888694bb2c3415d80690ab (patch) | |
tree | 61e8449c06d010ab1ee5f9e442fdcab086c5446c /src/common/sandbox.c | |
parent | 0c81dfa848da160b02818771626a425cd27b86bc (diff) | |
download | tor-f5f6d13e4cc0d8e823888694bb2c3415d80690ab.tar.gz tor-f5f6d13e4cc0d8e823888694bb2c3415d80690ab.zip |
Fix crash on glibc __libc_message()
__libc_message() tries to open /dev/tty with O_RDWR, but the sandbox
catches that and calls it a crash. Instead, I'm making the sandbox
setenv LIBC_FATAL_STDERR_, so that glibc uses stderr instead.
Fix for 14759, bugfix on 0.2.5.1-alpha
Diffstat (limited to 'src/common/sandbox.c')
-rw-r--r-- | src/common/sandbox.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c index 450b04a6f7..57847e1376 100644 --- a/src/common/sandbox.c +++ b/src/common/sandbox.c @@ -1676,6 +1676,9 @@ register_cfg(sandbox_cfg_t* cfg) static int initialise_libseccomp_sandbox(sandbox_cfg_t* cfg) { + /* Prevent glibc from trying to open /dev/tty on fatal error */ + setenv("LIBC_FATAL_STDERR_", "1", 1); + if (install_sigsys_debugging()) return -1; |