Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
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
jarl
tor
Commits
b0ea36d7
Commit
b0ea36d7
authored
9 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'public/bug15821_025'
parents
caaaea2a
2b27ce52
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/bug15823
+4
-0
4 additions, 0 deletions
changes/bug15823
src/or/rendservice.c
+14
-4
14 additions, 4 deletions
src/or/rendservice.c
with
18 additions
and
4 deletions
changes/bug15823
0 → 100644
+
4
−
0
View file @
b0ea36d7
o Minor bugfixes (hidden service):
- Fix an out-of-bounds read when parsing invalid INTRODUCE2 cells
on a client authorized hidden service. Fixes bug 15823; bugfix
on 0.2.1.6-alpha.
This diff is collapsed.
Click to expand it.
src/or/rendservice.c
+
14
−
4
View file @
b0ea36d7
...
...
@@ -1310,11 +1310,13 @@ rend_service_requires_uptime(rend_service_t *service)
return
0
;
}
/** Check client authorization of a given <b>descriptor_cookie</b> for
* <b>service</b>. Return 1 for success and 0 for failure. */
/** Check client authorization of a given <b>descriptor_cookie</b> of
* length <b>cookie_len</b> for <b>service</b>. Return 1 for success
* and 0 for failure. */
static
int
rend_check_authorization
(
rend_service_t
*
service
,
const
char
*
descriptor_cookie
)
const
char
*
descriptor_cookie
,
size_t
cookie_len
)
{
rend_authorized_client_t
*
auth_client
=
NULL
;
tor_assert
(
service
);
...
...
@@ -1325,6 +1327,13 @@ rend_check_authorization(rend_service_t *service,
return
0
;
}
if
(
cookie_len
!=
REND_DESC_COOKIE_LEN
)
{
log_info
(
LD_REND
,
"Descriptor cookie is %lu bytes, but we expected "
"%lu bytes. Dropping cell."
,
(
unsigned
long
)
cookie_len
,
(
unsigned
long
)
REND_DESC_COOKIE_LEN
);
return
0
;
}
/* Look up client authorization by descriptor cookie. */
SMARTLIST_FOREACH
(
service
->
clients
,
rend_authorized_client_t
*
,
client
,
{
if
(
tor_memeq
(
client
->
descriptor_cookie
,
descriptor_cookie
,
...
...
@@ -1672,7 +1681,8 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
if
(
service
->
clients
)
{
if
(
parsed_req
->
version
==
3
&&
parsed_req
->
u
.
v3
.
auth_len
>
0
)
{
if
(
rend_check_authorization
(
service
,
(
const
char
*
)
parsed_req
->
u
.
v3
.
auth_data
))
{
(
const
char
*
)
parsed_req
->
u
.
v3
.
auth_data
,
parsed_req
->
u
.
v3
.
auth_len
))
{
log_info
(
LD_REND
,
"Authorization data in INTRODUCE2 cell are valid."
);
}
else
{
log_info
(
LD_REND
,
"The authorization data that are contained in "
...
...
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