summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2015-12-10Refactor clock skew warning code to avoid duplicationArlo Breault
2015-12-10Assert when the TLS contexts fail to initializecypherpunks
2015-12-09Merge remote-tracking branch 'teor/fix-exitpolicy-leak'Nick Mathewson
2015-12-09Assert that memory held by rephist is freedcypherpunks
The internal memory allocation and history object counters of the reputation code can be used to verify the correctness of (part of) the code. Using these counters revealed an issue where the memory allocation counter is not decreased when the bandwidth arrays are freed. A new function ensures the memory allocation counter is decreased when a bandwidth array is freed. This commit also removes an unnecessary cast which was found while working on the code.
2015-12-09Merge branch 'refactor-effective-entry'Nick Mathewson
2015-12-09Tweak policies_log_first_redundant_entry even moreNick Mathewson
* Use smartlist_foreach_begin/end instead of a plain for loop. * constify the pointers.
2015-12-09Tweak policies_log_first_redundant_entry more.Nick Mathewson
* Since the variable is no longer modified, it should be called 'policy' instead of 'dest'. ("Dest" is short for "destination".) * Fixed the space issue that dgoulet found on the ticket. * Fixed the comment a little. (We use the imperative for function documentation.)
2015-12-09Merge remote-tracking branch 'teor/first-hop-no-private'Nick Mathewson
2015-12-09Assert that the directory server digest is givencypherpunks
This prevents a possible crash when memory is copied from a pointer to NULL.
2015-12-09Mention the expected length of the digestscypherpunks
Some functions that use digest maps did not mention that the digests are expected to have DIGEST_LEN bytes. This lead to buffer over-reads in the past.
2015-12-08Merge branch 'maint-0.2.7'Nick Mathewson
2015-12-08Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2015-12-08Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2015-12-08Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2015-12-08Ensure node is a guard candidate when picking a directory guardArlo Breault
2015-12-08Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2015-12-08Fix a compilation warning introduced by clang 3.6Nick Mathewson
There was a dead check when we made sure that an array member of a struct was non-NULL. Tor has been doing this check since at least 0.2.3, maybe earlier. Fixes bug 17781.
2015-12-08Fix memory leak by circuit marked for close listcypherpunks
This commit fixes a memory leak introduced by commit 8b4e5b7ee902fb7fa07767410a18433d752c7aef.
2015-12-08Merge branch 'maint-0.2.7'Nick Mathewson
2015-12-08Format IPv6 policies correctly.Nick Mathewson
Previously we'd suppressed the mask-bits field in the output when formatting a policy if it was >=32. But that should be a >=128 if we're talking about IPv6. Since we didn't put these in descriptors, this bug affects only log messages and controller outputs. Fix for bug 16056. The code in question was new in 0.2.0, but the bug was introduced in 0.2.4 when we started supporting IPv6 exits.
2015-12-07Merge remote-tracking branch 'teor/exitpolicy-multicast'Nick Mathewson
2015-12-07Comment-only change to connection_get_by_type_addr_port_purposeteor (Tim Wilson-Brown)
connection_get_by_type_addr_port_purpose also ignores connections that are marked for close.
2015-12-07Comment-only changes to connection_connectteor (Tim Wilson-Brown)
port is in host order (addr is tor_addr_t, endianness is abstracted). addr and port can be different to conn->addr and conn->port if connecting via a proxy.
2015-12-07Move a comment in router_get_my_descriptor to the correct lineteor (Tim Wilson-Brown)
2015-12-07Update comment: get_connection_array no longer takes "n"teor (Tim Wilson-Brown)
2015-12-07Consistently ignore multicast in internal reject private exit policiesteor (Tim Wilson-Brown)
Consistently ignore multicast addresses when automatically generating reject private exit policies. Closes ticket 17763. Bug fix on 10a6390deb3c9, not in any released version of Tor. Patch by "teor".
2015-12-06Make policies_log_first_redundant_entry take a const smartlist_t *teor (Tim Wilson-Brown)
Also fixup code style.
2015-12-06Refactor policies_parse_exit_policy_internalteor (Tim Wilson-Brown)
Move logging of redundant policy entries in policies_parse_exit_policy_internal into its own function. Closes ticket 17608; patch from "juce".
2015-12-06Initialise configured_addresses to a known value (NULL)teor (Tim Wilson-Brown)
2015-12-06Fix a memory leak in the exit policy parsing codecypherpunks
This memory leak only occurs when the Tor instance is not an exit node. Fixes code introduced in 10a6390deb3c9ff9fbd8078fc812abf6c77ad67f.
2015-11-30Merge branch 'maint-0.2.7'Nick Mathewson
2015-11-30Fix undefined behavior caused by memory overlapcypherpunks
The tor_cert_get_checkable_sig function uses the signing key included in the certificate (if available) when a separate public key is not given. When the signature is valid, the tor_cert_checksig function copies the public key from the checkable structure to the public key field of the certificate signing key. In situations where the separate public key is not given but the certificate includes a signing key, the source and destination pointers in the copy operation are equal and invoke undefined behavior. Undefined behaviour is avoided by ensuring both pointers are different.
2015-11-27More fixes/debugging attempts for 17659Nick Mathewson
2015-11-27Add a stack trace for help debugging one part of 17659Nick Mathewson
2015-11-27Merge branch 'fix-policies-memory-v2-squashed'Nick Mathewson
2015-11-27Fix use-after-free of stack memory in getinfo_helper_policiesteor (Tim Wilson-Brown)
2015-11-27Fix use-after-free of stack memory in policies_parse_exit_policy*teor (Tim Wilson-Brown)
Change the function names & comments to make the copying explicit.
2015-11-27Check magic number in connection_ap_attach_pendingNick Mathewson
2015-11-26improve log messages to try to track down #17659Nick Mathewson
2015-11-26Correctly free a smartlist in getinfo_helper_policiesteor (Tim Wilson-Brown)
2015-11-25Merge branch 'bug17686_v2_027'Nick Mathewson
2015-11-25Now that crypto_rand() cannot fail, it should return void.Nick Mathewson
2015-11-25Make crypto_seed_rng() and crypto_rand() less scary.Nick Mathewson
These functions must really never fail; so have crypto_rand() assert that it's working okay, and have crypto_seed_rng() demand that callers check its return value. Also have crypto_seed_rng() check RAND_status() before returning.
2015-11-25fixup! Add controller getinfo exit-policy/reject-privateteor (Tim Wilson-Brown)
Stop ignoring ExitPolicyRejectPrivate in getinfo exit-policy/reject-private. Fix a memory leak. Set ExitPolicyRejectPrivate in the unit tests, and make a mock function declaration static.
2015-11-25Merge branch 'bug17654_try1'Nick Mathewson
2015-11-25Merge remote-tracking branch 'public/decouple_dir_request_failed'Nick Mathewson
2015-11-25Fix a logic error in connection_tls_continue_handshake().Nick Mathewson
(If we take the branch above this assertion, than we *didn't* have a v1 handshake. So if we don't take the branch, we did. So if we reach this assertion, we must be running as a server, since clients no longer attempt v1 handshakes.) Fix for bug 17654; bugfix on 9d019a7db725dca3dfdbf8d4dbc3b51835e0b49e. Bug not in any released Tor.
2015-11-25Merge remote-tracking branch 'teor/comments-20151123'Nick Mathewson
2015-11-25Merge remote-tracking branch 'teor/feature8961-replaycache-sha256'Nick Mathewson
2015-11-25Merge branch 'maint-0.2.7'Nick Mathewson