aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2024-06-18Drop requirement for TRANSPORT being present in STATUS messages.Alexander Færøy
2024-06-18Add support for PT STATUS TYPE=version messages.Alexander Færøy
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-04-16circuit: Remove log_warn triggered by a proto violationDavid Goulet
Fixes #40932 Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-04-15conflux: Avoid noting a cell was sent on a closed circuitDavid Goulet
It turns out that circuit_package_relay_cell() returns 0 in order to drop a cell but there is a code path, if the circuit queue is full, that also silently closes the circuit and returns 0. This lead to Conflux thinking a cell was sent but actually the cell was not and the circuit was closed leading to the hard assert. And so this function makes sure that circuit_package_relay_cell() and append_cell_to_circuit_queue() returns a value that indicate what happened with the cell and circuit so the caller can make an informed decision with it. This change makes it that we do NOT enter the Conflux subsystem if the cell is not queued on the circuit. Fixes #40921 Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-02-01dirauth: Warn when failing to post during a voteSebastian Hahn
The only way to figure out that posting a vote or signatures to another dirauth failed is by counting how many success messages there are on notice level, and noticing that it is fewer than the number of configured dirauths. Closes #40910.
2024-01-30dirauth: Reject 0.4.7.x series at the authority levelDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2024-01-30bwauth: Allow "node_id" KeyValue without "$"juga
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-09Merge branch 'ticket40883_048_01' into maint-0.4.8David Goulet
2023-11-09Merge branch 'tor-gitlab/mr/778' into maint-0.4.8David Goulet
2023-11-08hs: Always check if the hs_ident is available when processing a cellDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-11-07hs: Fix assert in hs_metrics_update_by_ident()David Goulet
The hs_metrics_failed_rdv() macro could pass a NULL value for the identity key when a building circuit would end up in a failure path *before* the "hs_ident" was able to be set which leading to this assert. This was introduced in 0.4.8.1-alpha with the addition of rendezvous circuit failure metrics for the MetricsPort. This fixes TROVE-2023-006 for which its severity is considered high. Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-11-03Merge branch 'maint-0.4.7' into maint-0.4.8David Goulet
2023-11-03Fix TROVE-2023-004: Remote crash when compiled against OpenSSLAlexander Færøy
Fixes #40874 Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-11-01Bug 40876: Extra loggingMike Perry
2023-11-01Bug 40876: Don't reduce primary list for temporary restrictionsMike Perry
2023-10-11Fix the spelling of maxunmeasur(e)dbw.Nick Mathewson
This has been misspelled when using consensus method 31 or later since 0.4.6.1-alpha. Fixes bug 40869. This commit is a backport of b9b0abd6c26d9b361923 to 0.4.8.
2023-09-18Merge branch 'tor-gitlab/mr/759' into maint-0.4.8David Goulet
2023-09-14Merge branch 'maint-0.4.7' into maint-0.4.8David Goulet
2023-09-14Bug 40858: Cache sendme_inc to avoid purging intro points.Mike Perry
Bug found and fixed by @hyunsoo.kim676.
2023-09-12Remove defensive assertion in `relay_key_is_unavailable_()`.Alexander Færøy
This patch removes a call to `tor_assert_nonfatal_unreached()` in `relay_key_is_unavailable_()` that is only called when Tor is compiled without relay support. Unfortunately, the non-fatal assertion causes a BUG log message to appear for clients when they start up without relay support for each CPU worker we spawn. This makes it spotting issues during bootstrap harder particularly for our iOS developers. Since the call sites to `get_master_identity_key()` handles `NULL` values already, we do not think this will be an issue later on. Reported by Benjamin Erhart (@tla) from Guardian Project. Fixes tpo/core/tor#40848.
2023-09-12Make networkstatus_getinfo_by_purpose report published_on again.Nick Mathewson
When we implemented prop275 in 0.4.8.1-alpha, we changed the behavior of networkstatus_getinfo_helper_single to omit meaningful published_on times, replacing them with "2038-01-01". This is necessary when we're formatting a routerstatus with no additional info, since routerstatus objects no longer include a published_on. But in networkstatus_getinfo_by_purpose, we do have a routerinfo that does have a published_on. This patch uses that information to report published_on times in our output when we're making a "virtual" networkstatus for a big file of routerinfo_t objects. This is mostly important for bridge authorities, since when they dump a secret list of the bridges, they want to include published_on times. Closes #40855. Bugfix on 0.4.8.1-alpha.
2023-08-09Extend DoS protection to partially-open channelsMicah Elizabeth Scott
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-07-31Bug 40828: Add more log scrubbing to protocol warningsMike Perry
2023-07-24Merge branch 'maint-0.4.7'David Goulet
2023-07-24Fix all -Werror=enum-int-mismatch warningsDavid Goulet
Close #40824 Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-07-20Merge branch 'warn-bridge-exit' into 'main'David Goulet
Warn when operating as bridge and exit Closes #40819 See merge request tpo/core/tor!730
2023-07-17Warn when operating as bridge and exittrinity-1686a
2023-07-16fix non-fatal assertion when rotate_onion_key failstrinity-1686a
2023-07-12Merge branch 'maint-0.4.7'David Goulet
2023-07-05replace L2 vanguards that aren't Fast or StableRoger Dingledine
Rotate to a new L2 vanguard whenever an existing one loses the Stable or Fast flag. Previously, we would leave these relays in the L2 vanguard list but never use them, and if all of our vanguards end up like this we wouldn't have any middle nodes left to choose from so we would fail to make onion-related circuits. Fixes bug 40805; bugfix on 0.4.7.1-alpha.
2023-06-19Merge branch 'ticket40773' into 'main'David Goulet
Fix compilation error on older gcc versions and MSVC. See merge request tpo/core/tor!717
2023-06-07Fix the spacing in the 'Your Tor identity key fingerprint is' log line'Neel Chauhan
2023-06-05Fix compilation error on older gcc versions and MSVC.Gabriela Moldovan
This fixes an "initializer is not a constant" compilation error that manifests itself on gcc versions < 8.1 and MSVC (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69960#c18). Fixes bug #40773 Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-28hs_pow: Add CompiledProofOfWorkHash torrc optionMicah Elizabeth Scott
This exposes the new fallback behavior in hashx via a new AUTOBOOL configuration option, available to both clients and services. The default should be fine for nearly everyone, but it might be necessary to enable or disable the compiler manually for diagnostic purposes. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-05-28hs_pow: Update for equix API to fix issue 40794Micah Elizabeth Scott
This change adapts the hs_pow layer and unit tests to API changes in hashx and equix which modify the fault recovery responsibilities and reporting behaivor. This and the corresponding implementation changes in hashx and equix form the fix for #40794, both solving the segfault and giving hashx a way to report those failures up the call chain without them being mistaken for a different error (unusable seed) that would warrant a retry. To handle these new late compiler failures with a minimum of fuss or inefficiency, the failover is delegated to the internals of hashx and tor needs only pass in a EQUIX_CTX_TRY_COMPILE flag to get the behavior that tor was previously responsible for implementing. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-05-25Forgot about the stub namesfriendly73
2023-05-25Added relay prefix to new metrics functionsfriendly73
2023-05-25Fixed enum type not found in relay_stubfriendly73
2023-05-25Added void stubs for the relay metrics functions to fix building without ↵friendly73
relay module
2023-05-25Fixed new arguments for metrics_store_addfriendly73
2023-05-25Removed getter abstraction and moved from rephist to relay_metrics.friendly73
2023-05-25Fixed est intro getter using wrong arrayfriendly73
2023-05-25Fixed REND1 metric label valuefriendly73
2023-05-25Added INTRO and REND metrics for relay.friendly73
2023-05-25Merge branch 'tor-gitlab/mr/443'David Goulet
2023-05-25Restart PT processes when they die on us.Alexander Færøy
This patch forces a PT reconfigure of infant PT processes as part of the PT process' exit handler. See: tpo/core/tor#33669
2023-05-25Log at LD_PT instead of LD_GENERAL for PT process stdout lines.Alexander Færøy
See: tpo/core/tor#33669
2023-05-25Only terminate PT processes that are running.Alexander Færøy
See: tpo/core/tor#33669
2023-05-25Log name of managed proxy in exit handler.Alexander Færøy
This patch ensures that we can figure out which PT that terminated in the PT exit handler. See: tpo/core/tor#33669
2023-05-25Log state transitions for Pluggable TransportsAlexander Færøy
This patch makes Tor log state transitions within the PT layer at the info log-level. This should make it easier to figure out if Tor ends up in a strange state. See: tpo/core/tor#33669