aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-07-18Update geoip and geoip6 to the July 6 2016 database.Karsten Loesing
2016-07-05Merge branch 'maint-0.2.7' into release-0.2.7Nick Mathewson
2016-07-05Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2016-07-05Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2016-07-05Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-07-05whoops. changelog file for 19271.Nick Mathewson
2016-07-05Merge branch 'maint-0.2.7' into release-0.2.7Nick Mathewson
2016-07-05Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2016-07-05Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2016-07-05Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-07-03Remove urras as a default trusted directory authoritySebastian Hahn
It had been a directory authority since 0.2.1.20.
2016-06-13Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2016-06-13Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2016-06-13Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-06-12Update geoip and geoip6 to the June 7 2016 database.Karsten Loesing
2016-06-02Use tor_sscanf, not sscanf, in test_util.c.Nick Mathewson
Fixes the 0.2.7 case of bug #19213, which prevented mingw64 from working.
2016-05-25Fix a dangling pointer issue in our RSA keygen codeNick Mathewson
If OpenSSL fails to generate an RSA key, do not retain a dangling pointer to the previous (uninitialized) key value. The impact here should be limited to a difficult-to-trigger crash, if OpenSSL is running an engine that makes key generation failures possible, or if OpenSSL runs out of memory. Fixes bug 19152; bugfix on 0.2.1.10-alpha. Found by Yuan Jochen Kang, Suman Jana, and Baishakhi Ray. This is potentially scary stuff, so let me walk through my analysis. I think this is a bug, and a backport candidate, but not remotely triggerable in any useful way. Observation 1a: Looking over the OpenSSL code here, the only way we can really fail in the non-engine case is if malloc() fails. But if malloc() is failing, then tor_malloc() calls should be tor_asserting -- the only way that an attacker could do an exploit here would be to figure out some way to make malloc() fail when openssl does it, but work whenever Tor does it. (Also ordinary malloc() doesn't fail on platforms like Linux that overcommit.) Observation 1b: Although engines are _allowed_ to fail in extra ways, I can't find much evidence online that they actually _do_ fail in practice. More evidence would be nice, though. Observation 2: We don't call crypto_pk_generate*() all that often, and we don't do it in response to external inputs. The only way to get it to happen remotely would be by causing a hidden service to build new introduction points. Observation 3a: So, let's assume that both of the above observations are wrong, and the attacker can make us generate a crypto_pk_env_t with a dangling pointer in its 'key' field, and not immediately crash. This dangling pointer will point to what used to be an RSA structure, with the fields all set to NULL. Actually using this RSA structure, before the memory is reused for anything else, will cause a crash. In nearly every function where we call crypto_pk_generate*(), we quickly use the RSA key pointer -- either to sign something, or to encode the key, or to free the key. The only exception is when we generate an intro key in rend_consider_services_intro_points(). In that case, we don't actually use the key until the intro circuit is opened -- at which point we encode it, and use it to sign an introduction request. So in order to exploit this bug to do anything besides crash Tor, the attacker needs to make sure that by the time the introduction circuit completes, either: * the e, d, and n BNs look valid, and at least one of the other BNs is still NULL. OR * all 8 of the BNs must look valid. To look like a valid BN, *they* all need to have their 'top' index plus their 'd' pointer indicate an addressable region in memory. So actually getting useful data of of this, rather than a crash, is going to be pretty damn hard. You'd have to force an introduction point to be created (or wait for one to be created), and force that particular crypto_pk_generate*() to fail, and then arrange for the memory that the RSA points to to in turn point to 3...8 valid BNs, all by the time the introduction circuit completes. Naturally, the signature won't check as valid [*], so the intro point will reject the ESTABLISH_INTRO cell. So you need to _be_ the introduction point, or you don't actually see this information. [*] Okay, so if you could somehow make the 'rsa' pointer point to a different valid RSA key, then you'd get a valid signature of an ESTABLISH_INTRO cell using a key that was supposed to be used for something else ... but nothing else looks like that, so you can't use that signature elsewhere. Observation 3b: Your best bet as an attacker would be to make the dangling RSA pointer actually contain a fake method, with a fake RSA_private_encrypt function that actually pointed to code you wanted to execute. You'd still need to transit 3 or 4 pointers deep though in order to make that work. Conclusion: By 1, you probably can't trigger this without Tor crashing from OOM. By 2, you probably can't trigger this reliably. By 3, even if I'm wrong about 1 and 2, you have to jump through a pretty big array of hoops in order to get any kind of data leak or code execution. So I'm calling it a bug, but not a security hole. Still worth patching.
2016-05-12Merge branch 'bug18977_026_v2' into maint-0.2.7Nick Mathewson
2016-05-12Merge branch 'bug18977_024_v2' into bug18977_026_v2Nick Mathewson
Had conflicts related to other correct_tm bugs in 0.2.6. Added wday for another case.
2016-05-12Have correct_tm set tm_wday as well.Nick Mathewson
The tm_wday field had been left uninitialized, which was causing some assertions to fail on Windows unit tests. Fixes bug 18977.
2016-05-11unbreak the build (when warnings are enabled)Roger Dingledine
2016-05-11Merge remote-tracking branch 'special/bug19032-027' into maint-0.2.7Nick Mathewson
2016-05-11Fix out-of-bounds write during voting with duplicate ed25519 keysJohn Brooks
In dirserv_compute_performance_thresholds, we allocate arrays based on the length of 'routers', a list of routerinfo_t, but loop over the nodelist. The 'routers' list may be shorter when relays were filtered by routers_make_ed_keys_unique, leading to an out-of-bounds write on directory authorities. This bug was originally introduced in 26e89742, but it doesn't look possible to trigger until routers_make_ed_keys_unique was introduced in 13a31e72. Fixes bug 19032; bugfix on tor 0.2.8.2-alpha.
2016-05-11Merge branch 'bug18841_1_025' into maint-0.2.7Nick Mathewson
2016-05-11Undefine _FORTIFY_SOURCE before defining it.Nick Mathewson
This makes our compilation options checks in autoconf work better on systems that already define _FORTIFY_SOURCE. Fixes at least one case of bug 18841; bugfix on 0.2.3.17-beta. Patch from "trudokal".
2016-05-09Merge branch 'bug19008_027' into maint-0.2.7Nick Mathewson
2016-05-09Add "-c 1" to ping6 in test-network-allNick Mathewson
Fixes bug 19008. bugfix on 0.2.7.3-rc
2016-05-09Merge branch 'maint-0.2.7' into release-0.2.7Nick Mathewson
2016-05-09Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2016-05-09Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2016-05-09Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-05-09Update geoip and geoip6 to the May 4 2016 database.Karsten Loesing
2016-05-04Fix dnsserv.c assertion when no supported questions are requested.Scott Dial
The problem is that "q" is always set on the first iteration even if the question is not a supported question. This set of "q" is not necessary, and will be handled after exiting the loop if there if a supported q->type was found. [Changes file by nickm] lease enter the commit message for your changes. Lines starting
2016-04-12Do not link tests against both libor.a and libor-testing.aNick Mathewson
Also, put libor-testing.a at a better position in the list of libraries, to avoid linker errors. This is a fix, or part of a fix, for 18490. Conflicts: src/test/include.am
2016-04-07Merge branch 'maint-0.2.7' into release-0.2.7Nick Mathewson
2016-04-07Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2016-04-07Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2016-04-07Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-04-07Update geoip and geoip6 to the April 5 2016 database.Karsten Loesing
2016-03-30Merge branch 'bug15221_027' into maint-0.2.7Andrea Shepard
2016-03-29Merge branch 'bug18570_027' into maint-0.2.7Andrea Shepard
2016-03-29Merge branch 'bug16248_027' into maint-0.2.7Andrea Shepard
2016-03-21Merge branch 'maint-0.2.7' into release-0.2.7Nick Mathewson
2016-03-21Merge branch 'ed25519_voting_fixes_squashed' into maint-0.2.7Nick Mathewson
2016-03-21Use nth consistently in dircollate.h.Nick Mathewson
Documentation-only patch. Issue 17668.T6.
2016-03-21In routers_make_ed_keys_unique, break ties for published_onNick Mathewson
This ensures that if we can't use published_on to decide an ed,rsa mapping, we at least decide deterministically. Resolves 17668.T3
2016-03-21Assert that dircollator is collated when we're reading its output.Nick Mathewson
Fix for 17668.S2.
2016-03-21After we strip out duplicate entries from 'routers', don't use 'rl'.Nick Mathewson
We've got to make sure that every single subsequent calculation in dirserv_generate_networkstatus_vote_obj() are based on the list of routerinfo_t *after* we've removed possible duplicates, not before. Fortunately, none of the functions that were taking a routerlist_t as an argument were actually using any fields other than this list of routers. Resolves issue 18318.DG3.
2016-03-21Fix another case of 17668: Add NoEdConsensusNick Mathewson
I had a half-built mechanism to track, during the voting process, whether the Ed25519 value (or lack thereof) reflected a true consensus among the authorities. But we never actually inserted this field in the consensus. The key idea here is that we first attempt to match up votes by pairs of <Ed,RSA>, where <Ed> can be NULL if we're told that there is no Ed key. If this succeeds, then we can treat all those votes as 'a consensus for Ed'. And we can include all other votes with a matching RSA key and no statement about Ed keys as being "also about the same relay." After that, we look for RSA keys we haven't actually found an entry for yet, and see if there are enough votes for them, NOT considering Ed keys. If there are, we match them as before, but we treat them as "not a consensus about ed". When we include an entry in a consensus, if it does not reflect a consensus about ed keys, then we include a new NoEdConsensus flag on it. This is all only for consensus method 22 or later. Also see corresponding dir-spec patch.
2016-03-21Document has_ed25519_listingNick Mathewson