diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-04-01 12:59:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-04-01 12:59:19 -0400 |
commit | 34fa4ad637ae3997b0ae31f2009a8aacc6261626 (patch) | |
tree | e964396851f90f6ec9119019cfc55f20d4ad06f7 /src/or/rendmid.c | |
parent | fec3091129ccde0b61d2c5468117a869436e0274 (diff) | |
parent | a7eae4ddc52006a5d94a07435152c4dc5ab2ac0e (diff) | |
download | tor-34fa4ad637ae3997b0ae31f2009a8aacc6261626.tar.gz tor-34fa4ad637ae3997b0ae31f2009a8aacc6261626.zip |
Merge remote-tracking branch 'public/bug15515_025'
Diffstat (limited to 'src/or/rendmid.c')
-rw-r--r-- | src/or/rendmid.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/rendmid.c b/src/or/rendmid.c index 9f6ff86c47..f85562e042 100644 --- a/src/or/rendmid.c +++ b/src/or/rendmid.c @@ -149,6 +149,19 @@ rend_mid_introduce(or_circuit_t *circ, const uint8_t *request, goto err; } + /* We have already done an introduction on this circuit but we just + received a request for another one. We block it since this might + be an attempt to DoS a hidden service (#15515). */ + if (circ->already_received_introduce1) { + log_fn(LOG_PROTOCOL_WARN, LD_REND, + "Blocking multiple introductions on the same circuit. " + "Someone might be trying to attack a hidden service through " + "this relay."); + goto err; + } + + circ->already_received_introduce1 = 1; + /* We could change this to MAX_HEX_NICKNAME_LEN now that 0.0.9.x is * obsolete; however, there isn't much reason to do so, and we're going * to revise this protocol anyway. |