summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-30net: Make all address bytes functions take uint8_t *teor
Part of 33817.
2020-04-30Rename tor_addr_get_ipv6_bytes to tor_addr_copy_ipv6_bytesteor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ tor_addr_get_ipv6_bytes tor_addr_copy_ipv6_bytes
2020-04-29changes: file for 33817teor
2020-04-29relay: Refactor choosing extend IPsteor
Flatten the logic in circuit_choose_ip_ap_for_extend(). Part of 33817.
2020-04-29relay: Add tests for choosing extend IPsteor
Part of 33817.
2020-04-29relay: Refactor circuit_open_connection_for_extend()teor
Refactor circuit_open_connection_for_extend(), splitting out the IP address choice code into a new function. Adds unit tests. No behaviour changes in tor. Part of 33817.
2020-04-29relay: Add IP version tests for circuit extendsteor
Add IPv4-only and IPv6-only tests for circuit_open_connection_for_extend(). Part of 33817.
2020-04-29relay: Choose between IPv4 and IPv6 extends at randomteor
When an EXTEND2 cell has an IPv4 and an IPv6 address, choose one of them uniformly at random. Part of 33817.
2020-04-29relay/circuitbuild: Refactor open connection for extendteor
Re-use the newly created extend_info to launch the connection in circuit_open_connection_for_extend(). No behaviour change. Part of 33817.
2020-04-29test/circuitbuild: Disable some tests when ALL_BUGS_ARE_FATALteor
Some tests use IF_BUG_ONCE(), which is fatal when ALL_BUGS_ARE_FATAL, after the fixes in 33917. Also run "make autostyle" on these changes. Part of 33817.
2020-04-29log/util_bug: Make IF_BUG_ONCE() support ALL_BUGS_ARE_FATALteor
... and DISABLE_ASSERTS_IN_UNIT_TESTS. Make all of tor's assertion macros support the ALL_BUGS_ARE_FATAL and DISABLE_ASSERTS_IN_UNIT_TESTS debugging modes. Implements these modes for IF_BUG_ONCE(). (It used to log a non-fatal warning, regardless of the debugging mode.) Fixes bug 33917; bugfix on 0.2.9.1-alpha.
2020-04-29relay/circuitbuild: Re-use IPv6 connections for circuitsteor
Search for existing connections using the remote IPv4 and IPv6 addresses. Part of 33817.
2020-04-29relay/circuitbuild: Report IPv6 addresses in a debug logteor
Part of 33817.
2020-04-29channel: Make channel_matches_target_addr_for_extend() staticteor
It isn't used outside channel.c. Part of 33817.
2020-04-29relay/circuitbuild: Consider IPv6-only extends validteor
Allow extend cells with IPv6-only link specifiers. Warn and fail if both IPv4 and IPv6 are invalid. Also warn if the IPv4 or IPv6 addresses are unexpectedly internal, but continue with the valid address. Part of 33817.
2020-04-29test/circuitbuild: Show bad addresses in some logsteor
Disable SafeLogging for some extend tests, so we can check the actual addresses. Part of 33817.
2020-04-29relay: Log the address in circuit protocol warningsteor
Always log the address family in extend protocol warnings. If SafeLogging is 0, also log the address and port. Diagnostics for 33817.
2020-04-29net: Add fmt_addrport_ap() and fmt_addr_family()teor
Add fmt_addrport_ap(), a macro that takes a tor_addr_port_t, and uses it to call fmt_addrport(). Add fmt_addr_family(), a function that returns a string constant describing the address family. Utility functions for 33817.
2020-04-29net: Remove an extra space in address.hteor
2020-04-29relay: Refactor address checks into a functionteor
No behaviour change. Part of 33817.
2020-04-29relay: Refactor address and port checksteor
tor_addr_port_is_valid_ap(ap, 0) checks if the address or port are zero, exactly like the previous code. Preparation for 33817.
2020-04-29core/or: Check extends for zero addresses and portsteor
Check for invalid zero IPv4 addresses and ports, when sending and receiving extend cells. Fixes bug 33900; bugfix on 0.2.4.8-alpha.
2020-04-29test/cell_formats: Expand the IPv6-only EXTEND2 testteor
Part of 33901.
2020-04-29core/or: Support IPv6 EXTEND2 cellsteor
Allow clients and relays to send dual-stack and IPv6-only EXTEND2 cells. Parse dual-stack and IPv6-only EXTEND2 cells on relays. Relays do not make connections or extend circuits via IPv6: that's the next step. Closes ticket 33901.
2020-04-29Run "make autostyle"teor
2020-04-29rand: Clarify the crypto_rand_uint() rangeteor
2020-04-29nodelist: Remove an outdated commentteor
Part of 33817.
2020-04-28channeltls: Clarify a relay impersonation defenceteor
Clarify the comments in channel_tls_matches_target_method(), and make it clear that the attack is a covert attack.
2020-04-24Merge remote-tracking branch 'tor-github/pr/1862/head'Nick Mathewson
2020-04-21Merge branch 'maint-0.4.3'Nick Mathewson
2020-04-21channeltls: Stop truncating IPv6 in logsteor
Stop truncating IPv6 addresses and ports in channel and connection logs. Fixes bug 33918; bugfix on 0.2.4.4-alpha.
2020-04-15test/channel: Fix a comment typoteor
2020-04-14Merge remote-tracking branch 'tor-github/pr/1860/head'Nick Mathewson
2020-04-14Run practracker regenteor
Lock-in improvements. Accept some small function size increases. Allow a small amount of extra file size increase.
2020-04-14core/or: Update file comment in connection_or.cteor
Fix a typo, and say "v3 (and later) handshake". Comment-only change.
2020-04-14core/or: Accurately log remote relay IPv6 addressesteor
Log IPv6 addresses on connections where this relay is the responder. Previously, responding relays would replace the remote IPv6 address with the IPv4 address from the consensus. (The port is replaced with the IPv6 ORPort from the consensus, we will resolve this issue in 33898.) Fixes bug 33899; bugfix on 0.3.1.1-alpha.
2020-04-14core/or: Allow IPv6 connections to be canonicalteor
Consider IPv6 addresses when checking if a connection is canonical. In 17604, relays assumed that a remote relay could consider an IPv6 connection canonical, but did not set the canonical flag on their side of the connection. Fixes bug 33899; bugfix on 0.3.1.1-alpha.
2020-04-14core/or: Remove unused function prototypeteor
Remove the unused function prototype for connection_or_get_for_extend(). There is no function implementation. Part of 33817.
2020-04-13Merge branch 'maint-0.4.3'Nick Mathewson
"ours" to avoid version bump.
2020-04-13bump to 0.4.3.4-rc-devNick Mathewson
2020-04-13copy 0.4.3.4-rc changelog forward.Nick Mathewson
2020-04-13Merge branch 'maint-0.4.3'Nick Mathewson
2020-04-13Merge branch 'bug33545_043_squashed' into maint-0.4.3Nick Mathewson
2020-04-13hs-v3: Change all-zeroes hard-assert to a BUG-and-err.George Kadianakis
And also disallow all-zeroes keys from the filesystem; add a test for it too.
2020-04-13hs-v3: Don't allow registration of an all-zeroes client auth key.George Kadianakis
The client auth protocol allows attacker-controlled x25519 private keys being passed around, which allows an attacker to potentially trigger the all-zeroes assert for client_auth_sk in hs_descriptor.c:decrypt_descriptor_cookie(). We fixed that by making sure that an all-zeroes client auth key will not be used. There are no guidelines for validating x25519 private keys, and the assert was there as a sanity check for code flow issues (we don't want to enter that function with an unitialized key if client auth is being used). To avoid such crashes in the future, we also changed the assert to a BUG-and-err.
2020-04-12Fix typo in router_build_fresh_unsigned_routerinfo() commentNeel Chauhan
2020-04-09Merge remote-tracking branch 'tor-github/pr/1801/head'Nick Mathewson
2020-04-09Merge branch 'maint-0.4.3'Nick Mathewson
"ours" to avoid version bump
2020-04-09bump to 0.4.3.4-rcNick Mathewson
2020-04-09Merge branch 'maint-0.4.3'Nick Mathewson