From 8882dcfc598edde4d78c14ea0b90c8ed7f189274 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sun, 27 Jul 2014 15:41:30 -0400 Subject: add a changes file for bug 12718 --- changes/bug12718 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changes/bug12718 (limited to 'changes') diff --git a/changes/bug12718 b/changes/bug12718 new file mode 100644 index 0000000000..0c5f708446 --- /dev/null +++ b/changes/bug12718 @@ -0,0 +1,5 @@ + o Minor bugfixes: + - Correct a confusing error message when trying to extend a circuit + via the control protocol but we don't know a descriptor or + microdescriptor for one of the specified relays. Fixes bug 12718; + bugfix on 0.2.3.1-alpha. -- cgit v1.2.3-54-g00ecf From 68a2e4ca4baa595cc4595a511db11fa7ccbbc8f7 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Mon, 28 Jul 2014 02:44:05 -0400 Subject: Warn and drop the circuit if we receive an inbound 'relay early' cell Those used to be normal to receive on hidden service circuits due to bug 1038, but the buggy Tor versions are long gone from the network so we can afford to resume watching for them. Resolves the rest of bug 1038; bugfix on 0.2.1.19. --- changes/bug1038-3 | 6 ++++++ src/or/command.c | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 changes/bug1038-3 (limited to 'changes') diff --git a/changes/bug1038-3 b/changes/bug1038-3 new file mode 100644 index 0000000000..5af4afa46f --- /dev/null +++ b/changes/bug1038-3 @@ -0,0 +1,6 @@ + o Minor bugfixes: + - Warn and drop the circuit if we receive an inbound 'relay early' + cell. Those used to be normal to receive on hidden service circuits + due to bug 1038, but the buggy Tor versions are long gone from + the network so we can afford to resume watching for them. Resolves + the rest of bug 1038; bugfix on 0.2.1.19. diff --git a/src/or/command.c b/src/or/command.c index 51d07b0485..78fd4fad33 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -443,10 +443,22 @@ command_process_relay_cell(cell_t *cell, channel_t *chan) * gotten no more than MAX_RELAY_EARLY_CELLS_PER_CIRCUIT of them. */ if (cell->command == CELL_RELAY_EARLY) { if (direction == CELL_DIRECTION_IN) { - /* Allow an unlimited number of inbound relay_early cells, - * for hidden service compatibility. There isn't any way to make - * a long circuit through inbound relay_early cells anyway. See - * bug 1038. -RD */ + /* Inbound early cells could once be encountered as a result of + * bug 1038; but relays running versions before 0.2.1.19 are long + * gone from the network, so any such cells now are surprising. */ + log_warn(LD_OR, + "Received an inbound RELAY_EARLY cell on circuit %u." + " Closing circuit. Please report this event," + " along with the following message.", + (unsigned)cell->circ_id); + if (CIRCUIT_IS_ORIGIN(circ)) { + circuit_log_path(LOG_WARN, LD_OR, TO_ORIGIN_CIRCUIT(circ)); + } else if (circ->n_chan) { + log_warn(LD_OR, " upstream=%s", + channel_get_actual_remote_descr(circ->n_chan)); + } + circuit_mark_for_close(circ, END_CIRC_REASON_TORPROTOCOL); + return; } else { or_circuit_t *or_circ = TO_OR_CIRCUIT(circ); if (or_circ->remaining_relay_early_cells == 0) { -- cgit v1.2.3-54-g00ecf