summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-03-24 12:25:05 -0400
committerNick Mathewson <nickm@torproject.org>2021-03-24 12:25:05 -0400
commitc40b729c85ff45501523cbcd37f603aceeea4774 (patch)
treeab19dffe5eb83f1a31a28051710a9b26448e6ffe
parentea781dc44fe9423af4197cfc1e07825d4366e491 (diff)
parentc359c3056b2dbf17987a8955af30884ee438108e (diff)
downloadtor-c40b729c85ff45501523cbcd37f603aceeea4774.tar.gz
tor-c40b729c85ff45501523cbcd37f603aceeea4774.zip
Merge branch 'maint-0.4.5' into release-0.4.5
-rw-r--r--changes/ticket403455
-rw-r--r--src/core/or/channel.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/ticket40345 b/changes/ticket40345
new file mode 100644
index 0000000000..246e4a86af
--- /dev/null
+++ b/changes/ticket40345
@@ -0,0 +1,5 @@
+ o Minor bugfixes (channel, DoS):
+ - Fix a possible non fatal assertion BUG() due to a too early free of a
+ string when noting down the client connection for the DoS defenses
+ subsystem. Fixes bug 40345; bugfix on 0.4.3.4-rc
+
diff --git a/src/core/or/channel.c b/src/core/or/channel.c
index 26c93d169f..1ac029c152 100644
--- a/src/core/or/channel.c
+++ b/src/core/or/channel.c
@@ -1882,11 +1882,11 @@ channel_do_open_actions(channel_t *chan)
geoip_note_client_seen(GEOIP_CLIENT_CONNECT,
&remote_addr, transport_name,
now);
- tor_free(transport_name);
/* Notify the DoS subsystem of a new client. */
if (tlschan && tlschan->conn) {
dos_new_client_conn(tlschan->conn, transport_name);
}
+ tor_free(transport_name);
}
/* Otherwise the underlying transport can't tell us this, so skip it */
}