aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-12-16Remove the version prefix from version numberscypherpunks
2016-12-16Remove the trailing dot from version numberscypherpunks
2016-12-16Merge remote-tracking branch 'public/ticket19142'Nick Mathewson
2016-12-15Fix a lovely heisenbug in rend_cache/store_v2_desc_as_clientNick Mathewson
Act I. " But that I am forbid To tell the secrets of my prison-house, I could a tale unfold..." Here's the bug: sometimes, rend_cache/store_v2_desc_as_client would say: "Dec 15 08:31:26.147 [warn] rend_cache_store_v2_desc_as_client(): Bug: Couldn't decode base32 [scrubbed] for descriptor id. (on Tor 0.3.0.0-alpha-dev 4098bfa26073551f)" When we merged ade5005853c17b3 back in 0.2.8.1-alpha, we added that test: it mangles the hidden service ID for a hidden service, and ensures that when the descriptor ID doesn't match the descriptor's key, we don't store the descriptor. How did it mangle the descriptor ID? By doing desc_id_base32[0]++; So, if the hidden service ID started with z or 7, we'd wind up with an invalid base32 string, and get the warning. And if it started with any other character, we wouldn't. That there is part 1 of the bug: in 2/32 cases, we'd get a BUG warning. But we wouldn't display it, since warnings weren't shown from the unit tests. Act II. "Our indiscretion sometime serves us well, When our deep plots do pall" Part two: in 0.2.9.3-alpha, for part of #19999, we turned on BUG warnings in the unit tests, so that we'd actually start seeing them. At this point we also began to consider each BUG warning that made it through the unit tests to be an actual bug. So before this point, we wouldn't actually notice anything happening in those 2/32 cases. So, at this point it was a nice random _visible_ bug. Act III. "Our thoughts are ours, their ends none of our own" In acbb60cd6310d30c8cb763, which was part of my prop220 work, I changed how RSA key generation worked in the unit tests. While previously we'd use pre-made RSA keys in some cases, this change made us use a set of pregenerated RSA keys for _all_ 1024 or 2048 keys, and to return them in a rotation when Tor tried to generate a key. And now we had the heisenbug: anything that affected the number of pregenerated keys that we had yielded before reaching rend_cache/store_v2_desc_as_client would make us return a different key, which would give us a different base32 ID, which would make the bug occur, or not. So as we added or removed test cases, the bug might or might not happen. So yeah. Don't mangle a base32 ID like that. Do it this way instead.
2016-12-14Fix double-typedef of or_circuit_t.Nick Mathewson
2016-12-14Fix a few clang warnings.Nick Mathewson
2016-12-14whitespace fixesNick Mathewson
2016-12-14Fix a "make check" regression in --list-fingerprint.Nick Mathewson
2016-12-14Merge branch 'dgoulet_ticket19043_030_03_squashed'Nick Mathewson
2016-12-14prop224: Use LOG_PROTOCOL_WARN instead of log_warn(LD_PROTOCOL, ...) in ↵David Goulet
hs_intropoint.c Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-14crypto: Change crypto_mac_sha3_256 to use the key length in the constructionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-14prop224: Add unittests handling v3 ESTABLISH_INTRO cells.George Kadianakis
Test for both v2 and v3 ESTABLISH_INTRO handling.
2016-12-14prop224: Use new HS functions in old HS code.George Kadianakis
This is needed to make old code unittestable.
2016-12-14prop224: Introduce the new introduction point code.George Kadianakis
(pun not intended) Now our code supports both legacy and prop224 ESTABLISH_INTRO cells :) hs_intro_received_establish_intro() is the new entry point.
2016-12-14prop224: Add code that generates ESTABLISH_INTRO cells.George Kadianakis
Currently unused. It will only be used for creating ESTABLISH_INTRO cells in unittests :)
2016-12-14prop224 prepwork: Use of HS circuitmap in existing HS code.George Kadianakis
The new HS circuitmap API replaces old public functions as follows: circuit_clear_rend_token -> hs_circuitmap_remove_circuit circuit_get_rendezvous -> hs_circuitmap_get_rend_circ circuit_get_intro_point -> hs_circuitmap_get_intro_circ_v2 circuit_set_rendezvous_cookie -> hs_circuitmap_register_rend_circ circuit_set_intro_point_digest -> hs_circuitmap_register_intro_circ_v2 This commit also removes the old rendinfo code that is now unused. It also fixes the broken rendinfo unittests.
2016-12-14prop224 prepwork: Introduce HS circuitmap subsystem.George Kadianakis
The HS circuitmap is a hash table that maps introduction and rendezvous tokens to specific circuits such that given a token it's easy to find the corresponding circuit. It supports rend circuits and v2/v3 intro circuits. It will be used by the prop224 ESTABLISH_INTRO code to register and lookup v3 introduction circuits. The next commit after this removes the old code and fixes the unittests. Please consult both commits while reviewing functionality differences between the old and new code. Let me know if you want this rebased differently :) WRT architectural differences, this commit removes the rendinfo pointer from or_circuit_t. It then adds an hs_token_t pointer and a hashtable node for the HS circuitmap. IIUC, this adds another pointer to the weight of or_circuit_t. Let me know if you don't like this, or if you have suggestions on improving it.
2016-12-14prop224 prepwork: Finish decoupling old ESTABLISH_INTRO creation logic.George Kadianakis
2016-12-14prpo224 prepwork: Decouple legacy ESTABLISH_INTRO creation logic.George Kadianakis
This commit only moves code.
2016-12-14prop224 prepwork: Introduce HMAC-SHA3 function.George Kadianakis
2016-12-13Merge remote-tracking branch 'teor/fix-frac-paths-comment'Nick Mathewson
2016-12-14Clarify a comment in compute_frac_paths_availableteor
2016-12-13Remove AuthDirMaxServersPerAuthAddrNick Mathewson
Back when Roger had do do most of our testing on the moria host, we needed a higher limit for the number of relays running on a single IP address when that limit was shared with an authority. Nowadays, the idea is pretty obsolete. Also remove the router_addr_is_trusted_dir() function, which served no other purpose. Closes ticket 20960.
2016-12-13Remove a little dead code from routerparse.cNick Mathewson
In c35fad2bdef47f2063ccc989cac99b154e2ee36e, merged in 0.2.4.7-alpha, we removed the code to parse v1 directory objects. When we did so, we removed everything that could set the CST_CHECK_AUTHORITY flag for check_signature_token(). So in this code, we remove the flag itself, the code to handle the flag, and a function that only existed to handle the flag.
2016-12-12Stop checking whether environ is declared.Nick Mathewson
There seems to be pretty good evidence that it's always declared, and that checking for it is pointless. Closes ticket 19142.
2016-12-12whitespace fixNick Mathewson
2016-12-12Merge branch 'people-to-node-type'Nick Mathewson
2016-12-12Replace "people" with the appropriate network component in commentsJ. Ryan Stinnett
Fixes #18145.
2016-12-12Merge remote-tracking branch 'jryans/log-severity'Nick Mathewson
2016-12-12Merge remote-tracking branch 'rubiate/ticket20511'Nick Mathewson
2016-12-12helper_compare_hs_desc: coverity memleak complaintsNick Mathewson
This test helper had a memory leak on failure, which Coverity Scan doesn't like. Closes CID 1375996 and 1375997. Not in any released Tor.
2016-12-11Merge remote-tracking branch 'dgoulet/bug20936_030_01'Nick Mathewson
2016-12-11Merge branch 'maint-0.2.9'Nick Mathewson
2016-12-11Merge remote-tracking branch 'dgoulet/bug20938_029_01' into maint-0.2.9Nick Mathewson
2016-12-09test: fix memory leak in single onion poisoningDavid Goulet
Closes #20938 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-09test: Fix memory leak in test_circuituse.cDavid Goulet
Circuit object wasn't freed correctly. Also, the cpath build state object needed to be zeroed else we were freeing garbage pointers. Closes #20936 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-09Downgrade a harmless bug warning to info.Nick Mathewson
Makes 19926 less annoying in 0.2.9. In 0.3.0, we should actually fix this.
2016-12-09Merge branch 'maint-0.2.9'Nick Mathewson
2016-12-09Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-12-09Merge branch 'maint-0.2.7' into maint-0.2.8Nick Mathewson
2016-12-09Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2016-12-09Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2016-12-09Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-12-09Merge branch 'maint-0.2.9'Nick Mathewson
2016-12-09router: Fix memory leak in signed_descriptor_move()David Goulet
The signed_descriptor_move() was not releasing memory inside the destination object before overwriting it with the source object. This commit adds a reset function that free that memory inside a signed descriptor object and zero it. Closes #20715. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-09Update geoip and geoip6 to the December 7 2016 database.Karsten Loesing
2016-12-08Fix a completely stupid stack-protector warning in test_channels.cNick Mathewson
This was breaking the build on debian precise, since it thought that using a 'const int' to dimension an array made that array variable-size, and made us not get protection. Bug not in any released version of Tor. I will insist that this one wasn't my fault. "Variables won't. Constants aren't." -- Osborn's Law
2016-12-08Update to trunnel 1.5.1Nick Mathewson
2016-12-08whitespace cleanupsNick Mathewson
2016-12-08Merge branch 'feature15056_v1_squashed'Nick Mathewson