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

[tor-commits] [tor/maint-0.2.9] Add a missing return after marking a stream for bad connected cell



commit 5eb2d5888065420b44ad237d000dfb7c3656c2ef
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon May 14 15:54:48 2018 -0400

    Add a missing return after marking a stream for bad connected cell
    
    Fixes bug 26072; bugfix on 0.2.4.7-alpha.
---
 changes/bug26072 | 5 +++++
 src/or/relay.c   | 1 +
 2 files changed, 6 insertions(+)

diff --git a/changes/bug26072 b/changes/bug26072
new file mode 100644
index 000000000..2489e4fbb
--- /dev/null
+++ b/changes/bug26072
@@ -0,0 +1,5 @@
+  o Minor bugfixes (correctness, client):
+    - Upon receiving a malformed connected cell, stop processing the cell
+      immediately.  Previously we would mark the connection for close, but
+      continue processing the cell as if the connection were open. Fixes bug
+      26072; bugfix on 0.2.4.7-alpha.
diff --git a/src/or/relay.c b/src/or/relay.c
index 22ce76752..1c791e02c 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1323,6 +1323,7 @@ connection_edge_process_relay_cell_not_open(
              "Got a badly formatted connected cell. Closing.");
       connection_edge_end(conn, END_STREAM_REASON_TORPROTOCOL);
       connection_mark_unattached_ap(entry_conn, END_STREAM_REASON_TORPROTOCOL);
+      return 0;
     }
     if (tor_addr_family(&addr) != AF_UNSPEC) {
       const sa_family_t family = tor_addr_family(&addr);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits