Skip to content

Commit

Permalink
Merge branch 'trove_2020_004_041_v2' into maint-0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathewson committed Mar 17, 2020
2 parents 5f4e14b + 78bcfc1 commit cec647f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changes/ticket33619
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
o Major bugfixes (circuit padding, memory leaks):
- Avoid a remotely triggered memory leak in the case that a circuit
padding machine is somehow negotiated twice on the same circuit. Fixes
bug 33619; bugfix on 0.4.0.1-alpha. Found by Tobias Pulls. This is
also tracked as TROVE-2020-004.
9 changes: 6 additions & 3 deletions src/core/or/circuitpadding.c
Original file line number Diff line number Diff line change
Expand Up @@ -2381,9 +2381,12 @@ circpad_setup_machine_on_circ(circuit_t *on_circ,
return;
}

tor_assert_nonfatal(on_circ->padding_machine[machine->machine_index]
== NULL);
tor_assert_nonfatal(on_circ->padding_info[machine->machine_index] == NULL);
IF_BUG_ONCE(on_circ->padding_machine[machine->machine_index] != NULL) {
return;
}
IF_BUG_ONCE(on_circ->padding_info[machine->machine_index] != NULL) {
return;
}

/* Log message */
if (CIRCUIT_IS_ORIGIN(on_circ)) {
Expand Down

0 comments on commit cec647f

Please sign in to comment.