[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor] 55/77: hs_pow: fix assert in services that receive unsolicited proof of work



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 037dea2252e5122059bd189c57ad606f05c7b0b7
Author: Micah Elizabeth Scott <beth@xxxxxxxxxxxxxx>
AuthorDate: Tue Mar 14 09:01:14 2023 -0700

    hs_pow: fix assert in services that receive unsolicited proof of work
    
    Signed-off-by: Micah Elizabeth Scott <beth@xxxxxxxxxxxxxx>
---
 src/feature/hs/hs_cell.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/feature/hs/hs_cell.c b/src/feature/hs/hs_cell.c
index cadafd2c90..190f0f3b5a 100644
--- a/src/feature/hs/hs_cell.c
+++ b/src/feature/hs/hs_cell.c
@@ -807,6 +807,11 @@ handle_introduce2_encrypted_cell_pow_extension(const hs_service_t *service,
 
   tor_assert(field);
 
+  if (!service->state.pow_state) {
+    log_info(LD_REND, "Unsolicited PoW solution in INTRODUCE2 request.");
+    goto end;
+  }
+
   if (trn_cell_extension_pow_parse(&pow,
                trn_extension_field_getconstarray_field(field),
                trn_extension_field_getlen_field(field)) < 0) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits