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
MacroFake
Tor
Commits
290007e3
Commit
290007e3
authored
4 years ago
by
David Goulet
Browse files
Options
Downloads
Plain Diff
Merge branch 'tor-gitlab/mr/239' into maint-0.3.5
parents
02bd135c
c4fe66e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug40190
+4
-0
4 additions, 0 deletions
changes/bug40190
src/core/proto/proto_socks.c
+6
-1
6 additions, 1 deletion
src/core/proto/proto_socks.c
with
10 additions
and
1 deletion
changes/bug40190
0 → 100644
+
4
−
0
View file @
290007e3
o Minor bugfixes (SOCKS5):
- Handle partial socks5 messages correctly. Previously, our code would
send an incorrect error message if it got a socks5 request that wasn't
complete. Fixes bug 40190; bugfix on 0.3.5.1-alpha.
This diff is collapsed.
Click to expand it.
src/core/proto/proto_socks.c
+
6
−
1
View file @
290007e3
...
...
@@ -545,6 +545,7 @@ parse_socks5_client_request(const uint8_t *raw_data, socks_request_t *req,
if
(
parsed
==
-
1
)
{
log_warn
(
LD_APP
,
"socks5: parsing failed - invalid client request"
);
res
=
SOCKS_RESULT_INVALID
;
socks_request_set_socks5_error
(
req
,
SOCKS5_GENERAL_ERROR
);
goto
end
;
}
else
if
(
parsed
==
-
2
)
{
res
=
SOCKS_RESULT_TRUNCATED
;
...
...
@@ -556,6 +557,7 @@ parse_socks5_client_request(const uint8_t *raw_data, socks_request_t *req,
if
(
socks5_client_request_get_version
(
trunnel_req
)
!=
5
)
{
res
=
SOCKS_RESULT_INVALID
;
socks_request_set_socks5_error
(
req
,
SOCKS5_GENERAL_ERROR
);
goto
end
;
}
...
...
@@ -590,6 +592,7 @@ parse_socks5_client_request(const uint8_t *raw_data, socks_request_t *req,
tor_addr_to_str
(
req
->
address
,
&
destaddr
,
sizeof
(
req
->
address
),
1
);
}
break
;
default:
{
socks_request_set_socks5_error
(
req
,
SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED
);
res
=
-
1
;
}
break
;
}
...
...
@@ -770,8 +773,10 @@ handle_socks_message(const uint8_t *raw_data, size_t datalen,
}
else
{
res
=
parse_socks5_client_request
(
raw_data
,
req
,
datalen
,
drain_out
);
if
(
res
!
=
SOCKS_RESULT_
DONE
)
{
if
(
BUG
(
res
=
=
SOCKS_RESULT_
INVALID
&&
req
->
replylen
==
0
)
)
{
socks_request_set_socks5_error
(
req
,
SOCKS5_GENERAL_ERROR
);
}
if
(
res
!=
SOCKS_RESULT_DONE
)
{
goto
end
;
}
...
...
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