Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orbea
Tor
Commits
bf30943c
Commit
bf30943c
authored
2 years ago
by
David Goulet
Browse files
Options
Downloads
Plain Diff
Merge branch 'maint-0.4.7'
parents
4d3f42a6
eee35adf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/ticket40649
+4
-0
4 additions, 0 deletions
changes/ticket40649
src/core/or/command.c
+7
-4
7 additions, 4 deletions
src/core/or/command.c
with
11 additions
and
4 deletions
changes/ticket40649
0 → 100644
+
4
−
0
View file @
bf30943c
o Minor bugfixes (relay):
- Do not propagate either forward or backward a DESTROY remote reason when
closing a circuit so to avoid a possible side channel. Fixes bug 40649;
bugfix on 0.1.2.4-alpha.
This diff is collapsed.
Click to expand it.
src/core/or/command.c
+
7
−
4
View file @
bf30943c
...
...
@@ -656,9 +656,11 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan)
if
(
!
CIRCUIT_IS_ORIGIN
(
circ
)
&&
chan
==
TO_OR_CIRCUIT
(
circ
)
->
p_chan
&&
cell
->
circ_id
==
TO_OR_CIRCUIT
(
circ
)
->
p_circ_id
)
{
/* the destroy came from behind */
/* The destroy came from behind so nullify its p_chan. Close the circuit
* with a DESTROYED reason so we don't propagate along the path forward the
* reason which could be used as a side channel. */
circuit_set_p_circid_chan
(
TO_OR_CIRCUIT
(
circ
),
0
,
NULL
);
circuit_mark_for_close
(
circ
,
reason
|
END_CIRC_REASON_
FLAG_REMOTE
);
circuit_mark_for_close
(
circ
,
END_CIRC_REASON_
DESTROYED
);
}
else
{
/* the destroy came from ahead */
circuit_set_n_circid_chan
(
circ
,
0
,
NULL
);
if
(
CIRCUIT_IS_ORIGIN
(
circ
))
{
...
...
@@ -666,9 +668,10 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan)
}
else
{
/* Close the circuit so we stop queuing cells for it and propagate the
* DESTROY cell down the circuit so relays can stop queuing in-flight
* cells for this circuit which helps with memory pressure. */
* cells for this circuit which helps with memory pressure. We do NOT
* propagate the remote reason so not to create a side channel. */
log_debug
(
LD_OR
,
"Received DESTROY cell from n_chan, closing circuit."
);
circuit_mark_for_close
(
circ
,
reason
|
END_CIRC_REASON_
FLAG_REMOTE
);
circuit_mark_for_close
(
circ
,
END_CIRC_REASON_
DESTROYED
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment