Commit Graph

5396 Commits

Author SHA1 Message Date
David Goulet 26c069089b Revert "Handle empty DNS reply without error as NOERROR"
Closes #40984

This reverts commit 3d2f7c3467.
2024-10-21 12:03:54 -04:00
David Goulet 7383d462fb Merge branch 'empty-dns' into 'main'
Handle empty DNS reply without error as NOERROR

Closes #40248

See merge request tpo/core/tor!830
2024-10-10 13:22:23 +00:00
Cecylia Bocovich 1da650adb4 Fix unit test in test_entrynodes.c 2024-09-24 16:13:29 -04:00
Daniel Winzen 3d2f7c3467 Handle empty DNS reply without error as NOERROR 2024-09-24 15:07:59 +02:00
David Goulet f909c86fc0 test: Add unit tests for prop351
Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-09-10 08:46:02 -04:00
Nick Mathewson 9466cc9fdc Update supported protovers for prop350
Relay=1 is no longer supported; it corresponds to TAP.

Microdesc=3 and Desc=3 are now supported; they correspond to the ability to
handle (micro)descriptors without TAP onion keys.
2024-06-26 11:42:36 -04:00
Nick Mathewson ff66aa306b Add a test for parsing a routerdesc with no TAP key. 2024-06-26 11:42:36 -04:00
Nick Mathewson 71ca75cb19 Add a test for a microdesc with no onion key. 2024-06-26 11:42:36 -04:00
Nick Mathewson 4cdf56a173 Rename "onion_pkey" fields in routerinfo_t, and make them optional.
(Renaming them has forced me to look at every place where they are used, so I
can make sure that they are really optional now.)
2024-06-26 11:42:36 -04:00
Nick Mathewson 0428aef13a Remove TAP key from extend_info_t 2024-06-26 11:42:36 -04:00
Nick Mathewson f6f2d5c4a0 prop350: Remove all support for TAP, CREATE, and EXTEND. 2024-06-24 13:51:54 -04:00
David Goulet ef05979587 Merge branch 'maint-0.4.8' 2024-06-18 15:19:12 -04:00
David Goulet d587ba01a7 bridge: Always put transport-info line
Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-06-18 15:15:32 -04:00
Alexander Færøy 1941f25f4c Clean-up Managed Proxy state in PT tests.
This patch makes sure we clean up our version and implementation fields
in our Managed Proxy struct after each test run.

This was detected by LeakSanitizer.

See: tpo/core/tor#11101.
2024-06-18 15:15:32 -04:00
Alexander Færøy 3c8035b452 Add changes file for tpo/core/tor#11101. 2024-06-18 15:15:32 -04:00
Alexander Færøy f459344488 Include "IMPLEMENTATION" parameter to STATUS TYPE=version PT messages. 2024-06-18 15:15:20 -04:00
Alexander Færøy b6e260e699 Add support for PT STATUS TYPE=version messages.
This patch adds support for handling the version status message. Once we
receive such message, we add the given version string to the
managed_proxy_t instance. Note this value can be NULL and the value can
change throughout the lifetime of the PT as multiple status version
messages are handled.

See: tpo/core/tor#11101
2024-06-18 15:15:20 -04:00
David Goulet 5c0a0f7da0 Merge branch 'ticket40689_048_01' into 'main'
dirauth: Add new faravahar

Closes #40689

See merge request tpo/core/tor!819
2024-05-30 16:29:56 +00:00
David Goulet 39ba9ce0d7 dirauth: Add new faravahar
Brand new address, brand new keys, brand new day.

Closes #40689

Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-05-30 09:49:27 -04:00
David Goulet 51ef4ce094 test: Disable unit test causing issue with nightly package
Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-03-20 09:23:24 -04:00
Alexander Færøy 72ac1de514 Merge branch 'maint-0.4.8' 2024-02-28 16:52:56 +00:00
Sebastian Hahn 4db6ab5c18 Update test strings 2024-02-01 17:16:17 +01:00
David Goulet 4a94d0394e Merge branch 'maint-0.4.8' 2024-01-30 10:57:02 -05:00
David Goulet fbca1df9dd dirauth: Reject 0.4.7.x series at the authority level
Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-01-30 10:56:16 -05:00
juga 56819b0a50 bwauth: Allow "node_id" KeyValue without "$"
Allow "node_id" KeyValue without the dollar sign at the start of the
hexdigit in the BandwidthFiles, in order to easier database queries
combining Tor documents in which the relays fingerprint doesn't
include it.
Bugfix on all supported versions of Tor.

Closes #40891
2024-01-30 10:47:13 -05:00
juga d8aa699253 bwauth: Allow "node_id" KeyValue without "$"
Allow "node_id" KeyValue without the dollar sign at the start of the
hexdigit in the BandwidthFiles, in order to easier database queries
combining Tor documents in which the relays fingerprint doesn't
include it.
Bugfix on all supported versions of Tor.

Closes #40891
2023-11-21 10:43:36 -05:00
trinity-1686a 1b907d13bb add rate limit on BEGIN and RESOLVE cell per circuit 2023-10-18 13:06:04 -04:00
David Goulet cc31724f40 Merge branch 'ticket40870_048_02' into 'main'
conflux: Flag set as in full teardown in the free path

Closes #40870

See merge request tpo/core/tor!777
2023-10-18 14:40:18 +00:00
David Goulet a382337be6 conflux: Flag set as in full teardown in the free path
We suspect a shutdown race of some sort for which the full teardown is not
noticed during the close but should be during the free.

For that, we flag the conflux set as in full teardown (if so) in the free path
in case the close path didn't caught it.

Fixes #40870

Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-10-16 21:18:57 +00:00
Nick Mathewson b9b0abd6c2 Fix the spelling of maxunmeasur(e)dbw.
This has been misspelled when using consensus method 31 or later
since 0.4.6.1-alpha.  Fixes bug 40869.
2023-10-05 23:28:05 -04:00
Nick Mathewson a62ea32246 Remove MIN_METHOD_FOR_CORRECT_BWWEIGHTSCALE
This also lets us discard extract_param_buggy, which we've been
wanting to do.
2023-10-05 09:07:47 -04:00
Nick Mathewson 940a4c7eaa Remove tests that checked for obsolete microdesc encoding. 2023-10-05 09:07:47 -04:00
Nick Mathewson a7993bbd72 Whoops: test the "wrong" name for maxunmeasurdbw (sic).
Now that we never use an earlier consensus method, our tests actually
hit this, and we find that we have misspelled "maxunmeasurdbw" (sic) in
dirvote.c.

I have opened ticket #40869 to track this misspelling.
2023-10-05 09:07:37 -04:00
Nick Mathewson a937648022 Update consensus methods in dir_umbw tests.
These tests had previously listed methods that we no longer support.
2023-10-05 08:45:23 -04:00
David Goulet dec9a6946f Merge branch 'ahf/40638' into 'main'
Handle ntor and ntor_v3 individually in rephist and for MetricsPort.

Closes #40638

See merge request tpo/core/tor!767
2023-09-25 12:42:12 +00:00
Alexander Færøy b855a786b6 Handle ntor and ntor_v3 individually in rephist and for MetricsPort.
This patch should not mess with the DoS protection here.

Fixes tpo/core/tor#40638.
2023-09-19 18:34:27 +02:00
David Goulet ca9ca6da04 Merge branch 'sandbox-aarch64-riscv-fixes' into 'main'
Fix sandbox on AArch64, RISC-V

Closes #24454

See merge request tpo/core/tor!446
2023-09-18 13:14:51 +00:00
Alexander Færøy d9a6b37ab1 Add diagnostic log message for compression bombs.
This patch causes `tor_compress_is_compression_bomb()` to emit a
warning-level log message that lets us learn the potential ratio of the
input to output buffer sizes. Hopefully, this will give us a bit of a
better idea whether the compression bomb ratio needs some tuning.

See: tpo/core/tor#40739.
2023-09-13 16:13:28 +02:00
David Goulet e39fb0962f Merge remote-tracking branch 'mbeth-private/ticket40821_mr' 2023-08-22 13:09:54 -04:00
Micah Elizabeth Scott 8991b10cac CI: Diagnostic for failure in test_rebind cleanup
I saw this test fail intermittently due to what seemed like a filesystem
race in docker? The cleanup task was failing with a 'directory not
empty' error, despite trying to do a recursive 'rm'. This patch adds an
'ls' to the same directory, hoping the output might be useful to
diagnose future intermittent failures.
2023-08-15 09:52:30 -07:00
Micah Elizabeth Scott d0343b12c6 test_dos: Fixes for uninitialized stack memory
This was causing CI failures that didn't reproduce on my local machine.
The DoS subsystem now has a new assert() which triggers a BUG on some
nonzero memory contents (or_conn->tracked_for_dos_mitigation), and
uninitialized stack memory might be nonzero.
2023-08-11 18:05:07 -07:00
Micah Elizabeth Scott 2b8d629079 Extend DoS protection to IP addresses with known relays
This exemption used to be helpful in keeping exit relays from tripping
the DoS detection subsystem and losing Tor connectivity. Now exit relays
block re-entry into the network (tor issue #2667) so it's no longer
needed. We'd like to re-enable protection on these addresses to avoid
giving attackers a way around our DoS mitigations.
2023-08-11 16:32:22 -07:00
Micah Elizabeth Scott 3e18507dc7 Extend DoS protection to partially-open channels
tor only marks a channel as 'open' once the TLS and OR handshakes have both
completed, and normal "client" (ORPort) DoS protection is not enabled until
the channel becomes open. This patch adds an additional earlier initialization
path for DoS protection on incoming TLS connections.

This leaves the existing dos_new_client_conn() call sites intact, but adds a
guard against multiple-initialization using the existing
tracked_for_dos_mitigation flag. Other types of channels shouldn't be affected
by this patch.
2023-08-09 18:07:34 -07:00
Mike Perry 04d7f11086 Bug 40566: Remove unused BDP estimators 2023-06-27 19:27:10 +00:00
Mike Perry a945f3c506 Add congestion control tests to build. 2023-06-23 15:08:57 +00:00
Mike Perry 331b874e69 Add CWND test vectors 2023-06-23 15:08:57 +00:00
Mike Perry 06aa454c08 Add RTT Test Vectors 2023-06-23 15:08:57 +00:00
Mike Perry 3647b2f95a Add clock heuristic test vector for congestion control. 2023-06-23 15:08:57 +00:00
Mike Perry 53748705f7 Export variables and functions for CC unit tests. 2023-06-23 15:08:57 +00:00
Mike Perry 646212ce58 Bug 40709: Update and clean up tests for consensus params 2023-06-23 15:08:54 +00:00