aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-10-21Merge remote-tracking branch 'tor-github/pr/1422' into maint-0.4.2teor
2019-10-21Merge remote-tracking branch 'tor-github/pr/1432' into maint-0.4.2teor
2019-10-21Merge remote-tracking branch 'tor-github/pr/1354' into maint-0.4.2teor
2019-10-20hibernate: Fix repeated "bytes" in commentteor
2019-10-20test/rebind: Make control formatting and log parsing more robustteor
* actually sleep when tor has not logged anything * log at debug level when waiting for tor to log something * backslash-replace bad UTF-8 characters in logs * format control messages as ASCII: tor does not accept UTF-8 control commands Fixes bug 31837; bugfix on 0.3.5.1-alpha.
2019-10-20err: Use the correct type for cb_bufteor
Fixes bug 32060; bug not in any released version of tor. Resolves CID 1454761.
2019-10-20fix easy typosRoger Dingledine
2019-10-18Merge remote-tracking branch 'tor-github/pr/1426' into maint-0.4.2Nick Mathewson
2019-10-18Merge remote-tracking branch 'tor-github/pr/1396' into maint-0.4.2Nick Mathewson
2019-10-18Merge branch 'maint-0.4.2' of git-rw.torproject.org:/tor into maint-0.4.2Nick Mathewson
2019-10-17Remove overly strict assertions in transports.c.Alexander Færøy
This patch removes an overly strict tor_assert() and an ignorable BUG() expression. Both of these would trigger if a PT was unable to configure itself during startup. The easy way to trigger this is to configure an obfs4 bridge where you make the obfs4 process try to bind on a port number under 1024. See: https://bugs.torproject.org/31091
2019-10-17Add test to check if the exit callback is called in process_t upon ↵Alexander Færøy
process_exec() failures. This patch adds a test to check for whether the exit callback is always called when process_exec() fails, both on Windows and Unix. See: https://bugs.torproject.org/31810
2019-10-17Ensure that the exit callback is called if CreateProcessA() fails on Windows.Alexander Færøy
This patch fixes an issue where the exit handler is not called for the given process_t in case CreateProcessA() fails. This could, for example, happen if the user tries to execute a binary that does not exist. See: https://bugs.torproject.org/31810
2019-10-17Handle errors from execve() in the Unix process backend more gracefully.Alexander Færøy
This patch removes a call to tor_assert_unreached() after execve() failed. This assertion leads to the child process emitting a stack trace on its standard output, which makes the error harder for the user to demystify, since they think it is an internal error in Tor instead of "just" being a "no such file or directory" error. The process will now instead output "Error from child process: X" where X is the stringified version of the errno value. See: https://bugs.torproject.org/31810
2019-10-17mainloop: Disable periodic events before a destroyDavid Goulet
When tearing down all periodic events during shutdown, disable them first so their enable flag is updated. This allows the tor_api.h to relaunch tor properly after a clean shutdown. Fixes #32058 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-15hs-v3: Fix possible memory leak in error code pathDavid Goulet
Found by coverity CID 1454769. There were a second possible leak that is also fixed in this commit. Fixes #32063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-14Merge remote-tracking branch 'tor-github/pr/1393' into maint-0.4.2Nick Mathewson
2019-10-11Merge branch 'ticket31682_042_01_squashed'Nick Mathewson
2019-10-11Correct comment on build_establish_intro_dos_extensionNick Mathewson
2019-10-11hs-v3: Fix implicit ssize_t to size_t conversionDavid Goulet
Found by Coverity. Fixes #31682 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-09Merge remote-tracking branch 'tor-github/pr/1394'Nick Mathewson
2019-10-09Merge remote-tracking branch 'tor-github/pr/1399'Nick Mathewson
2019-10-09Merge remote-tracking branch 'tor-github/pr/1401'Nick Mathewson
2019-10-09Merge branch 'bug30344_squashed_035'Nick Mathewson
2019-10-09Stop libevent from reading data from closed connections.George Kadianakis
Code adapted from Rob's proposed patch in #30344. Also add a comment in connection_mark_for_close_internal_() on why we should not be adding extra code there without a very good reason.
2019-10-08test: New behavior on IP retry for HSv3Neel Chauhan
Unit test for #31652 where if we are over the retry limit for the IP but we have an established circuit, we don't remove the IP. Part of #31652
2019-10-08hs-v3: Do not remove intro point if circuit existsDavid Goulet
When considering introduction point of a service's descriptor, do not remove an intro point that has an established or pending circuit. Fixes #31652 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-08Fix flapping of test_service_intro_point() unittest.George Kadianakis
2019-10-07Merge remote-tracking branch 'tor-github/pr/1317'Nick Mathewson
2019-10-07Merge branch 'ticket31548_035_01_squashed'Nick Mathewson
2019-10-07hs-v3: Make service pick the exact amount of intro pointsDavid Goulet
When encoding introduction points, we were not checking if that intro points had an established circuit. When botting up, the service will pick, by default, 3 + 2 intro points and the first 3 that establish, we use them and upload the descriptor. However, the intro point is removed from the service descriptor list only when the circuit has opened and we see that we have already enough intro points, it is then removed. But it is possible that the service establishes 3 intro points successfully before the other(s) have even opened yet. This lead to the service encoding extra intro points in the descriptor even though the circuit is not opened or might never establish (#31561). Fixes #31548 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-07Merge remote-tracking branch 'tor-github/pr/1379'Nick Mathewson
2019-10-07bump to 0.4.2.2-alpha-devNick Mathewson
2019-10-04Use {mock,unmock}_hostname_resolver() in relevant testsNick Mathewson
These tests all invoke the hostname resolver in one way or another, and therefore potentially block if our DNS server is missing, absent, or extremely slow. Closes ticket 31841.
2019-10-04Add a mock replacement for blocking hostname resolutionNick Mathewson
Based on examination of our tests, this mock function accepts "localhost" and "torproject.org", and rejects everything else.
2019-10-04Make tor_addr_lookup_host_impl mockable.Nick Mathewson
2019-10-04tls: Log TLS read buffer length bugs onceteor
Rather than filling the logs with similar warnings. Fixes bug 31939; bugfix on 0.3.0.4-rc.
2019-10-04Merge remote-tracking branch 'tor-github/pr/1392'teor
2019-10-03hs: ADD_ONION NEW:BEST now defaults to ED25519-V3David Goulet
From RSA1024 (v2) to v3 now. Closes #29669 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-03Merge branch 'tor-github/pr/1377'George Kadianakis
2019-10-03Merge branch 'tor-github/pr/1276'George Kadianakis
2019-10-03Unit tests for dirserv_reject_tor_version().Nick Mathewson
2019-10-03Authorities reject relays running unsupported Tor release series.Nick Mathewson
Our minimum version is now 0.2.9.5-alpha. Series 0.3.0, 0.3.1, 0.3.2, 0.3.3, and 0.3.4 are now rejected. Also, extract this version-checking code into a new function, so we can test it. Closes ticket 31549. Also reject 0.3.5.0 through 0.3.5.6-rc as unstable.
2019-10-03bump to 0.4.2.2-alphaNick Mathewson
2019-10-03Merge remote-tracking branch 'tor-github/pr/1358'Nick Mathewson
2019-10-03Merge remote-tracking branch 'tor-github/pr/1382'Nick Mathewson
2019-10-03Unify backend implementations for blocking hostname lookupNick Mathewson
We have a getaddrinfo() implementation that we prefer, and a gethostbyname*() implementation that we fall back on. Give them both the same interface, and let them be called by the same name. This is a preparatory step for making them both mockable.
2019-10-03util/map_anon_nofork: Add a cast to avoid passing -48 to memsetNick Mathewson
This fixes coverity CID 1454593, and bug 31948. Bug not in any released version of Tor.
2019-10-03control/control: Refactor some error handling codeteor
Split some protocol error handling out of connection_control_process_inbuf(). This refactor reduces the size of a practracker exception. Closes 31840.
2019-10-02Merge remote-tracking branch 'tor-github/pr/1374'Nick Mathewson