]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs-v2: Disable version 2 introduction point
authorDavid Goulet <dgoulet@torproject.org>
Thu, 30 Sep 2021 14:40:19 +0000 (10:40 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 30 Sep 2021 14:40:19 +0000 (10:40 -0400)
Upon receiving a v2 introduction request, the relay will close the
circuit and send back a tor protocol error.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/feature/hs/hs_intropoint.c

index 7717ed53d446e46d47ceffa97aa0fc03493b3097..9c886228c56af933beb13439347e14a0730b04e8 100644 (file)
@@ -320,7 +320,8 @@ hs_intro_received_establish_intro(or_circuit_t *circ, const uint8_t *request,
   switch (first_byte) {
     case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY0:
     case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY1:
-      return rend_mid_establish_intro_legacy(circ, request, request_len);
+      /* Don't accept version 2 introduction anymore. */
+      goto err;
     case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519:
       return handle_establish_intro(circ, request, request_len);
     default: