Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
Recent Python3 versions seem to require this on Windows.
Fixes bug 26535; bug copied from ntor_ref.py on 0.3.1.1-alpha.
|
|
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.
|
|
|
|
|
|
|
|
Bug not in any released Tor.
|
|
Found by asan on travis :/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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
|
|
The relay variable is always allocated, but might not be freed before we
return from this function.
See: Coverity CID 1437431
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
The fix here is use a different bourne shell subsitution for
CARGO_ONLINE, so that an empty string counts as set.
|
|
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.
|
|
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.
|
|
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
|
|
maint-0.3.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
Changing the name of this function should help keep us from misusing
it when node_has_preferred_descriptor() would be more appropriate.
|