- Nov 20, 2017
-
-
A circuit with purpose C_INTRODUCING means that its state is opened but the INTRODUCE1 cell hasn't been sent yet. We shouldn't consider that circuit when looking for timing out "building circuit". We have to wait on the rendezvous circuit to be opened before sending that cell so the intro circuit needs to be kept alive for at least that period of time. This patch makes that the purpose C_INTRODUCING is ignored in the circuit_expire_building() which means that we let the circuit idle timeout take care of it if we end up never using it. Fixes #23681 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- Nov 18, 2017
-
-
Nick Mathewson authored
This check makes it so we can reach "done" without setting "conn", and so the "if (conn)" check will not be redundant, and so coverity won't complain. Fixes CID 1422205. Not actually a bug.
-
Nick Mathewson authored
Also, check for the actual message, and fix some string confusion, while we're at it. Fixes bug 24345; bugfix on 0.3.2.3-alpha.
-
- Nov 17, 2017
-
-
Nick Mathewson authored
-
-
Nick Mathewson authored
-
Nick Mathewson authored
This seems closer to what the code intended.
-
-
-
We gonna use this cache to avoid dirservers without outdated md info.
-
-
- Nov 16, 2017
-
-
Nick Mathewson authored
When we close a connection via connection_close_immediately, we kill its events immediately. But if it had been blocked on bandwidth read/write, we could try to re-add its (nonexistent) events later from connection_bucket_refill -- if we got to that callback before we swept the marked connections. Fixes bug 24167. Fortunately, this hasn't been a crash bug since we introduced connection_check_event in 0.2.9.10, and backported it. This is a bugfix on commit 89d42291, I believe, which appeared in Tor 0.1.0.1-rc.
-
David Goulet authored
Commit 56c5e282 suppressed that same log statement in directory_info_has_arrived() for microdescriptors so do the same for the descriptors. As the commit says, we already have the bootstrap progress for this. Fixes #23861 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Nick Mathewson authored
evdns is allowed to give us unrecognized object types; it is allowed to give us non-IPv4 answer types, and it is (even) allowed to give us empty answers without an error. Closes ticket 24097.
-
- Nov 15, 2017
-
-
Nick Mathewson authored
Implements ticket 20963.
-
- Nov 14, 2017
-
-
George Kadianakis authored
Due to #23662 this can happen under natural causes and does not disturb the functionality of the service. This is a simple 0.3.2 fix for now, and we plan to fix this properly in 0.3.3.
-
Nick Mathewson authored
Just advertise the line when we're a bridge, using "any" if we're published or "none" if we aren't. This is done in lieu of a full backport of #18329.
-
- Nov 13, 2017
-
-
David Goulet authored
The dir-spec.txt specifies it to be "hsdir_interval" (underscore). Fixes #24262 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- Nov 11, 2017
-
-
Nick Mathewson authored
This function -- a mock replacement used only for fuzzing -- would have a buffer overflow if it got an RSA key whose modulus was under 20 bytes long. Fortunately, Tor itself does not appear to have a bug here. Fixes bug 24247; bugfix on 0.3.0.3-alpha when fuzzing was introduced. Found by OSS-Fuzz; this is OSS-Fuzz issue 4177.
-
- Nov 10, 2017
-
-
David Goulet authored
On failure to upload, the HS_DESC event would report "UPLOAD_FAILED" as the Action but it should have reported "FAILED" according to the spec. Fixes #24230 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Karsten Loesing authored
-
- Nov 09, 2017
-
-
Nick Mathewson authored
This was accidentally reintroduced in 5a46074e. It should be harmless, though: the option is obsolete, so calling it deprecated is redundant.
-
- Nov 08, 2017
-
-
Nick Mathewson authored
-
David Goulet authored
Commit e67f4441 introduced a safeguard against using an uninitialized voting schedule object. However, the dirvote_act() code was looking roughly at the same thing to know if it had to compute the timings before voting with this condition: if (!voting_schedule.voting_starts) { ... dirvote_recalculate_timing(options, now); } The sr_init() function is called very early and goes through the safeguard thus the voting schedule is always initilized before the first vote. That first vote is a crucial one because we need to have our voting schedule aligned to the "now" time we are about to use for voting. Then, the schedule is updated when we publish our consensus or/and when we set a new consensus. From that point on, we only want to update the voting schedule through that code flow. This "created_on_demand" is indicating that the timings have been recalculated on demand by another subsystem so if it is flagged, we know that we need to ignore its values before voting. Fixes #24186 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Nick Mathewson authored
When we have fewer than 15 descriptors to fetch, we will delay the fetch for a little while. That's fine, if we can go ahead and build circuits... but if not, it's a poor choice indeed. Fixes bug 23985; bugfix on 0.1.1.11-alpha. In 0.3.0.3-alpha, when we made primary guard descriptors necessary for circuit building, this situation got worse.
-
Nick Mathewson authored
-
Cleanup after 23318.
-
Cleanup after 23318.
-
Fixes bug 24170; bugfix on 0.2.4.3-alpha.
-
When calculating the fraction of nodes that have descriptors, and all all nodes in the network have zero bandwidths, count the number of nodes instead. Fixes bug 23318; bugfix on 0.2.4.10-alpha.
-
Nick Mathewson authored
Back in 0.2.4.3-alpha (e106812a), when we switched from using double to using uint64 for selecting by bandwidth, I got the math wrong: I should have used llround(x), or (uint64_t)(x+0.5), but instead I wrote llround(x+0.5). That means we would always round up, rather than rounding to the closest integer Fixes bug 23318; bugfix on 0.2.4.3-alpha.
-
David Goulet authored
The flush cells process can close a channel if the connection write fails but still return that it flushed at least one cell. This is due because the error is not propagated up the call stack so there is no way of knowing if the flush actually was successful or not. Because this would require an important refactoring touching multiple subsystems, this patch is a bandaid to avoid the KIST scheduler to handle closed channel in its loop. Bandaid on #23751. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Nick Mathewson authored
This patch has implementations of the "decorrelated" and "full" algorithms from https://www.awsarchitectureblog.com/2015/03/backoff.html
-
Nick Mathewson authored
This reverts commit 01e98487.
-
- Nov 07, 2017
-
-
Nick Mathewson authored
-
David Goulet authored
dirvote_get_next_valid_after_time() is the only public function that uses the voting schedule outside of the dirvote subsystem so if it is zeroed, recalculate its timing if we can that is if a consensus exists. Part of #24161 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
David Goulet authored
Because the HS and SR subsystems can use the voting schedule early (with the changes in #23623 making the SR subsystem using the static voting schedule object), we need to recalculate the schedule very early when setting the new consensus. Fixes #24161 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- Nov 06, 2017
-
-
Nick Mathewson authored
If it decrypts something that turns out to start with a NUL byte, then decrypt_desc_layer() will return 0 to indicate the length of its result. But 0 also indicates an error, which causes the result not to be freed by decrypt_desc_layer()'s callers. Since we're trying to stabilize 0.3.2.x, I've opted for the simpler possible fix here and made it so that an empty decrypted string will also count as an error. Fixes bug 24150 and OSS-Fuzz issue 3994. The original bug was present but unreachable in 0.3.1.1-alpha. I'm calling this a bugfix on 0.3.2.1-alpha since that's the first version where you could actually try to decrypt these descriptors.
-
Nick Mathewson authored
-
- Nov 05, 2017
-
-
Thanks to Dhalgren who analyzed this issue two years ago and found a solution!
-