Commit Graph

36965 Commits

Author SHA1 Message Date
Nick Mathewson 2daff0b045 Merge branch 'maint-0.4.5' into release-0.4.5 2021-04-13 16:59:16 -04:00
Nick Mathewson 59bc377dce Merge branch 'maint-0.4.4' into maint-0.4.5 2021-04-13 16:59:16 -04:00
Nick Mathewson 59f6248e09 Merge branch 'maint-0.3.5' into maint-0.4.4 2021-04-13 16:59:15 -04:00
David Goulet ee7c50b8a7 fallbackdir: Renegerate list with 200 relays
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-13 15:15:58 -04:00
Nick Mathewson 4b0a0b9952 Merge branch 'maint-0.4.5' into release-0.4.5 2021-04-13 10:36:01 -04:00
Nick Mathewson 1f21b6e6a7 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-04-13 10:36:01 -04:00
Nick Mathewson b323e6b8c2 Merge branch 'maint-0.3.5' into maint-0.4.4 2021-04-13 10:36:00 -04:00
Nick Mathewson 32f5ad7665 Update geoip files to match ipfire location db, 2021/04/13. 2021-04-13 10:35:50 -04:00
Nick Mathewson 1aa8fd66be Merge branch 'maint-0.4.5' into release-0.4.5 2021-04-13 09:40:02 -04:00
David Goulet 218f9f90fb guard: Don't check bridge transport name when selecting eligible guards
This is related to ticket #40360 which found this problem when a Bridge entry
with a transport name (let say obfs4) is set without a fingerprint:

  Bridge obfs4 <IP>:<PORT> cert=<...> iat-mode=0

(Notice, no fingerprint between PORT and "cert=")

Problem: commit 09c6d03246 added a check in
get_sampled_guard_for_bridge() that would return NULL if the selected bridge
did not have a valid transport name (that is the Bridge transport name that
corresponds to a ClientTransportPlugin).

Unfortuantely, this function is also used when selecting our eligible guards
which is done *before* the transport list is populated and so the added check
for the bridge<->transport name is querying an empty list of transports
resulting in always returning NULL.

For completion, the logic is: Pick eligible guards (use bridge(s) if need be)
then for those, initiate a connection to the pluggable transport proxy and
then populate the transport list once we've connected.

Back to get_sampled_guard_for_bridge(). As said earlier, it is used when
selecting our eligible guards in a way that prevents us from selecting
duplicates. In other words, if that function returns non-NULL, the selection
continues considering the bridge was sampled before. But if it returns NULL,
the relay is added to the eligible list.

This bug made it that our eligible guard list was populated with the *same*
bridge 3 times like so (remember no fingerprint):

  [info] entry_guards_update_primary(): Primary entry guards have changed. New primary guard list is:
  [info] entry_guards_update_primary():   1/3: [bridge] ($0000000000000000000000000000000000000000)
  [info] entry_guards_update_primary():   2/3: [bridge] ($0000000000000000000000000000000000000000)
  [info] entry_guards_update_primary():   3/3: [bridge] ($0000000000000000000000000000000000000000)

When tor starts, it will find the bridge fingerprint by connecting to it and
will then update the primary guard list by calling
entry_guard_learned_bridge_identity() which then goes and update only 1 single
entry resulting in this list:

  [debug] sampled_guards_update_consensus_presence(): Sampled guard [bridge] ($<FINGERPRINT>) is still listed.
  [debug] sampled_guards_update_consensus_presence(): Sampled guard [bridge] ($0000000000000000000000000000000000000000) is still listed.
  [debug] sampled_guards_update_consensus_presence(): Sampled guard [bridge] ($0000000000000000000000000000000000000000) is still listed.

And here lies the problem, now tor is stuck attempting to wait for a valid
descriptor for at least 2 guards where the second one is a bunch of zeroes and
thus tor will never fully bootstraps:

  [info] I learned some more directory information, but not enough to build a
  circuit: We're missing descriptors for 1/2 of our primary entry guards
  (total microdescriptors: 6671/6703). That's ok. We will try to fetch missing
  descriptors soon.

Now, why passing the fingerprint then works? This is because the list of
guards contains 3 times the same bridge but they all have a fingerprint and so
the descriptor can be found and tor can bootstraps.

The solution here is to entirely remove the transport name check in
get_sampled_guard_for_bridge() since the transport_list is empty at that
point. That way, the eligible guard list only gets 1 entry, the bridge, and
can then go on to bootstrap properly.

It is OK to do so since when launching a bridge descriptor fetch, we validate
that the bridge transport name is OK and thus avoid connecting to a bridge
without a ClientTransportPlugin. If we wanted to keep the check in place, we
would need to populate the transport_list much earlier and this would require
a much bigger refactoring.

Fixes #40360

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-08 14:08:28 -04:00
George Kadianakis 41ad333c2f Merge branch 'maint-0.4.5' into release-0.4.5 2021-04-08 14:25:31 +03:00
Daniel Pinto 36768b5756 Fix glob processing on BSD systems. #40318
On Linux systems, glob automatically ignores the errors ENOENT and
ENOTDIR because they are expected during glob expansion. But BSD
systems do not ignore these, resulting in glob failing when globs
expand to invalid paths. This is fixed by adding a custom error
handler that ignores only these two errors and removing the
GLOB_ERR flag as it makes glob fail even if the error handler
ignores the error and is unnecessary as the error handler will
make glob fail on all other errors anyway.
2021-03-26 01:56:07 +00:00
Nick Mathewson c40b729c85 Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-24 12:25:05 -04:00
Nick Mathewson c359c3056b Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-24 12:25:05 -04:00
David Goulet 9ca2394d6b channel: Fix use after free in channel_do_open_actions()
Fortunately, our tor_free() is setting the variable to NULL after so we were
in a situation where NULL was always used instead of the transport name.

This first appeared in 894ff2dc84 and results in
basically no bridge with a transport being able to use DoS defenses.

Fixes #40345

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-23 09:19:41 -04:00
George Kadianakis ea781dc44f Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-17 13:43:47 +02:00
George Kadianakis 59bbf8cde9 Merge remote-tracking branch 'tor-gitlab/mr/333' into maint-0.4.5 2021-03-17 13:43:38 +02:00
Nick Mathewson aa49562a05 Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-16 09:18:52 -04:00
Nick Mathewson d66178c7b7 Bump version to 0.4.5.7-dev 2021-03-16 09:18:27 -04:00
Nick Mathewson e2dd8f1532 Merge branch 'maint-0.4.4' into maint-0.4.5
"ours" to avoid version bump.
2021-03-16 09:18:06 -04:00
Nick Mathewson 94fb308c5d Bump version to 0.4.4.8-dev 2021-03-16 09:17:56 -04:00
Nick Mathewson 5fac24053d Merge branch 'maint-0.3.5' into maint-0.4.4
"ours" to avoid version bump.
2021-03-16 09:17:40 -04:00
Nick Mathewson 3271c0bde7 Bump to 0.3.5.14-dev 2021-03-16 09:17:31 -04:00
Nick Mathewson 83f895c015 copy 0.4.5.7 changelog to releasenotes tor-0.4.5.7 2021-03-16 08:27:52 -04:00
Nick Mathewson bc2e3ea89d changelog updates from arma 2021-03-15 17:12:55 -04:00
Nick Mathewson 7c00afe0fb Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-15 09:41:38 -04:00
Nick Mathewson 5a26949609 Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-15 09:41:38 -04:00
Nick Mathewson f2cfd1ffad Remove check-best-practices from check-local in 0.4.4 2021-03-15 09:41:19 -04:00
Nick Mathewson 066de45209 Changelog for 0.4.5.7 2021-03-15 09:22:06 -04:00
Nick Mathewson 61731e3550 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-15 09:01:59 -04:00
Nick Mathewson 5ec579610a Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-15 09:01:59 -04:00
Nick Mathewson 33d1e45a68 Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-15 09:01:59 -04:00
Nick Mathewson f078aab71e Merge branch 'bug40316_035_v2' into maint-0.3.5 2021-03-15 08:58:54 -04:00
Nick Mathewson 890ae4fb1a Fix detection of point to insert signatures on a pending consensus.
We were looking for the first instance of "directory-signature "
when instead the correct behavior is to look for the first instance
of "directory-signature " at the start of a line.

Unfortunately, this can be exploited as to crash authorities while
they're voting.

Fixes #40316; bugfix on 0.2.2.4-alpha.  This is TROVE-2021-002,
also tracked as CVE-2021-28090.
2021-03-15 08:56:58 -04:00
Nick Mathewson a6533af9e8 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-15 08:54:00 -04:00
Nick Mathewson 2eb900f7e2 Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-15 08:54:00 -04:00
Nick Mathewson 9c63b3b0c2 Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-15 08:54:00 -04:00
Nick Mathewson efca9ce41c Clarify new intended strategy with TROVE-2021-001
We're going to disable this feature in all versions for now.
2021-03-15 08:53:36 -04:00
Nick Mathewson 7c5a67ccd9 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-15 08:52:29 -04:00
Nick Mathewson 1fdfa8eeed Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-15 08:52:29 -04:00
Nick Mathewson b9f6539008 Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-15 08:52:28 -04:00
Nick Mathewson f46f4562cf Merge branch 'bug40286_disable_min_035' into maint-0.3.5 2021-03-15 08:41:03 -04:00
Nick Mathewson 849fde27fe Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-15 07:42:55 -04:00
Nick Mathewson be17a5a3cf Bump to 0.4.5.7 2021-03-15 07:41:54 -04:00
Nick Mathewson 5e771327af Merge branch 'maint-0.4.4' into maint-0.4.5
"ours" to avoid version bump.
2021-03-15 07:40:56 -04:00
Nick Mathewson fb2c889a38 Bump to 0.4.4.8 2021-03-15 07:40:48 -04:00
Nick Mathewson 8ada4263a9 Merge branch 'maint-0.3.5' into maint-0.4.4
"ours" to avoid version bump.
2021-03-15 07:40:06 -04:00
Nick Mathewson 1a0b5fd569 Bump to 0.3.5.14 2021-03-15 07:39:45 -04:00
Nick Mathewson 61c6049fa8 Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-12 11:36:34 -05:00
Nick Mathewson 433f526af6 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-12 11:36:34 -05:00