Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
ea876ab0
Commit
ea876ab0
authored
Aug 03, 2020
by
Nick Mathewson
👁
Browse files
Wipe address strings from connections before freeing them them.
This is a defense-in-depth fix; closes 6198.
parent
5b9508c9
Changes
2
Show whitespace changes
Inline
Side-by-side
changes/ticket6198
0 → 100644
View file @
ea876ab0
o Minor features (defense in depth):
- Wipe more data from connection address fields before returning them to
the memory heap. Closes ticket 6198.
src/core/mainloop/connection.c
View file @
ea876ab0
...
...
@@ -637,7 +637,7 @@ connection_free_minimal(connection_t *conn)
}
}
tor_free
(
conn
->
address
);
tor_
str_wipe_and_
free
(
conn
->
address
);
if
(
connection_speaks_cells
(
conn
))
{
or_connection_t
*
or_conn
=
TO_OR_CONN
(
conn
);
...
...
@@ -657,7 +657,7 @@ connection_free_minimal(connection_t *conn)
}
or_handshake_state_free
(
or_conn
->
handshake_state
);
or_conn
->
handshake_state
=
NULL
;
tor_free
(
or_conn
->
nickname
);
tor_
str_wipe_and_
free
(
or_conn
->
nickname
);
if
(
or_conn
->
chan
)
{
/* Owww, this shouldn't happen, but... */
channel_t
*
base_chan
=
TLS_CHAN_TO_BASE
(
or_conn
->
chan
);
...
...
@@ -677,8 +677,8 @@ connection_free_minimal(connection_t *conn)
}
if
(
conn
->
type
==
CONN_TYPE_AP
)
{
entry_connection_t
*
entry_conn
=
TO_ENTRY_CONN
(
conn
);
tor_free
(
entry_conn
->
chosen_exit_name
);
tor_free
(
entry_conn
->
original_dest_address
);
tor_
str_wipe_and_
free
(
entry_conn
->
chosen_exit_name
);
tor_
str_wipe_and_
free
(
entry_conn
->
original_dest_address
);
if
(
entry_conn
->
socks_request
)
socks_request_free
(
entry_conn
->
socks_request
);
if
(
entry_conn
->
pending_optimistic_data
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment