aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-12Fix a compiler warning in aes.c.Nick Mathewson
Apparently some freebsd compilers can't tell that 'c' will never be used uninitialized. Fixes bug 28413; bugfix on 0.2.9.3-alpha when we added support for longer AES keys to this function.
2018-11-11Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-11-11Fix a bug in usage of SSL_set1_groups_list()Nick Mathewson
Apparently, even though the manpage says it returns an int, it can return a long instead and cause a warning. Bug not in any released Tor. Part of #28399
2018-11-11Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-11-11Update geoip and geoip6 to the November 6 2018 database.Karsten Loesing
2018-11-09Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-11-09Merge branch 'bug28245_029' into maint-0.2.9Nick Mathewson
2018-11-09Always declare groups when building with openssl 1.1.1 APIsNick Mathewson
Failing to do on clients was causing TLS 1.3 negotiation to fail. Fixes bug 28245; bugfix on 0.2.9.15, when we added TLS 1.3 support.
2018-11-02Merge branch 'bug26470_032' into maint-0.3.3Nick Mathewson
2018-11-02Merge remote-tracking branch 'dgoulet/ticket27410_032_01' into maint-0.3.3Nick Mathewson
2018-10-31Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-10-31Merge remote-tracking branch 'tor-github/pr/436' into maint-0.2.9Nick Mathewson
2018-10-30Merge remote-tracking branch 'tor-github/pr/346' into maint-0.3.3Nick Mathewson
2018-10-25Merge branch 'bug28202_029' into bug28202_033Nick Mathewson
2018-10-25Fix two other cases of (buf + N > end) patternNick Mathewson
Related to fix for 28202.
2018-10-25Fix possible UB in an end-of-string check in get_next_token().Nick Mathewson
Remember, you can't check to see if there are N bytes left in a buffer by doing (buf + N < end), since the buf + N computation might take you off the end of the buffer and result in undefined behavior. Fixes 28202; bugfix on 0.2.0.3-alpha.
2018-10-23Remove a now-unused rust "use".Nick Mathewson
2018-10-23Merge remote-tracking branch 'onionk/rust-allsupportednull1' into maint-0.3.3Nick Mathewson
2018-10-23Treat backtrace test failures as expected on most BSD-derived systemsteor
Treat backtrace test failures as expected on NetBSD, OpenBSD, and macOS/Darwin, until we solve bug 17808. (FreeBSD failures have been treated as expected since 18204 in 0.2.8.) Fixes bug 27948; bugfix on 0.2.5.2-alpha.
2018-10-17Log more info for duplicate ed25519 IDsTaylor Yu
Occasionally, key pinning doesn't catch a relay that shares an ed25519 ID with another relay. Log the identity fingerprints and the shared ed25519 ID when this happens, instead of making a BUG() warning. Fixes bug 27800; bugfix on 0.3.2.1-alpha.
2018-10-15Fix another tor_assert(0) caseNick Mathewson
2018-10-15Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-10-15Fix make check-spaces.Nick Mathewson
2018-10-15Adjust tor_assert_unreached()Nick Mathewson
This version of the macro makes it obvious to the compiler that "tor_assert_unreached()" will always abort().
2018-10-15Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-10-15Merge branch 'bug27709_029' into maint-0.2.9Nick Mathewson
2018-10-15Explain a bit more about branch prediction in the unit-test caseNick Mathewson
2018-10-10Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-10-10Merge remote-tracking branch 'tor-github/pr/392' into maint-0.2.9Nick Mathewson
2018-10-10Merge remote-tracking branch 'teor/bug27738-032' into bug27738-033Taylor Yu
2018-10-10Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-10-10Update geoip and geoip6 to the October 9 2018 database.Karsten Loesing
2018-09-24hs-v3: Silence some logging for client authorizationDavid Goulet
If a tor client gets a descriptor that it can't decrypt, chances are that the onion requires client authorization. If a tor client is configured with client authorization for an onion but decryption fails, it means that the configured keys aren't working anymore. In both cases, we'll log notice the former and log warn the latter and the rest of the decryption errors are now at info level. Two logs statement have been removed because it was redundant and printing the fetched descriptor in the logs when 80% of it is encrypted wat not helping. Fixes #27550 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-24Merge branch 'maint-0.3.3' of https://git.torproject.org/tor into maint-0.3.3David Goulet
2018-09-21Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-09-21Merge branch 'maint-0.2.9' into maint-0.3.2maint-0.3.2Nick Mathewson
2018-09-21rust/protover: return C-allocated string in protover_all_supported()cypherpunks
The result of CString::into_raw() is not safe to free with free() except under finicky and fragile circumstances that we definitely don't meet right now. This was missed in be583a34a3815c2c10e86094ab0610e4b7f9c869.
2018-09-21rust/protover: fix null deref in protover_all_supported()cypherpunks
Fortunately with the current callers it couldn't happen in practice. Fix on d1820c1516a31a149fc51a9e5126bf899e4c4e08.
2018-09-20Merge branch 'maint-0.3.3' of https://git.torproject.org/tor into maint-0.3.3David Goulet
2018-09-20hs-v3: Close all SOCKS request on descriptor failureDavid Goulet
Client side, when a descriptor is finally fetched and stored in the cache, we then go over all pending SOCKS request for that descriptor. If it turns out that the intro points are unusable, we close the first SOCKS request but not the others for the same .onion. This commit makes it that we'll close all SOCKS requests so we don't let hanging the other ones. It also fixes another bug which is having a SOCKS connection in RENDDESC_WAIT state but with a descriptor in the cache. At some point, tor will expire the intro failure cache which will make that descriptor usable again. When retrying all SOCKS connection (retry_all_socks_conn_waiting_for_desc()), we won't end up in the code path where we have already the descriptor for a pending request causing a BUG(). Bottom line is that we should never have pending requests (waiting for a descriptor) with that descriptor in the cache (even if unusable). Fixees #27410. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-20Merge branch 'maint-0.3.2' of https://git.torproject.org/tor into maint-0.3.2David Goulet
2018-09-18Merge remote-tracking branch 'onionk/rust-allsupported1' into maint-0.3.3Nick Mathewson
2018-09-18Travis: use the Homebrew addon for xz and zstdteor
xz and zstd were added as optional dependencies in 0.3.1.1-alpha. Implements ticket 27738.
2018-09-18Merge branch 'bug27738-029' into bug27738-032teor
Resolve conflicts due to modified comments, and deleted lines.
2018-09-18Travis: use the Homebrew addonteor
Use the Travis Homebrew addon to install packages on macOS. The package list is the same, but the Homebrew addon does not do a `brew update` by default. This makes builds faster, at the cost of using slightly older packages. Implements ticket 27738.
2018-09-17Remove extraneous argument from Rust protover_compute_vote()Nick Mathewson
This argument was added to match an older idea for the C api, but we decided not to do it that way in C. Fixes bug 27741; bugfix on 0.3.3.6 / TROVE-2018-005 fix.
2018-09-17Make CacheDirectoryGroupReadable an autobool.Nick Mathewson
Since the default cache directory is the same as the default data directory, we don't want the default CacheDirectoryGroupReadable value (0) to override an explicitly set "DataDirectoryGroupReadable 1". To fix this, I'm making CacheDirectoryGroupReadable into an autobool, and having the default (auto) value mean "Use the value of DataDirectoryGroupReadable if the directories are the same, and 0 otherwise." Fixes bug 26913; bugfix on 0.3.3.1-alpha when the CacheDirectory option was introduced.
2018-09-14Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-09-14hs-v3: Don't BUG() on directory permission check failureDavid Goulet
In hs_config.c, we do validate the permission of the hidden service directory but we do not try to create it. So, in the event that the directory doesn't exists, we end up in the loading key code path which checks for the permission and possibly creates the directory. On failure, don't BUG() since there is a perfectly valid use case for that function to fail. Fixes #27335 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-14Revise our assertion and bug macros to work with -WparenthesesNick Mathewson
On GCC and Clang, there's a feature to warn you about bad conditionals like "if (a = b)", which should be "if (a == b)". However, they don't warn you if there are extra parentheses around "a = b". Unfortunately, the tor_assert() macro and all of its kin have been passing their inputs through stuff like PREDICT_UNLIKELY(expr) or PREDICT_UNLIKELY(!(expr)), both of which expand to stuff with more parentheses around "expr", thus suppressing these warnings. To fix this, this patch introduces new macros that do not wrap expr. They're only used when GCC or Clang is enabled (both define __GNUC__), since they require GCC's "({statement expression})" syntax extension. They're only used when we're building the unit-test variant of the object files, since they suppress the branch-prediction hints. I've confirmed that tor_assert(), tor_assert_nonfatal(), tor_assert_nonfatal_once(), BUG(), and IF_BUG_ONCE() all now give compiler warnings when their argument is an assignment expression. Fixes bug 27709. Bugfix on 0.0.6, where we first introduced the "tor_assert()" macro.