aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-22Merge branch 'trove-2018-005_032' into maint-0.3.3Nick Mathewson
2018-05-22avoid a signed/unsigned comparison.Nick Mathewson
2018-05-22Make the TROVE-2018-005 fix work with rust.Nick Mathewson
2018-05-22Merge branch 'trove-2018-005_032' into maint-0.3.3Nick Mathewson
2018-05-22uint breaks compilation on windowsNick Mathewson
2018-05-22version bump to 0.3.3.6Nick Mathewson
2018-05-22rust: Mirror TROVE-2018-005 fix in Rust protover implementation.Isis Lovecruft
* REFACTORS `UnvalidatedProtoEntry::from_str` to place the bulk of the splitting/parsing logic in to a new `UnvalidatedProtoEntry::parse_protocol_and_version_str()` method (so that both `from_str()` and `from_str_any_len()` can call it.) * ADD a new `UnvalidatedProtoEntry::from_str_any_len()` method in order to maintain compatibility with consensus methods older than 29. * ADD a limit on the number of characters in a protocol name. * FIXES part of #25517: https://bugs.torproject.org/25517
2018-05-22Merge branch 'trove-2018-005_032' into trove-2018-005_033Nick Mathewson
2018-05-22changes file for TROVE-2018-005Nick Mathewson
2018-05-22Add stdbool to protover.h. Only needed for the 032 backportNick Mathewson
2018-05-22vote: TROVE-2018-005 Make DirAuths omit misbehaving routers from their vote.Isis Lovecruft
2018-05-22protover: TROVE-2018-005 Fix potential DoS in protover protocol parsing.Isis Lovecruft
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
2018-05-22Fix a crash bug when testing reachabilityNick Mathewson
Fixes bug 25415; bugfix on 0.3.3.2-alpha.
2018-05-16Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-16Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-16Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-16Merge branch 'bug26072_029' into maint-0.2.9Nick Mathewson
2018-05-15Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-15Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-15Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-15Update geoip and geoip6 to the May 1 2018 database.Karsten Loesing
2018-05-14Add a missing return after marking a stream for bad connected cellNick Mathewson
Fixes bug 26072; bugfix on 0.2.4.7-alpha.
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-10Merge remote-tracking branch 'dgoulet/bug26069_031_01' into maint-0.3.1Nick Mathewson
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-10Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-10Merge remote-tracking branch 'juga/ticket26007_029_02' into maint-0.2.9Nick Mathewson
2018-05-10hs-v3: Add an extra white-space when parsing descriptorDavid Goulet
The specification describes the signature token to be right after a newline (\n) then the token "signature" and then a white-space followed by the encoded signature. This commit makes sure that when we parse the signature from the descriptor, we are always looking for that extra white-space at the end of the token. It will allow us also to support future fields that might start with "signature". Fixes #26069 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-09Having a ControlPort open doesn't mean we are a clientDavid Goulet
The any_client_port_set() returns true if the ControlPort is set which is wrong because we can have that port open but still not behave as a tor client (like many relays for instance). Fixes #26062 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-09Test read bandwidth measurements with empty filejuga0
2018-05-09Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-09Merge remote-tracking branch 'asn-github/bug25761_032' into maint-0.3.2Nick Mathewson
2018-05-09Stop logging stack contents when reading a zero-length bandwidth fileteor
When directory authorities read a zero-byte bandwidth file, they log a warning with the contents of an uninitialised buffer. Log a warning about the empty file instead. Fixes bug 26007; bugfix on 0.2.2.1-alpha.
2018-05-09Merge branch 'libressl_201805_033' into maint-0.3.3Nick Mathewson
2018-05-09Detect when v3 services get disabled after HUP.George Kadianakis
Remove v3 optimization which made Tor not detect disabling services. This optimization is not so needed because we only call that function after HUP anyway. Fixes bug #25761.
2018-05-09Detect when v2 services get disabled after HUP.George Kadianakis
During service configuration, rend_service_prune_list_impl_() sets rend_service_staging_list to NULL, which blocked pruning after a HUP. This patch initializes rend_service_staging_list when needed, so that HUP can detect disabled onion services. Fixes bug #25761.
2018-05-08manpage fix to stop saying CacheIPv4DNS is on by defaultRoger Dingledine
Stop saying in the manual that clients cache ipv4 dns answers from exit relays. We haven't used them since 0.2.6.3-alpha, and in ticket 24050 we stopped even caching them as of 0.3.2.6-alpha, but we forgot to say so in the man page. Fixes bug 26052; bugfix on 0.3.2.6-alpha.
2018-05-07Merge remote-tracking branch 'mikeperry/bug25733_029' into maint-0.3.3Nick Mathewson
2018-05-03Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-03Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-03Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-03Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3Nick Mathewson
2018-05-03Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1Nick Mathewson
2018-05-03Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9Nick Mathewson
2018-05-03Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3Nick Mathewson