aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/ticket408834
-rw-r--r--src/feature/hs/hs_metrics.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/changes/ticket40883 b/changes/ticket40883
new file mode 100644
index 0000000000..1186571122
--- /dev/null
+++ b/changes/ticket40883
@@ -0,0 +1,4 @@
+ o Major bugfixes (onion service, TROVE-2023-006):
+ - Fix a possible hard assert on a NULL pointer when recording a failed
+ rendezvous circuit on the service side for the MetricsPort. Fixes bug
+ 40883; bugfix on 0.4.8.1-alpha
diff --git a/src/feature/hs/hs_metrics.c b/src/feature/hs/hs_metrics.c
index 19a330a01e..4ce91c2b32 100644
--- a/src/feature/hs/hs_metrics.c
+++ b/src/feature/hs/hs_metrics.c
@@ -199,7 +199,12 @@ hs_metrics_update_by_ident(const hs_metrics_key_t key,
{
hs_service_t *service;
- tor_assert(ident_pk);
+ if (!ident_pk) {
+ /* We can end up here in case this is used from a failure/closing path for
+ * which we might not have any identity key attacehed to a circuit or
+ * connection yet. Simply don't assume we have one. */
+ return;
+ }
service = hs_service_find(ident_pk);
if (!service) {