Commit Graph

5643 Commits

Author SHA1 Message Date
Matt Traudt
951b9f1fa5 tests: fix transproxy tests on BSD systems 2017-09-19 19:20:55 -04:00
Matt Traudt
a8c54ce581 sched: Allow the new sched to react to new cons 2017-09-19 19:07:48 -04:00
Nick Mathewson
a2caa466ee Merge branch 'ticket21405' 2017-09-19 13:36:43 -04:00
Nick Mathewson
3bb6028a8e Merge branch 'ticket18891' 2017-09-19 13:07:01 -04:00
Nick Mathewson
6d8f98646b Clarify that Address is an IPv4 option only. 2017-09-19 13:06:54 -04:00
Nick Mathewson
5f08eb6e57 Merge branch 'ticket18736' 2017-09-19 13:03:20 -04:00
Nick Mathewson
6010f9420a Clarify the term "address" in the manpage
Closes 21405.
2017-09-19 10:22:35 -04:00
Nick Mathewson
f395f41868 fix a lintchanges problem 2017-09-19 10:03:32 -04:00
Nick Mathewson
b74a1c77a4 Document that .onion subdomains are ignored by clients
addr-spec.txt also explains this, but we should get it into the
manpage too.

Closes ticket #18736.
2017-09-19 09:26:54 -04:00
David Goulet
a3f5a24669 hs: Pad RENDEZVOUS1 v3 cell to match length of v2
RENDEZVOUS1 cell is 84 bytes long in v3 and 168 bytes long in v2 so this
commit pads with random bytes the v3 cells up to 168 bytes so they all look
alike at the rendezvous point.

Closes #23420

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-19 09:13:28 -04:00
David Goulet
6f313edc8a doc: Add version 3 to HiddenServiceVersion man page entry
Fixes #23580

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-19 08:39:43 -04:00
teor
e77ece3b31
Avoid a compilation warning on macOS in scheduler_ev_add()
This warning is caused by a different tv_usec data type on macOS
compared to the system on which the patch was developed.

Fixes 23575 on 0.3.2.1-alpha.
2017-09-19 16:32:47 +10:00
Nick Mathewson
94a88eaa45 Merge remote-tracking branch 'public/ticket19704' 2017-09-18 15:02:16 -04:00
Nick Mathewson
0bd62c1d92 Start on a changelog for 0.3.2.1-alpha: sortchanges and formatchangelog 2017-09-18 10:32:03 -04:00
Nick Mathewson
523188afdb Use the lintChanges script to fix style issues in changes entries 2017-09-18 10:24:03 -04:00
Nick Mathewson
365bb6356a remove changes files for items that appeared in 0.3.17 2017-09-18 10:12:30 -04:00
Nick Mathewson
c7d0096f9d Merge branch 'maint-0.3.1' 2017-09-18 09:42:30 -04:00
Nick Mathewson
23c4592ee9 Merge branch 'maint-0.3.0' into maint-0.3.1 2017-09-18 09:40:40 -04:00
Nick Mathewson
314652dc16 Merge branch 'maint-0.2.8' into maint-0.2.9 2017-09-18 09:39:46 -04:00
Nick Mathewson
09ea89764a Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.

TROVE-2017-008
CVE-2017-0380
2017-09-18 09:32:41 -04:00
Nick Mathewson
4a2cbea6ce Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.

TROVE-2017-008
CVE-2017-0380
2017-09-18 09:27:07 -04:00
Nick Mathewson
639766dbc3 Merge branch 'maint-0.3.1'
Resolve conflict with 23532 code.
2017-09-15 14:40:35 -04:00
Nick Mathewson
9201e4c74b Merge branch 'bug23487_029' 2017-09-15 14:27:58 -04:00
Nick Mathewson
37302e64a4 Merge branch 'remove_allow_dotexit_v2' 2017-09-15 12:10:47 -04:00
Nick Mathewson
f02fd6c3af Remove AllowDotExit.
It's been deprecated since 0.2.9.2-alpha.  Closes ticket 23426.
2017-09-15 12:09:33 -04:00
Nick Mathewson
0f4f40b70f Merge remote-tracking branch 'dgoulet/ticket12541_032_02' 2017-09-15 12:00:50 -04:00
Nick Mathewson
962b0b849b Merge remote-tracking branch 'dgoulet/ticket19254_032_01' 2017-09-15 11:52:10 -04:00
Matt Traudt
47390d1c9e fixup! sched: add changes file (spaces) 2017-09-15 11:40:59 -04:00
Matt Traudt
63204be48f sched: add changes file 2017-09-15 11:40:59 -04:00
Nick Mathewson
e88fb4f4f8 Merge remote-tracking branch 'catalyst-oniongit/bug23532' 2017-09-15 11:17:18 -04:00
Taylor Yu
e31a7be161 Make NETINFO clock skew detection work on clients
An unnecessary routerlist check in the NETINFO clock skew detection in
channel_tls_process_netinfo_cell() was preventing clients from
reporting NETINFO clock skew to controllers.
2017-09-15 09:49:53 -05:00
Nick Mathewson
e05414d241 Fix several places where md-using relays would get wrong behavior.
This patch replaces a few calls to router_get_by_id_digest ("do we
have a routerinfo?") with connection_or_digest_is_known_relay ("do
we know this relay to be in the consensus, or have been there some
time recently?").

Found while doing the 21585 audit; fixes bug 23533.  Bugfix on
0.3.0.1-alpha.
2017-09-15 09:35:59 -04:00
Nick Mathewson
c4c4d03412 Merge remote-tracking branch 'asn/bug23531' 2017-09-15 08:16:20 -04:00
Nick Mathewson
72391fce23 Merge remote-tracking branch 'teor/bug23524' 2017-09-15 08:13:45 -04:00
George Kadianakis
88c58078fa prop224: Add changes file for prop224 2017-09-15 13:23:48 +03:00
teor
61b5d05358
Make control port download status next attempts consistent
Make download status next attempts reported over the control port
consistent with the time used by tor. This issue only occurs if a
download status has not been reset before  it is queried over the
control port.

Fixes 23525, not in any released version of tor.
2017-09-15 14:11:34 +10:00
teor
033691212a
Make an assert into a BUG warning in the bridge code
If future code asks if there are any running bridges, without checking
if bridges are enabled, log a BUG warning rather than crashing.

Fixes 23524 on 0.3.0.1-alpha
2017-09-15 14:02:22 +10:00
Nick Mathewson
d6568bad5e Merge branch 'bug23499' 2017-09-14 17:18:38 -04:00
Nick Mathewson
c3063f2432 Remove changes files for items already in release-0.3.1 2017-09-14 13:00:05 -04:00
Nick Mathewson
72b802001c Merge remote-tracking branch 'catalyst-oniongit/skew' 2017-09-14 09:49:11 -04:00
Taylor Yu
0392060863 changes file for clock skew bootstrap errors 2017-09-14 08:35:43 -05:00
Nick Mathewson
3de63fe4b1 Merge branch 'maint-0.3.1' 2017-09-14 07:58:11 -04:00
Nick Mathewson
6fc47062af Merge remote-tracking branch 'mikeperry/bug23077' into maint-0.3.1 2017-09-14 07:57:14 -04:00
Roger Dingledine
eb429232ef Make dir servers include a "Date:" http header more often
Directory servers now include a "Date:" http header for response
codes other than 200. Clients starting with a skewed clock and a
recent consensus were getting "304 Not modified" responses from
directory authorities, so without a Date header the client would
never hear about a wrong clock.

Fixes bug 23499; bugfix on 0.0.8rc1.
2017-09-14 03:02:37 -04:00
Mike Perry
361014255f Bug 23077: Make channelpadding tests use mocked time. 2017-09-14 01:18:30 +00:00
Nick Mathewson
dcaf971a01 Merge remote-tracking branch 'teor/bug23470-029' 2017-09-13 09:20:19 -04:00
teor
c86013291b
Stop relays calling directory_fetches_from_authorities on dir downloads
This change refactors find_dl_schedule() to only call dependent functions
as needed. In particular, directory_fetches_from_authorities() only needs
to be called on clients.

Stopping spurious directory_fetches_from_authorities() calls on every
download on public relays has the following impacts:
* fewer address resolution attempts, particularly those mentioned in 21789
* fewer descriptor rebuilds
* fewer log messages, particularly those limited in 20610

Fixes 23470 in 0.2.8.1-alpha.
The original bug was introduced in commit 35bbf2e as part of prop210.
2017-09-13 09:46:17 +10:00
Nick Mathewson
7ee486c15f Log correctly on owner/user mismatch.
Found with clang's scan-build while looking at dead assignments.

Fixes bug 23487; bugfix on 1135405c8c in 0.2.9.1-alpha
2017-09-12 17:37:25 -04:00
Nick Mathewson
dedafe95fe Merge branch 'maint-0.2.9' into maint-0.3.0 2017-09-12 17:09:47 -04:00
Nick Mathewson
eb078a3bd5 Merge branch 'maint-0.3.0' into maint-0.3.1 2017-09-12 17:09:47 -04:00
Nick Mathewson
3092c8bb3e Merge branch 'maint-0.3.1' 2017-09-12 17:09:47 -04:00
Nick Mathewson
de6f121b59 Deprecate ReachableDirAddresses and ClientPreferIPv6DirPort
Closes ticket 19704.
2017-09-12 16:12:15 -04:00
Nick Mathewson
d9e2db1efd Avoid sscanf() warnings from openbsd in the unit tests
OpenBSD doesn't like tricks where you use a too-wide sscanf argument
for a too-narrow array, even when you know the input string
statically.  The fix here is just to use bigger buffers.

Fixes 15582; bugfix on a3dafd3f58 in 0.2.6.2-alpha.
2017-09-12 16:01:12 -04:00
Nick Mathewson
d165812416 remove a redundant changes file for 22750 2017-09-12 15:39:06 -04:00
Nick Mathewson
26d462c1f0 Merge branch 'ticket21031' 2017-09-12 10:43:34 -04:00
Nick Mathewson
4027bd2e96 Merge branch 'bug23347_squashed' 2017-09-12 10:38:35 -04:00
teor
93a8ed3b83 Make clients wait to refresh bridges when they have a recent descriptor
But when clients are just starting, make them try each bridge a few times
before giving up on it.

These changes make the bridge download schedules more explicit: before
17750, they relied on undocumented behaviour and specific schedule
entries. (And between 17750 and this fix, they were broken.)

Fixes 23347, not in any released version of tor.
2017-09-12 10:38:25 -04:00
teor
97249c4f5e Make bridge clients download bridge descriptors immediately
The download schedule tells Tor to wait 15 minutes before downloading
bridge descriptors. But 17750 made Tor ignore that and start immediately.
Since we fixed 17750, Tor waits 15 minutes for bridge client bootstrap,
like the schedule says.

This fixes the download schedule to start immediately, and to try each
bridge 3 times in the first 30 seconds. This should make bridge bootstraps
more reliable.

Fixes 23347.
2017-09-12 10:38:25 -04:00
Nick Mathewson
8eef7fc845 Merge branch 'maint-0.3.1' 2017-09-12 10:30:54 -04:00
Nick Mathewson
befddf6d2a Merge branch 'ticket17857_squashed' into maint-0.3.1 2017-09-12 10:29:00 -04:00
Mike Perry
6689c95d06 Changes file for #17857. 2017-09-12 10:28:45 -04:00
Nick Mathewson
5238210da4 changes file for 22215 2017-09-12 09:58:07 -04:00
Nick Mathewson
4ace1b96ac Add a changes file for 22437. 2017-09-12 09:31:57 -04:00
Nick Mathewson
eaa8224cef Merge branch 'maint-0.3.0' into maint-0.3.1 2017-09-11 17:49:18 -04:00
Nick Mathewson
2b26815e09 Merge branch 'maint-0.2.9' into maint-0.3.0 2017-09-11 17:49:18 -04:00
Nick Mathewson
e3caad0ea1 Merge branch 'maint-0.3.1' 2017-09-11 17:49:18 -04:00
Andreas Stieger
b81a2e8f46 Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)
Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
2017-09-11 17:45:07 -04:00
Nick Mathewson
c894e9d3d4 Merge branch 'maint-0.2.9' into maint-0.3.0 2017-09-11 16:29:10 -04:00
Nick Mathewson
a25d97e530 Merge branch 'teor-bug22797-025' into maint-0.2.9 2017-09-11 16:28:59 -04:00
Nick Mathewson
b9ecb522fc Merge branch 'ticket22281_squashed' 2017-09-11 16:23:24 -04:00
Nick Mathewson
c4cb969a2a Taboo the get_options() function while options are validating
When option validation or transition is happening, there are no
"current options" -- only "old options" and "maybe new options".
Looking at get_options() is likely a mistake, so have a nonfatal
assertion let us know if we do that.

Closes 22281.
2017-09-11 16:23:16 -04:00
Nick Mathewson
c151f46445 Merge branch 'ticket20119' 2017-09-08 08:56:53 -04:00
Nick Mathewson
f5092e711f Merge branch 'maint-0.2.9' into maint-0.3.0 2017-09-08 08:24:47 -04:00
Nick Mathewson
7a83cf75dc Merge branch 'maint-0.3.0' into maint-0.3.1 2017-09-08 08:24:47 -04:00
Nick Mathewson
ad3f0953e6 Merge branch 'maint-0.3.1' 2017-09-08 08:24:47 -04:00
Nick Mathewson
3cace828a9 Merge branch 'bug22644_029' into maint-0.2.9 2017-09-08 08:24:36 -04:00
Nick Mathewson
eebfe4f539 Merge branch 'ticket22731' 2017-09-08 08:11:11 -04:00
Nick Mathewson
1b1eeb0fb9 Merge branch 'feature23237' 2017-09-08 08:10:15 -04:00
Nick Mathewson
22e6880296 Merge branch 'ticket22377' 2017-09-08 08:06:44 -04:00
Nick Mathewson
a9d4df9a08 Merge branch 'maint-0.2.9' into maint-0.3.0 2017-09-07 15:18:01 -04:00
Nick Mathewson
54fb1d0f7f Merge branch 'maint-0.3.0' into maint-0.3.1 2017-09-07 15:18:01 -04:00
Nick Mathewson
36104e55e4 Merge branch 'maint-0.3.1' 2017-09-07 15:18:01 -04:00
Nick Mathewson
bcf2b413c3 Merge branch 'maint-0.2.5' into maint-0.2.8 2017-09-07 15:18:00 -04:00
Nick Mathewson
08592c95fa Merge branch 'maint-0.2.8' into maint-0.2.9 2017-09-07 15:18:00 -04:00
Karsten Loesing
09618ffe38 Update geoip and geoip6 to the September 6 2017 database. 2017-09-07 21:06:16 +02:00
Nick Mathewson
283be00b0b Add support for running "calltool" on Tor via "make callgraph".
Closes #19307.
2017-09-07 10:51:02 -04:00
Nick Mathewson
27fa4a98d2 Make ClientDNSRejectInternalAddresses testing-only.
Undeprecate it;
rename it to TestingClientDNSRejectInternalAddresses;
add the old name as an alias;
reject configurations where it is set but TestingTorNetwork is not;
change the documentation accordingly.

Closes tickets 21031 and 21522.
2017-09-07 10:03:31 -04:00
Nick Mathewson
12dad5ebf7 Fix crashes on empty +HSPOST and +POSTDESCRIPTOR commands
Fixes bug 22644; bugfix on 0.2.7.1-alpha and 0.2.0.1-alpha
respectively.
2017-09-07 09:20:00 -04:00
Nick Mathewson
1e079ec30d Merge branch 'maint-0.3.1' 2017-09-07 08:51:16 -04:00
Nick Mathewson
9c404602a0 Add a stack trace to the warning at issue with 23105.
With luck, this will help us diagnose 23105 and fix it.

I also added a stack trace to the warning right before it, since why
not.
2017-09-07 08:49:11 -04:00
Nick Mathewson
ab18e5e5fc Better error on failure to load seccomp2 sandbox
There are two reasons this is likeliest to happen -- no kernel
support, and some bug in Tor.  We'll ask people to check the former
before they report. Closes 23090.
2017-09-06 14:23:47 -04:00
Nick Mathewson
1098893e4f Exit when we can't write to a configured pid file
This is probably what the user wants, according to 20119.
2017-09-06 11:50:22 -04:00
Nick Mathewson
6fea44c673 Reject torrc if RunAsDaemon is given with relative paths.
The chdir() call in RunAsDaemon makes the behavior here surprising,
and either way of trying to resolve the surprise seems sure to
startle a significant fraction of users.  Instead, let's refuse to
guess, and refuse these configurations.

Closes ticket 22731.
2017-09-06 11:39:11 -04:00
Nick Mathewson
73b0e2e6fd Merge branch 'http_tunnel_squashed' 2017-09-05 14:34:29 -04:00
Nick Mathewson
fead644956 Add a manpage entry and changes file for for HTTPTunnelPort 2017-09-05 14:34:09 -04:00
Nick Mathewson
234c5015f1 Move protocol-specific functions out of buffers.c
This commit does not change the implementation of any function: it
only moves code and adds new includes as necessary.  Part of #23149.
2017-09-05 13:57:51 -04:00
Nick Mathewson
e2969759a7 Remove changes files that are already merged in 0.3.1.6-rc 2017-09-05 10:43:17 -04:00
Nick Mathewson
42394053c9 Merge branch 'maint-0.3.1' 2017-09-04 15:48:12 -04:00
Nick Mathewson
4d97efd4d1 Merge branch 'bug22752_031_simple' into maint-0.3.1 2017-09-04 15:48:01 -04:00
Nick Mathewson
33989cd002 Merge remote-tracking branch 'dgoulet/bug23366_032_01' 2017-09-04 12:48:26 -04:00