aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Merge remote branch 'origin/maint-0.2.2' for bug 1859 patchesNick Mathewson2010-10-21
|\ | | | | | | Some of this is already done in nodelist.
| * Fix a remaining bug in Robert's bug1859 fix.Nick Mathewson2010-10-21
| | | | | | | | | | | | When intro->extend_info is created for an introduction point, it only starts out with a nickname, not necessarily an identity digest. Thus, doing router_get_by_digest isn't necessarily safe.
| * Merge remote branch 'hoganrobert/bug1859' into maint-0.2.2Nick Mathewson2010-10-21
| |\
| | * Issues with router_get_by_nickname()Robert Hogan2010-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/1859 Use router_get_by_digest() instead of router_get_by_hexdigest() in circuit_discard_optional_exit_enclaves() and rend_client_get_random_intro(), per Nick's comments. Using router_get_by_digest() in rend_client_get_random_intro() will break hidden services published by Tor versions pre 0.1.2.18 and 0.2.07-alpha as they only publish by nickname. This is acceptable however as these versions only publish to authority tor26 and don't work for versions in the 0.2.2.x series anyway.
| | * Issues with router_get_by_nickname()Robert Hogan2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/1859 There are two problems in this bug: 1. When an OP makes a .exit request specifying itself as the exit, and the exit is not yet listed, Tor gets all the routerinfos needed for the circuit but discovers in circuit_is_acceptable() that its own routerinfo is not in the routerdigest list and cannot be used. Tor then gets locked in a cycle of repeating these two steps. When gathering the routerinfos for a circuit, specifically when the exit has been chosen by .exit notation, Tor needs to apply the same rules it uses later on when deciding if it can build a circuit with those routerinfos. 2. A different bug arises in the above situation when the Tor instance's routerinfo *is* listed in the routerlist, it shares its nickname with a number of other Tor nodes, and it does not have 'Named' rights to its nickname. So for example, if (i) there are five nodes named Bob in the network, (ii) I am running one of them but am flagged as 'Unnamed' because someone else claimed the 'Bob' nickname first, and (iii) I run my Tor as both client and exit the following can happen to me: - I go to www.evil.com - I click on a link www.evil.com.bob.exit - My request will exit through my own Tor node rather than the 'Named' node Bob or any of the others. - www.evil.com now knows I am actually browsing from the same computer that is running my 'Bob' node So to solve both issues we need to ensure: - When fulfilling a .exit request we only choose a routerinfo if it exists in the routerlist, even when that routerinfo is ours. - When getting a router by nickname we only return our own router information if it is not going to be used for building a circuit. We ensure this by removing the special treatment afforded our own router in router_get_by_nickname(). This means the function will only return the routerinfo of our own router if it is in the routerlist built from authority info and has a unique nickname or is bound to a non-unique nickname. There are some uses of router_get_by_nickname() where we are looking for the router by name because of a configuration directive, specifically local declaration of NodeFamilies and EntryNodes and other routers' declaration of MyFamily. In these cases it is not at first clear if we need to continue returning our own routerinfo even if our router is not listed and/or has a non-unique nickname with the Unnamed flag. The patch treats each of these cases as follows: Other Routers' Declaration of MyFamily This happens in routerlist_add_family(). If another router declares our router in its family and our router has the Unnamed flag or is not in the routerlist yet, should we take advantage of the fact that we know our own routerinfo to add us in anyway? This patch says 'no, treat our own router just like any other'. This is a safe choice because it ensures our client has the same view of the network as other clients. We also have no good way of knowing if our router is Named or not independently of the authorities, so we have to rely on them in this. Local declaration of NodeFamilies Again, we have no way of knowing if the declaration 'NodeFamilies Bob,Alice,Ringo' refers to our router Bob or the Named router Bob, so we have to defer to the authorities and treat our own router like any other. Local declaration of NodeFamilies Again, same as above. There's also no good reason we would want our client to choose it's own router as an entry guard if it does not meet the requirements expected of any other router on the network. In order to reduce the possibility of error, the patch also replaces two instances where we were using router_get_by_nickname() with calls to router_get_by_hexdigest() where the identity digest of the router is available.
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-10-21
|\| |
| * | Merge remote branch 'sebastian/relay_early_rend' into maint-0.2.2Nick Mathewson2010-10-21
| |\ \
| | * | Send relay_early cells in rend circsSebastian Hahn2010-10-18
| | | | | | | | | | | | | | | | | | | | There are no relay left that run version 0.2.1.3 through 0.2.1.18, so changing this behaviour should be safe now.
* | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-10-20
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/or/networkstatus.c
| * | | Fix a logic error in 98aee84. Found by boboperNick Mathewson2010-10-20
| | | |
* | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-10-20
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/or/networkstatus.c
| * | | Add a ! to directory_caches_dir_info() to fix a logic errorNick Mathewson2010-10-20
| | | | | | | | | | | | | | | | | | | | | | | | We want to fetch directory info more aggressively if we need it to refuseunknownexits. Thus, we'll want it if our exit policy is _NOT_ reject *.
| * | | Fix a read of a freed pointer while in set_current_consensusNick Mathewson2010-10-20
| |/ / | | | | | | | | | | | | Found by rransom while working on issue #988. Bugfix on 0.2.2.17-alpha. Fixes bug 2097.
* | | clarify fmt_addr32 documentation to note that the address is in host-orderNick Mathewson2010-10-15
| | |
* | | Fix one-time memory leak when initializing libevent. Spotted by SebastianNick Mathewson2010-10-15
| | |
* | | Merge branch 'bug1992_part1'Nick Mathewson2010-10-15
|\ \ \
| * | | Tweak the fmt_addr32 codeNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | Clarify documentation, rename a local, and fix a memory leak.
| * | | refactor all these tor_inet_ntoa idiomsRoger Dingledine2010-10-01
| | | | | | | | | | | | | | | | but don't refactor the ones that look messy
* | | | Remove more unused code from routerlist.cNick Mathewson2010-10-15
| | | |
* | | | Remove an unused field from circ_buffer_stats_tNick Mathewson2010-10-15
| | | |
* | | | Improve accuracy of comment about aes_crypt performanceNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old comment was from before I tried a huge pile of crazy stuff to make the inner loop faster. Short answer: GCC already knows how to unroll loops pretty well. Other short answer: we should have made the relay payload size an even multiple of 4, 8, or ideally 16.
* | | | Fix a documention issue in circuitlist.cNick Mathewson2010-10-15
| | | |
* | | | Kill comments saying to remove asserts once bug930 is solved.Nick Mathewson2010-10-15
| | | | | | | | | | | | | | | | It's okay to leave the asserts in: the code doesn't appear in profiles.
* | | | fix another typoRoger Dingledine2010-10-15
| | | |
* | | | Fix an apostrophe in a commentNick Mathewson2010-10-15
| | | |
* | | | Fold timestamp_created into highres_createdNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to keep a time_t and a struct timeval to represent the same value: highres_created.tv_sec was the same as timestamp_created. This should save a few bytes per circuit.
* | | | Add a portable tor_timercmpNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | | | | | | | We can't use the platform timercmp, because 1) some platforms don't have them 2) some that do have them only support certain relational operators
* | | | Remove XXXs about improving buf_t API: bufferevents are the futureNick Mathewson2010-10-15
| | | |
* | | | Make the return value of tor_addr_sockaddr always be signedNick Mathewson2010-10-15
| | | |
* | | | Remove "is this too slow?" XXXX comments for code not appearing in profilesNick Mathewson2010-10-15
| | | |
* | | | Remove the unused old fuzzy-time codeNick Mathewson2010-10-15
| | | |
* | | | Fix an xxx wrt picking libevent methods known-to-workNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | | | | | | | The short version is, "where we want to do it, we have nothing real to chose from and we can't do it easily. Where it's easy to do, we have no reason to do it yet."
* | | | Remove an XXX in ntmain.c: a simple function call per loop is not so expensive.Nick Mathewson2010-10-15
| | | |
* | | | Make check-spaces happySebastian Hahn2010-10-14
| | | |
* | | | Rename router_get_by_digest()Sebastian Hahn2010-10-14
| | | | | | | | | | | | | | | | | | | | We now call the function router_get_by_id_digest() to make clear that we're talking about the identity digest here, not descriptor digest.
* | | | Fix a few trivial bugs from the nodelist mergeNick Mathewson2010-10-13
| | | |
* | | | Fix some XXXXs in connection_add_impl related to bufferevent error checkingNick Mathewson2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This might make bufferevents more asserty for a while, but they should make other bugs less likely to go unnoticed. Noted by Sebastian.
* | | | Fix a couple users of buf_datalen that slipped in. Found by SebastianNick Mathewson2010-10-13
| | | |
* | | | Implement node_set_exit_policy_to_reject_all with a flagNick Mathewson2010-10-13
| | | | | | | | | | | | | | | | Also remove some debugging code.
* | | | Merge remote branch 'arma/bug1982_2'Nick Mathewson2010-10-13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Resolved a minor conflict in: src/or/circuitbuild.c
| * | | | allow countries and IP addresses in EntryNodesRoger Dingledine2010-09-29
| | | | |
* | | | | Merge branch 'nodes'Nick Mathewson2010-10-13
|\ \ \ \ \
| * | | | | Add some missing documentation for things added in nodes branchNick Mathewson2010-10-07
| | | | | |
| * | | | | Fix a compile warning on OSX 10.6Sebastian Hahn2010-10-07
| | | | | |
| * | | | | Spotted another missing checkNick Mathewson2010-10-05
| | | | | |
| * | | | | Fix a couple more node_t-related nullpointer bugsNick Mathewson2010-10-04
| | | | | |
| * | | | | Switch an && to an ||, stop a *NULL.Nick Mathewson2010-10-04
| | | | | |
| * | | | | More debugging code for node_t branchNick Mathewson2010-10-01
| | | | | |
| * | | | | Implement policies for nodes (and for microdescriptors too)Nick Mathewson2010-10-01
| | | | | |
| * | | | | Fix a bug in smartlist_choose_node_by_bandwidthNick Mathewson2010-10-01
| | | | | |