aboutsummaryrefslogtreecommitdiff
path: root/src/common
Commit message (Collapse)AuthorAge
...
* | | | | | | Never run crypto_early_init() more than onceRoger Dingledine2014-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we had set up all the infrastructure to avoid calling it after the first time, but didn't actually use it.
* | | | | | | Merge remote-tracking branch 'public/bug9683_rebased'Nick Mathewson2014-03-23
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | |
| * | | | | | Test code for implementation of faster circuit_unlink_all_from_channelNick Mathewson2014-03-14
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This contains the obvious implementation using the circuitmux data structure. It also runs the old (slow) algorithm and compares the results of the two to make sure that they're the same. Needs review and testing.
* / / / / / whitespace fixRoger Dingledine2014-03-23
|/ / / / /
* | | | | Fix some leaks/missed checks in the unit testsNick Mathewson2014-03-13
| | | | | | | | | | | | | | | | | | | | Coverity spotted these.
* | | | | Fix whitespace errors, all of them mine.Nick Mathewson2014-03-05
| | | | |
* | | | | Merge branch 'bug10169_025_v2'Nick Mathewson2014-03-04
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/test/test.c
| * \ \ \ \ Merge remote-tracking branch 'public/bug10169_024' into bug10169_025_v2Nick Mathewson2014-03-04
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/compat_libevent.h src/or/relay.c
| | * \ \ \ \ Merge remote-tracking branch 'public/bug10169_023' into bug10169_024Nick Mathewson2014-03-04
| | |\ \ \ \ \ | | | |_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | Conflicts: src/or/relay.c
| | | * | | | Monotonize the OOM-killer data timersNick Mathewson2014-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a couple of places, to implement the OOM-circuit-killer defense against sniper attacks, we have counters to remember the age of cells or data chunks. These timers were based on wall clock time, which can move backwards, thus giving roll-over results for our age calculation. This commit creates a low-budget monotonic time, based on ratcheting gettimeofday(), so that even in the event of a time rollback, we don't do anything _really_ stupid. A future version of Tor should update this function to do something even less stupid here, like employ clock_gettime() or its kin.
| * | | | | | Add tests for buffer time tracking.Nick Mathewson2014-02-12
| | | | | | |
* | | | | | | Write hashed bridge fingerprint to logs and to disk.Karsten Loesing2014-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements #10884.
* | | | | | | Trivial comment fix.Nick Mathewson2014-02-25
| | | | | | |
* | | | | | | Threadproof our log_backtrace implementationNick Mathewson2014-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible for two threads to hit assertion failures at the same time. If that happens, let's keep them from stomping on the same cb_buf field. Fixes bug 11048; bugfix on 0.2.5.2-alpha. Reported by "cypherpunks".
* | | | | | | fixed long -> int implicit cast warning line 3453Nick Hopper2014-02-20
| | | | | | |
* | | | | | | Merge branch 'bug4900_siphash_v2'Nick Mathewson2014-02-15
|\ \ \ \ \ \ \
| * | | | | | | Randomize the global siphash key at startupNick Mathewson2014-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completes our conversion to using siphash for our hash functions.
| * | | | | | | Split crypto_global_init() into pre/post configNick Mathewson2014-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's increasingly apparent that we want to make sure we initialize our PRNG nice and early, or else OpenSSL will do it for us. (OpenSSL doesn't do _too_ bad a job, but it's nice to do it ourselves.) We'll also need this for making sure we initialize the siphash key before we do any hashes.
| * | | | | | | Siphash-2-4 is now our hash in nearly all cases.Nick Mathewson2014-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've made an exception for cases where I'm sure that users can't influence the inputs. This is likely to cause a slowdown somewhere, but it's safer to siphash everything and *then* look for cases to optimize. This patch doesn't actually get us any _benefit_ from siphash yet, since we don't really randomize the key at any point.
| * | | | | | | Get csiphash better integrated with our build systemNick Mathewson2014-02-12
| |/ / / / / /
* | | | | | | Remove a bunch of functions that were never called.Nick Mathewson2014-02-15
| | | | | | |
* | | | | | | Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson2014-02-15
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | / / | | |_|_|/ / | |/| | | |
| * | | | | gcc/clang: Mark macro-generated functions as possible unusedSebastian Hahn2014-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang 3.4 introduced a new by-default warning about unused static functions, which we triggered heavily for the hashtable and map function generating macros. We can use __attribute__ ((unused)) (thanks nickm for the suggestion :-) ) to silence these warnings.
| * | | | | Some anti-forensics paranoia...Florent Daigniere2014-02-06
| |/ / / / | | | | | | | | | | | | | | | sed -i 's/BN_free/BN_clear_free/g'
* | | / / Explain CURVE25519_ENABLED: closes 9774Nick Mathewson2014-02-07
| |_|/ / |/| | |
* | | | Some anti-forensics paranoia...Florent Daigniere2014-02-03
| | | | | | | | | | | | | | | | sed -i 's/BN_free/BN_clear_free/g'
* | | | Add a sandbox rule to allow IP_TRANSPARENTNick Mathewson2014-02-02
| | | |
* | | | whitespace fixesNick Mathewson2014-01-17
| | | |
* | | | Fix some seccomp2 issuesNick Mathewson2014-01-06
| | | | | | | | | | | | | | | | | | | | Fix for #10563. This is a compatibility issue with libseccomp-2.1. I guess you could call it a bugfix on 0.2.5.1?
* | | | Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson2013-12-18
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/common/crypto.c
| * | | Never allow OpenSSL engines to replace the RAND_SSLeay methodNick Mathewson2013-12-18
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug 10402, where the rdrand engine would use the rdrand instruction, not as an additional entropy source, but as a replacement for the entire userspace PRNG. That's obviously stupid: even if you don't think that RDRAND is a likely security risk, the right response to an alleged new alleged entropy source is never to throw away all previously used entropy sources. Thanks to coderman and rl1987 for diagnosing and tracking this down.
* | | Set CREATE_NO_WINDOW in tor_spawn_background.David Fifield2013-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag prevents the creation of a console window popup on Windows. We need it for pluggable transport executables--otherwise you get blank console windows when you launch the 3.x browser bundle with transports enabled. http://msdn.microsoft.com/en-us/library/ms684863.aspx#CREATE_NO_WINDOW The browser bundles that used Vidalia used to set this flag when launching tor itself; it was apparently inherited by the pluggable transports launched by tor. In the 3.x bundles, tor is launched by some JavaScript code, which doesn't have the ability to set CREATE_NO_WINDOW. tor itself is now being compiled with the -mwindows option, so that it is a GUI application, not a console application, and doesn't show a console window in any case. This workaround doesn't work for pluggable transports, because they need to be able to write control messages to stdout. https://trac.torproject.org/projects/tor/ticket/9444#comment:30
* | | Restore prop198 behavior from 4677 patchNick Mathewson2013-11-25
| | | | | | | | | | | | | | | | | | | | | | | | The previous commit from piet would have backed out some of proposal 198 and made servers built without the V2 handshake not use the unrestricted cipher list from prop198. Bug not in any released Tor.
* | | Restore ability to build with V2_HANDSHAKE_SERVERNick Mathewson2013-11-25
| | | | | | | | | | | | Fixes bug 4677; bugfix on 0.2.3.2-alpha. Fix by "piet".
* | | Avoid warning about impossible check for flags & 0Nick Mathewson2013-11-22
| | | | | | | | | | | | Fixes CID 743381
* | | Handle unlikely negative time in tor_log_err_sigsafeNick Mathewson2013-11-22
| | | | | | | | | | | | Coverity wants this; CID 1130990.
* | | Add a _GNU_SOURCE definition to backtrace.c to fix compilationNick Mathewson2013-11-18
| | |
* | | Whoops -- add missing defined().Nick Mathewson2013-11-18
| | |
* | | Make header includes match declarations in pc_from_ucontext.m4Nick Mathewson2013-11-18
| | | | | | | | | | | | | | | | | | With any luck, this will clean up errors where we detect that REG_{EIP,RIP} is present in autoconf, but when we go to include it, it isn't there.
* | | Fix compilation under openssl 0.9.8Nick Mathewson2013-11-18
| | | | | | | | | | | | | | | | | | | | | It's not nice to talk about NID_aes_{128,256}_{ctr,gcm} when they don't exist. Fix on 84458b79a78ea7e26820bf0; bug not in any released Tor.
* | | Fix whitespaceNick Mathewson2013-11-18
| | |
* | | Log more OpenSSL engine statuses at startup.Nick Mathewson2013-11-18
| | | | | | | | | | | | Fixes ticket 10043; patch from Joshua Datko.
* | | Merge branch 'backtrace_squashed'Nick Mathewson2013-11-18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/sandbox.c src/common/sandbox.h src/common/util.c src/or/main.c src/test/include.am src/test/test.c
| * | | Refactor format_*_number_sigsafe to have a common implementationNick Mathewson2013-11-18
| | | |
| * | | Reseolve DOCDOC and XXXXs in backtrace.cNick Mathewson2013-11-18
| | | |
| * | | Make backtrace handler handle signals correctly.Nick Mathewson2013-11-18
| | | | | | | | | | | | | | | | | | | | This meant moving a fair bit of code around, and writing a signal cleanup function. Still pretty nice from what I can tell, though.
| * | | Improve new assertion message loggingNick Mathewson2013-11-18
| | | | | | | | | | | | | | | | | | | | Don't report that a failure happened in the assertion_failed function just because we logged it from there.
| * | | Add a sighandler-safe logging mechanismNick Mathewson2013-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had accidentially grown two fake ones: one for backtrace.c, and one for sandbox.c. Let's do this properly instead. Now, when we configure logs, we keep track of fds that should get told about bad stuff happening from signal handlers. There's another entry point for these that avoids using non-signal-handler-safe functions.
| * | | Basic backtrace abilityNick Mathewson2013-11-18
| | | | | | | | | | | | | | | | | | | | | | | | On platforms with the backtrace/backtrace_symbols_fd interface, Tor can now dump stack traces on assertion failure. By default, I log them to DataDir/stack_dump and to stderr.
| * | | Refactor the assertion-failure code into a functionNick Mathewson2013-07-19
| | | |