Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Benjamin J. Thompson
Tor
Commits
491dc3a6
Commit
491dc3a6
authored
12 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'public/bug6007_strict_squashed' into maint-0.2.2
parents
6d85a796
af54a018
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug6007
+5
-0
5 additions, 0 deletions
changes/bug6007
src/or/connection_or.c
+20
-2
20 additions, 2 deletions
src/or/connection_or.c
with
25 additions
and
2 deletions
changes/bug6007
0 → 100644
+
5
−
0
View file @
491dc3a6
o Major bugfixes (security):
- When waiting for a client to renegotiate, don't allow it to add
any bytes to the input buffer. This fixes a DoS issue. Fix for
bugs 6007 and 5934; bugfix on 0.2.0.20-rc.
This diff is collapsed.
Click to expand it.
src/or/connection_or.c
+
20
−
2
View file @
491dc3a6
...
...
@@ -209,7 +209,12 @@ connection_or_reached_eof(or_connection_t *conn)
int
connection_or_process_inbuf
(
or_connection_t
*
conn
)
{
int
ret
;
/** Don't let the inbuf of a nonopen OR connection grow beyond this many
* bytes: it's either a broken client, a non-Tor client, or a DOS
* attempt. */
#define MAX_OR_INBUF_WHEN_NONOPEN 0
int
ret
=
0
;
tor_assert
(
conn
);
switch
(
conn
->
_base
.
state
)
{
...
...
@@ -231,8 +236,21 @@ connection_or_process_inbuf(or_connection_t *conn)
case
OR_CONN_STATE_OR_HANDSHAKING
:
return
connection_or_process_cells_from_inbuf
(
conn
);
default:
re
turn
0
;
/* don't do anything */
b
re
ak
;
/* don't do anything */
}
if
(
buf_datalen
(
conn
->
_base
.
inbuf
)
>
MAX_OR_INBUF_WHEN_NONOPEN
)
{
log_fn
(
LOG_PROTOCOL_WARN
,
LD_NET
,
"Accumulated too much data (%d bytes) "
"on nonopen OR connection %s %s:%u in state %s; closing."
,
(
int
)
buf_datalen
(
conn
->
_base
.
inbuf
),
connection_or_nonopen_was_started_here
(
conn
)
?
"to"
:
"from"
,
conn
->
_base
.
address
,
conn
->
_base
.
port
,
conn_state_to_string
(
conn
->
_base
.
type
,
conn
->
_base
.
state
));
connection_mark_for_close
(
TO_CONN
(
conn
));
ret
=
-
1
;
}
return
ret
;
}
/** When adding cells to an OR connection's outbuf, keep adding until the
...
...
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