summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-26test/addr: Add unit tests for the fixes in 30721teor
2019-06-26address/resolve: Require square brackets on IPv6 address:portsteor
When parsing addreses via Tor's internal address:port parsing and DNS lookup APIs, require IPv6 addresses with ports to have square brackets. But allow IPv6 addresses without ports, whether or not they have square brackets. Fixes bug 30721; bugfix on 0.2.1.5-alpha.
2019-06-26address/resolve: try harder to avoid returning uninitialised datateor
Cleanup after 30721.
2019-06-26resolve: split sub-functions out of tor_addr_lookup()teor
And remove the practracker exception for tor_addr_lookup(). Cleanup after 30721.
2019-06-26resolve: refactor address family logic in tor_addr_lookup()teor
Cleanup after 30721.
2019-06-26resolve: consistently parse IP addresses in square bracketsteor
When parsing addreses via Tor's internal DNS lookup API: * reject IPv4 addresses in square brackets (with or without a port), * accept IPv6 addresses in square brackets (with or without a port), and * accept IPv6 addresses without square brackets, as long as they have no port. This change completes the work started in 23082, making address parsing consistent between tor's internal DNS lookup and address parsing APIs. Fixes bug 30721; bugfix on 0.2.1.5-alpha.
2019-06-01fix some simple typosRoger Dingledine
2019-05-30Merge branch 'tor-github/pr/1059'George Kadianakis
2019-05-30Merge branch 'tor-github/pr/1057'David Goulet
2019-05-30changes file for 30629Nick Mathewson
2019-05-30Merge branch 'tor-github/pr/1055'David Goulet
2019-05-30Merge branch 'tor-github/pr/1054'David Goulet
2019-05-30Merge branch 'tor-github/pr/1049'David Goulet
2019-05-29Merge branch 'tor-github/pr/1032'George Kadianakis
2019-05-29Merge branch 'tor-github/pr/1037'George Kadianakis
2019-05-29Merge branch 'maint-0.4.0'George Kadianakis
2019-05-29Merge branch 'tor-github/pr/924' into maint-0.4.0George Kadianakis
2019-05-29Shutdown libevent _after_ the subsystems.Nick Mathewson
This is necessary since shutting down libevent frees some pointer that the subsystems want to free themselves. A longer term solution will be to turn the evloop module into a subsystem itself, but for now it is best to do the minimal fix. Fixes bug 30629; bugfix on 0.4.1.1-alpha.
2019-05-29Remove want_cmddata from HSFETCH, which does not in fact want dataNick Mathewson
This looks a copy-and-paste error to me. Fixes bug 30646; bugfix on 0.4.1.1-alpha.
2019-05-29Merge branch 'ticket30561_029' into ticket30561_035Nick Mathewson
2019-05-29Tweak comments in tor_vasprintf(), and add a changes file for 30651Nick Mathewson
2019-05-29Fixed tor_vasprintf on systems without vasprintf.Tobias Stoeckmann
If tor is compiled on a system with neither vasprintf nor _vscprintf, the fallback implementation exposes a logic flaw which prevents proper usage of strings longer than 127 characters: * tor_vsnprintf returns -1 if supplied buffer is not large enough, but tor_vasprintf uses this function to retrieve required length * the result of tor_vsnprintf is not properly checked for negative return values Both aspects together could in theory lead to exposure of uninitialized stack memory in the resulting string. This requires an invalid format string or data that exceeds integer limitations. Fortunately tor is not even able to run with this implementation because it runs into asserts early on during startup. Also the unit tests fail during a "make check" run. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> [backported to 0.2.9 by nickm]
2019-05-29Changes file for bug 30614Nick Mathewson
2019-05-29Use MAP_INHERIT_ZERO or MAP_INHERIT_NONE if available.Taylor R Campbell
Fixes assertion failure in tests on NetBSD: slow/prob_distr/stochastic_log_logistic: [forking] May 25 03:56:58.091 [err] tor_assertion_failed_(): Bug: src/lib/crypt_ops/crypto_rand_fast.c:184: crypto_fast_rng_new_from_seed: Assertion inherit != INHERIT_RES_KEEP failed; aborting. (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61) May 25 03:56:58.091 [err] Bug: Assertion inherit != INHERIT_RES_KEEP failed in crypto_fast_rng_new_from_seed at src/lib/crypt_ops/crypto_rand_fast.c:184: . (Stack trace not available) (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61) [Lost connection!]
2019-05-28Trivial fix for a trivial warning with gcc 9.1.1Nick Mathewson
Fix on 4e3d144fb0940d8ee5a89427d471ea3656e8e122; bug not in any released Tor.
2019-05-28Merge branch 'tor-github/pr/1047'David Goulet
2019-05-27Merge branch 'tor-github/pr/1042'George Kadianakis
2019-05-27Merge branch 'tor-github/pr/1043'George Kadianakis
2019-05-27Tests for deciding how full our relay cells should beNick Mathewson
2019-05-27Make sure that we send at least some random data in RELAY_DATA cellsNick Mathewson
Proposal 289 prevents SENDME-flooding by requiring the other side to authenticate the data it has received. But this data won't actually be random if they are downloading a known resource. "No problem", we said, "let's fell the empty parts of our cells with some randomness!" and we did that in #26871. Unfortunately, if the relay data payloads are all completely full, there won't be any empty parts for us to randomize. Therefore, we now pick random "randomness windows" between CIRCWINDOW_INCREMENT/2 and CIRCWINDOW_INCREMENT. We remember whether we have sent a cell containing at least 16 bytes of randomness in that window. If we haven't, then when the window is exhausted, we send one. (This window approach is designed to lower the number of rng checks we have to do. The number 16 is pulled out of a hat to change the attacker's guessing difficulty to "impossible".) Implements 28646.
2019-05-26trivial whitespace fixesRoger Dingledine
2019-05-24changes file for test coverageNick Mathewson
2019-05-23cov-test-determinism: use the same RNG seed as in travis.ymlNick Mathewson
We added this facility so that we could get deterministic PRNG behavior for coverage testing on tests that use a replaced PRNG. We need to have our coverage determinism tool test for this as well.
2019-05-23Coverage: do not include test-rebind in coverage builds.Nick Mathewson
Because it invokes the Tor mainloop, it does unpredictable things to test coverage of a lot of code that it doesn't actually test at all. (It is more an integration test than anything else.)
2019-05-23In coverage builds, use branch-free timeradd() and timersub()Nick Mathewson
The ordinary definitions of timeradd() and timersub() contain a branch. However, in coverage builds, this means that we get spurious complaints about partially covered basic blocks, in a way that makes our coverage determinism harder to check.
2019-05-23In coverage builds, avoid basic-block complexity in log_debugNick Mathewson
Ordinarily we skip calling log_fn(LOG_DEBUG,...) if debug logging is completely disabled. However, in coverage builds, this means that we get spurious complaints about partially covered basic blocks, in a way that makes our coverage determinism harder to check.
2019-05-23Merge branch 'tor-github/pr/1022'David Goulet
2019-05-23Merge branch 'tor-github/pr/1034'David Goulet
2019-05-23Merge branch 'tor-github/pr/988'David Goulet
2019-05-23Extract length-deciding function from package_raw_inbuf.Nick Mathewson
2019-05-23refactor logic to decide how much to package from inbufRoger Dingledine
no actual changes in behavior
2019-05-23Only reject POSTDESCRIPTOR purpose= when the purpose is unrecognizedNick Mathewson
Fixes bug 30580; bugfix on 0.4.1.1-alpha.
2019-05-22Now this repository is full of 0.4.1.1-alpha-devNick Mathewson
2019-05-22circuitpadding tests: Use tt_i64_op() to compare int64_t valuestor-0.4.1.1-alphaNick Mathewson
Bug not in any released Tor.
2019-05-22More 0.4.1.1-alpha hangelogs editsNick Mathewson
(credit to seborn here)
2019-05-22Fold last entry into changelogNick Mathewson
2019-05-22Bump to 0.4.1.1-alphaNick Mathewson
2019-05-22Merge remote-tracking branch 'dgoulet/ticket30454_035_01'Nick Mathewson
2019-05-22Merge branch 'ticket30428_041_02_squashed'Nick Mathewson
2019-05-22sendme: Add non fatal asserts for extra safetyDavid Goulet
Two non fatal asserts are added in this commit. First one is to see if the SENDME digest list kept on the circuit for validation ever grows bigger than the maximum number of expected SENDME on a circuit (currently 10). The second one is to know if we ever send more than one SENDME at a time on a circuit. In theory, we shouldn't but if we ever do, the v1 implementation wouldn't work because we only keep one single cell digest (the previous cell to the SENDME) on the circuit/cpath. Thus, sending two SENDME consecutively will lead to a mismatch on the other side because the same cell digest would be use and thus the circuit would collapse. Finally, add an extra debug log in case we emit a v0 which also includes the consensus emit version in that case. Part of #30428 Signed-off-by: David Goulet <dgoulet@torproject.org>