teor
07c008c672
relay: Refactor address and port checks
...
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-29 22:43:09 +10:00
teor
3253c357ee
Run "make autostyle"
2020-04-29 22:08:33 +10:00
teor
398e0e0247
nodelist: Remove an outdated comment
...
Part of 33817.
2020-04-29 21:50:26 +10:00
Nick Mathewson
77e65076ab
Merge remote-tracking branch 'tor-github/pr/1860/head'
2020-04-14 11:52:00 -04:00
Nick Mathewson
e22a8d9c95
Merge branch 'maint-0.4.3'
2020-04-13 14:14:41 -04:00
Nick Mathewson
55cb6c3fcd
Merge branch 'bug33545_043_squashed' into maint-0.4.3
2020-04-13 14:13:44 -04:00
George Kadianakis
f2f718bca5
hs-v3: Change all-zeroes hard-assert to a BUG-and-err.
...
And also disallow all-zeroes keys from the filesystem; add a test for it too.
2020-04-13 14:13:33 -04:00
George Kadianakis
37bcc9f3d2
hs-v3: Don't allow registration of an all-zeroes client auth key.
...
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-13 14:13:33 -04:00
Neel Chauhan
8e59b8560a
Return a descriptive error for 'GETINFO status/fresh-relay-descs'
2020-04-12 13:13:50 -07:00
Neel Chauhan
a638514783
Fix typo in router_build_fresh_unsigned_routerinfo() comment
2020-04-12 12:43:21 -07:00
Nick Mathewson
80031db32a
Merge remote-tracking branch 'tor-github/pr/1801/head'
2020-04-09 11:50:20 -04:00
David Goulet
cca9e1c803
hs-v3: Several fixes after #32542 review
...
asn: Accidentally left this commit out when merging #32542 , so cherry-picking
it now.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-09 13:59:18 +03:00
teor
cb262930f5
relay: Run "make autostyle"
...
But only take the changes from the relay module.
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
d79e5d52bc
relay/circuitbuild: Refactor circuit_extend()
...
Make the "else" case explicit at the end of the function.
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
f8fef609f6
nodelist: Make some functions mockable
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
ec632b01db
relay: End circuitbuild logs with "."
...
Consistent logs make testing easier.
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
4f9f56be47
relay: Check for NULL arguments in circuitbuild
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
b10b287589
relay: Make circuitbuild functions STATIC
...
Allow the circuitbuild_relay functions to be accessed by the unit tests.
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
44f634d0be
relay: Remove a redundant function return value
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
ca9565b9f7
relay: Split out opening a connection for an extend
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
2640030b10
relay: Refactor some long lines from circuit_extend()
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
5cb2bbea7d
relay: Split link specifier checks from circuit_extend()
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
2563d74a5c
relay: Split state checks out of circuit_extend()
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
beee9ca608
relay: Improve the comments on onionskin_answer()
...
Part of 33633.
2020-04-09 11:00:04 +10:00
teor
c9b674d511
relay: Protocol warn when a client gets an extend
...
circuit_extend() may be called when a client receives an extend cell,
even if the relay module is disabled.
Log a protocol warning when the relay module is disabled.
Part of 33633.
2020-04-09 10:59:51 +10:00
Roger Dingledine
9bd73da7cf
fix typos from #32542
2020-04-08 19:13:52 -04:00
George Kadianakis
7a82c972ef
Merge branch 'tor-github/pr/1857'
2020-04-08 18:15:37 +03:00
David Goulet
6ab11bbf30
hs-v3: Report SOCKS ExtendedErrors when all intro timed out
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-08 07:56:54 -04:00
David Goulet
cf39276f78
hs-v3: Report rendezvous circuit failure SOCKS ExtendedErrors
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-08 07:56:54 -04:00
David Goulet
fdd6352506
hs-v3: Report introduction failure SOCKS ExtendedErrors
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-08 07:56:54 -04:00
David Goulet
6fbf624b50
hs-v3: Fix typo in log info when PublishHidServDescriptors is set to 0
...
Fixes #33779
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-07 13:17:21 -04:00
teor
065ccda4f6
Merge branch 'pr1838_squashed'
2020-04-07 17:36:17 +10:00
David Goulet
eecf6c5199
hs-v3: Move to log notice the registration of an OB instance
...
This is to allow a visual feedback in the logs for operators setting up Onion
Balance so they can confirm they properly configured the instances.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-01 08:31:20 -04:00
David Goulet
b5412d12f9
Merge branch 'tor-github/pr/1844'
2020-04-01 08:22:36 -04:00
George Kadianakis
8fda94f944
hs-v3: Move ob_subcreds to hs_service_state_t.
...
It's more natural there since it's runtime state.
2020-03-30 23:37:26 +03:00
George Kadianakis
0667a5af8d
hs-v3: Don't crash after SIGHUP in Onionbalance backend mode.
...
The ob_subcreds array was not copied after SIGHUP, and that left the
post-SIGHUP service with a NULL ob_subcreds pointer (until the next descriptor
gets build where we regenerate ob_subcreds in hs_ob_refresh_keys()).
Fixes bug #33762 ; not in any released tor version.
2020-03-30 23:35:19 +03:00
David Goulet
ca8e6451f2
Merge branch 'maint-0.4.3'
2020-03-30 13:38:58 -04:00
George Kadianakis
42e56f5bac
hs-v3: Relax severity of a log message when decoding descriptors.
...
Make it LOG_PROTOCOL_WARN and also add the expiration timestamp in there to
ease debugging in the future.
2020-03-30 13:38:29 -04:00
David Goulet
27e2989fe9
Merge branch 'tor-github/pr/1775'
2020-03-30 13:31:56 -04:00
Nick Mathewson
0dc25a4b66
Use a macro to make our hs_opts checking terser.
2020-03-30 13:31:44 -04:00
Nick Mathewson
84868109d2
Use SECTION_HEADER, not "HiddenServiceDir".
...
Add a nonfatal assertion about a branch that should be unreachable.
2020-03-30 13:31:44 -04:00
Nick Mathewson
d421050f3a
Derive hidden service configuration from hs_opts_t.
...
This simplifies our parsing code by about 150 lines, and makes the
functions more straightforward.
2020-03-30 13:31:44 -04:00
Nick Mathewson
cfaf1bca98
Start using confmgt logic to parse HS configuration.
...
This patch doesn't actually use the results of the parsed object to
create the service configuration: subsequent patches will do
that. This patch just introduces the necessary configuration tables
and starts using them to validate the configuration.
As of this writing, this patch breaks tests. I'll likely fix that
in a rebase later on: the current error messages for failures to
parse options are a regression, so I've opened #33640 for that.
2020-03-30 13:31:44 -04:00
Nick Mathewson
43b578e099
Use config_lines_partition() to parse hs config sections.
2020-03-30 13:31:44 -04:00
Roger Dingledine
f8ecf01cc1
spell consensus more right in comments
2020-03-27 02:56:59 -04:00
Roger Dingledine
a4304c6031
fix typo in log message
2020-03-27 02:51:01 -04:00
Nick Mathewson
3f6e37b1bc
Add a SUBSYS_DECLARE_LOCATION() to every subsystem.
2020-03-26 11:20:20 -04:00
Nick Mathewson
e7290dc8c0
Merge remote-tracking branch 'tor-github/pr/1780/head'
2020-03-26 10:38:08 -04:00
Nick Mathewson
2eb78e2061
Merge branch 'bug33651'
2020-03-25 10:38:01 -04:00
teor
4b914dea02
Merge branch 'bug32588_043' into bug32588_master
2020-03-21 04:02:08 +10:00