tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 037dea2252e5122059bd189c57ad606f05c7b0b7
parent 3129910b11b576ae32ac84fa3fd9feb3e5648dce
Author: Micah Elizabeth Scott <beth@torproject.org>
Date:   Tue, 14 Mar 2023 09:01:14 -0700

hs_pow: fix assert in services that receive unsolicited proof of work

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>

Diffstat:
Msrc/feature/hs/hs_cell.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git 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) {