Commit Graph

32695 Commits

Author SHA1 Message Date
Nick Mathewson
75ea7514e1 Add a changes file for coverity test fixes of 31030. 2019-06-28 12:36:53 -04:00
Nick Mathewson
ea154a6108 Coverity: fix memory leak on error in test function.
The function make_intro_from_plaintext() in test_introduce.c would
leak memory if we ever hit a failure from our underlying crypto
functions.  This kind of failure should be impossible, but it's best
to be safe here.

Bugfix on 0.2.4.1-alpha.
2019-06-28 12:36:53 -04:00
Nick Mathewson
5fa2b32200 Coverity: fix test issues with always-present 'service' var.
Coverity is worried that we check "service" at the end of these test
functions, since it doesn't see any way to reach the cleanup code
without having first dereferenced the variable.

Removing the check would be unwise in this case: instead we add a
tt_assert check before using "service" so that coverity thinks that
the check is doing something useful.

Bugfix on 0.3.2.1-alpha.
2019-06-28 12:36:44 -04:00
Nick Mathewson
68792f77e5 Fix a few coverity unitinitialzed-value warnings in the unit tests.
Coverity can't see that it is not in fact going to read
uninitialized memory here, so we initialize these values
unconditionally.

Bugfix on 0.4.0.1-alpha.
2019-06-28 12:33:27 -04:00
David Goulet
c34a6b922f Merge branch 'tor-github/pr/1129' 2019-06-27 10:19:45 -04:00
teor
362afa8c4e doc: update the man page entries for DirAuthority and FallbackDir
Improve the documentation for the DirAuthority and FallbackDir torrc
options.

Closes ticket 30955.
2019-06-27 10:19:40 -04:00
David Goulet
6afe1b00c9 Merge branch 'tor-github/pr/1140' 2019-06-26 11:39:33 -04:00
Nick Mathewson
da11304136 Merge branch 'maint-0.4.1' 2019-06-26 10:06:02 -04:00
Nick Mathewson
3ccf91027b Merge remote-tracking branch 'tor-github/pr/1101' into maint-0.4.1 2019-06-26 10:05:51 -04:00
Nick Mathewson
089ef46063 Merge branch 'bug30721_squashed' 2019-06-26 09:57:20 -04:00
teor
6ef555bda0 test/addr: test that tor_addr_port_lookup() handles IP addresses and ports
And that it does something sensible with host and host:port.

Also reorder the tests into valid, invalid, and ambiguous.
And add some missing cases.

Note: tor_addr_port_lookup() handles ip, ip:port, host, and host:port.

Tests for 30721.
2019-06-26 09:55:37 -04:00
teor
6079dfd103 test/addr: test that tor_addr_lookup() handles IP addresses
And that it fails on IP:port and host:port, and does something sensible with
host.

Tests for 30721.
2019-06-26 09:55:37 -04:00
teor
1c92d7f388 test/addr: test that tor_lookup_hostname() handles IPv4 addresses
And that it fails on IPv6 and host:port, and does something sensible with
host.

Tests for 30721.
2019-06-26 09:55:37 -04:00
teor
60ce431c54 test/addr: Add some ambiguous IPv6 cases to test_addr_parse()
Test some strings which could be parsed as IPv6 addresses,
or as IPv6:port strings.

Additional tests for 30721.
2019-06-26 09:55:37 -04:00
teor
2dbde3617f test/addr: Increase coverage in test_addr_parse()
Do as many tests as possible for each input string.
Then remove some redundant test cases.

Cleanup after 30721.
2019-06-26 09:55:37 -04:00
teor
5a3770dc6c test/addr: Stop repeating so much code in test_addr_parse()
Cleanup after 30721.
2019-06-26 09:55:37 -04:00
teor
1d3d6bf6b1 test/addr: Add unit tests for the fixes in 30721 2019-06-26 09:55:37 -04:00
teor
adb8538e7b address/resolve: Require square brackets on IPv6 address:ports
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-26 09:55:37 -04:00
teor
308d300213 address/resolve: try harder to avoid returning uninitialised data
Cleanup after 30721.
2019-06-26 09:55:37 -04:00
teor
fb93646c1c resolve: split sub-functions out of tor_addr_lookup()
And remove the practracker exception for tor_addr_lookup().

Cleanup after 30721.
2019-06-26 09:55:37 -04:00
teor
29cf64c838 resolve: refactor address family logic in tor_addr_lookup()
Cleanup after 30721.
2019-06-26 09:55:37 -04:00
teor
cd1de99468 resolve: consistently parse IP addresses in square brackets
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-26 09:55:36 -04:00
Nick Mathewson
c2a326d34f Merge branch 'maint-0.4.1'
"ours" to avoid the 0.4.1 version of #30871.
2019-06-26 09:50:12 -04:00
Nick Mathewson
0fe9657c8c Merge remote-tracking branch 'tor-github/pr/1119' 2019-06-26 09:50:00 -04:00
Nick Mathewson
648d5df628 Merge remote-tracking branch 'tor-github/pr/1118' into maint-0.4.1 2019-06-26 09:49:40 -04:00
Nick Mathewson
167dd097e0 Merge remote-tracking branch 'tor-github/pr/1127' 2019-06-26 09:40:01 -04:00
George Kadianakis
72ef4f43d5 Merge branch 'tor-github/pr/1142' 2019-06-26 10:57:24 +03:00
George Kadianakis
7edd01a29b Merge branch 'tor-github/pr/1109' 2019-06-26 10:56:08 +03:00
George Kadianakis
a57296da31 Merge branch 'tor-github/pr/1139' 2019-06-26 10:55:05 +03:00
George Kadianakis
fede64822d Merge branch 'tor-github/pr/1128' 2019-06-26 10:53:34 +03:00
George Kadianakis
b2ef076e1a Merge branch 'maint-0.4.1' 2019-06-26 10:51:50 +03:00
George Kadianakis
00acccac64 Merge branch 'tor-github/pr/1114' into maint-0.4.1 2019-06-26 10:51:12 +03:00
Taylor Yu
5612eccef8 Changes file for ticket 30889 2019-06-25 11:42:41 -05:00
Taylor Yu
5faf54970d Fix some onion helpers
Fix add_onion_helper_clientauth() and add_onion_helper_keyarg() to
explicitly call the appropriate control reply abstractions instead of
allocating a string to pass to their callers.

Part of ticket 30889.
2019-06-25 11:42:34 -05:00
Taylor Yu
e5e6953be7 Make control_write_reply() mockable
Part of ticket 30889.
2019-06-25 11:40:44 -05:00
Taylor Yu
0dd59fdb56 Clean up some uses of low-level control replies
Part of ticket 30889.
2019-06-25 11:39:59 -05:00
Nick Mathewson
3644f4ab5f Remove changes files that appeared in 0.4.1.3-alpha or earlier. 2019-06-25 11:57:08 -04:00
Nick Mathewson
3a9b41895f Merge branch 'maint-0.4.1'
"ours" to avoid version bump.
2019-06-25 11:56:22 -04:00
Nick Mathewson
fe41504309 forward-port the 0.4.1.3-alpha changelog 2019-06-25 11:56:08 -04:00
Nick Mathewson
e4f66bf7ff bump to 0.4.1.3-alpha-dev 2019-06-25 11:55:53 -04:00
Nick Mathewson
4bac6b6e7d Remove the unused "exitcode" variable from test_rebind.sh
Fixes a shellcheck issue; closes ticket 30964.  No user-visible
change.
2019-06-24 13:49:19 -04:00
Nick Mathewson
a87700633c Don't try to shellcheck src/rust/registry
Fixes bug 30963; bug not in any released Tor.
2019-06-24 13:45:05 -04:00
Nick Mathewson
aec359ef62 Merge branch 'maint-0.4.1' 2019-06-24 13:36:42 -04:00
Nick Mathewson
bd66a40845 Merge remote-tracking branch 'tor-github/pr/1131' 2019-06-24 13:36:36 -04:00
Nick Mathewson
8803930de8 Merge remote-tracking branch 'tor-github/pr/1130' into maint-0.4.1 2019-06-24 13:36:10 -04:00
Nick Mathewson
3b6bd768d3 Merge branch 'maint-0.4.1'
"ours" to avoid version bump.
2019-06-24 09:32:54 -04:00
Nick Mathewson
aab5f42ae0 bump to 0.4.1.3-alpha 2019-06-24 09:32:46 -04:00
teor
45be44ed9c stats: Split extrainfo_dump_to_string() into smaller functions.
Closes ticket 30956.
2019-06-24 20:47:44 +10:00
teor
872b85e689
Merge branch 'bug30956_041' into bug30956_master 2019-06-24 19:47:34 +10:00
teor
8356cc5b51 stats: Always publish pluggable transports in extra info documents
Always publish bridge pluggable transport information in the extra info
descriptor, even if ExtraInfoStatistics is 0. This information is
needed by BridgeDB.

Fixes bug 30956; bugfix on 0.4.1.1-alpha.
2019-06-24 19:44:24 +10:00