summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2018-07-09Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-07-09Merge remote-tracking branch 'github/bug26269_031' into maint-0.3.2Nick Mathewson
2018-07-09Merge remote-tracking branch 'catalyst-github/bug26455_033' into maint-0.3.3Nick Mathewson
2018-07-03Merge branch 'maint-0.2.9' into maint-0.3.2Nick Mathewson
2018-07-03Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-07-02hs_ntor_ref.py: pass only strings to subprocess.PopenNick Mathewson
Recent Python3 versions seem to require this on Windows. Fixes bug 26535; bug copied from ntor_ref.py on 0.3.1.1-alpha.
2018-07-02ntor_ref.py: pass only strings to subprocess.PopenNick Mathewson
Recent Python3 versions seem to require this on Windows. Fixes bug 26535; bug introduced in f4be34f70d6f277a0f3f73e, which was apparently intended itself as a Python3 workaround.
2018-06-29Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-06-29Fix a memory error in test_shared_randomNick Mathewson
Bug not in any released Tor.
2018-06-29Fix some memory errors in the recent coverity fixes.Nick Mathewson
Found by asan on travis :/
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge remote-tracking branch 'ahf-github/maint-0.3.2' into maint-0.3.2Nick Mathewson
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-06-29Merge remote-tracking branch 'ahf-github/maint-0.3.0' into maint-0.3.1Nick Mathewson
2018-06-29Merge remote-tracking branch 'ahf-github/maint-0.3.1' into maint-0.3.1Nick Mathewson
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-06-29Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-06-23Fix memory leak in test_sr_setup_commits().Alexander Færøy
This patch fixes a memory leak in test_sr_setup_commits() where the place_holder is allocated, but never freed again. See: Coverity CID 1437440.
2018-06-23Fix memory leak in helper_add_hsdir_to_networkstatus().Alexander Færøy
This patch fixes a memory leak in helper_add_hsdir_to_networkstatus() where the rs object might not get properly freed. See: Coverity CID 1437427.
2018-06-23Fix memory leak in new_establish_intro_cell().Alexander Færøy
This patch fixes a memory leak in new_establish_intro_cell() that could happen if a test assertion fails and the *cell_out value isn't properly free'd. See: Coverity CID 1437445
2018-06-23Fix memory leak in test_channelpadding_consensus().Alexander Færøy
The relay variable is always allocated, but might not be freed before we return from this function. See: Coverity CID 1437431
2018-06-23Fix memory link in test_link_specifier().Alexander Færøy
This patch fixes a memory leak in test_link_specifier() where ls might not get freed in case one of the test macros fails. See: Coverity CID 1437434.
2018-06-23Fix potential memory leak in hs_helper_build_hs_desc_impl().Alexander Færøy
This patch fixes a memory leak in hs_helper_build_hs_desc_impl() where if a test assertion would fail we would leak the storage that `desc` points to. See: Coverity CID 1437448
2018-06-23Fix potential memory leak in test_hs_auth_cookies().Alexander Færøy
This patch fixes a potential memory leak in test_hs_auth_cookies() if a test-case fails and we goto the done label where no memory clean up is done. See: Coverity CID 1437453
2018-06-23Fix potential memory leak in hs_helper_build_intro_point().Alexander Færøy
This patch fixes a potential memory leak in hs_helper_build_intro_point() where a `goto done` is called before the `intro_point` variable have been assigned to the value of the `ip` variable. See: Coverity CID 1437460 See: Coverity CID 1437456
2018-06-21Use correct CARGO_HOME in test_rust.shTaylor Yu
Out-of-tree builds could fail to run the rust tests if built in offline mode. cargo expects CARGO_HOME to point to the .cargo directory, not the directory containing .cargo. Fixes bug 26455; bug not in any released tor.
2018-06-16Fix a bug in my fix for #26258Nick Mathewson
The fix here is use a different bourne shell subsitution for CARGO_ONLINE, so that an empty string counts as set.
2018-06-13squash! Make sure that the test_rust.sh script fails when a test failsNick Mathewson
Also make sure that we're actually running the test from within the right cwd, like we do when we're building. This seems necessary to avoid an error when running offline. Amusingly, it appears that we had this bug before: we just weren't noticing it, because of bug 26258.
2018-06-13test_entrynodes: fix a GCC warningNick Mathewson
Some versions of GCC complain that the bfn_mock_node_get_by_id function might return NULL, but we're assuming that it won't. (We're assuming it won't return NULL because we know in the tests that we're passing it valid IDs.) To make GCC happy, tt_assert() that each node_t is set before using it. Fixes a second case of bug26269; bugfix on 0.3.0.1-alpha.
2018-05-31Make sure that the test_rust.sh script fails when a test failsNick Mathewson
Exit codes from find(1) seem not to be so reliable as we had hoped. Closes ticket 26258; bugfix on 0.3.3.4-alpha when we fixed #25560
2018-05-27Merge remote-tracking branch 'public/bug25691_033_again_squashed' into ↵Nick Mathewson
maint-0.3.3
2018-05-24Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-24Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-24Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-24Add a unit test for PEM-encrypted documents.Nick Mathewson
2018-05-22Make the TROVE-2018-005 fix work with rust.Nick Mathewson
2018-05-22Merge branch 'trove-2018-005_032' into trove-2018-005_033Nick Mathewson
2018-05-22protover: TROVE-2018-005 Fix potential DoS in protover protocol parsing.Isis Lovecruft
In protover.c, the `expand_protocol_list()` function expands a `smartlist_t` of `proto_entry_t`s to their protocol name concatenated with each version number. For example, given a `proto_entry_t` like so: proto_entry_t *proto = tor_malloc(sizeof(proto_entry_t)); proto_range_t *range = tor_malloc_zero(sizeof(proto_range_t)); proto->name = tor_strdup("DoSaaaaaaaaaaaaaaaaaaaaaa[19KB]aaa"); proto->ranges = smartlist_new(); range->low = 1; range->high = 65536; smartlist_add(proto->ranges, range); (Where `[19KB]` is roughly 19KB of `"a"` bytes.) This would expand in `expand_protocol_list()` to a `smartlist_t` containing 65536 copies of the string, e.g.: "DoSaaaaaaaaaaaaaaaaaaaaaa[19KB]aaa=1" "DoSaaaaaaaaaaaaaaaaaaaaaa[19KB]aaa=2" […] "DoSaaaaaaaaaaaaaaaaaaaaaa[19KB]aaa=65535" Thus constituting a potential resource exhaustion attack. The Rust implementation is not subject to this attack, because it instead expands the above string into a `HashMap<String, HashSet<u32>` prior to #24031, and a `HashMap<UnvalidatedProtocol, ProtoSet>` after). Neither Rust version is subject to this attack, because it only stores the `String` once per protocol. (Although a related, but apparently of too minor impact to be usable, DoS bug has been fixed in #24031. [0]) [0]: https://bugs.torproject.org/24031 * ADDS hard limit on protocol name lengths in protover.c and checks in parse_single_entry() and expand_protocol_list(). * ADDS tests to ensure the bug is caught. * FIXES #25517: https://bugs.torproject.org/25517
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-10Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-09Test read bandwidth measurements with empty filejuga0
2018-05-02Merge branch 'libressl_201805_029' into maint-0.3.3Nick Mathewson
2018-05-02LibreSSL compatibility fixes.Nick Mathewson
LibreSSL, despite not having the OpenSSL 1.1 API, does define OPENSSL_VERSION in crypto.h. Additionally, it apparently annotates some functions as returning NULL, so that our unit tests need to be more careful about checking for NULL so they don't get compilation warnings. Closes ticket 26006.
2018-04-22Repair the legacy_hs/pick_tor2web_rendezvous_node unit testNick Mathewson
It tried to pick nodes for which only routerinfo_t items are set, but without setting UseMicroDescriptors to 0. This won't work any more, now that we're strict about using the right descriptor types due to 25691/25692/25213.
2018-04-22Rename node_has_descriptor() to node_has_any_descriptor()Nick Mathewson
Changing the name of this function should help keep us from misusing it when node_has_preferred_descriptor() would be more appropriate.