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
5a5147dd
Commit
5a5147dd
authored
11 years ago
by
George Kadianakis
Committed by
Nick Mathewson
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix invalid-read when a managed proxy configuration fails.
parent
8d0fb3a4
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/bug9288
+4
-0
4 additions, 0 deletions
changes/bug9288
src/or/transports.c
+15
-9
15 additions, 9 deletions
src/or/transports.c
with
19 additions
and
9 deletions
changes/bug9288
0 → 100644
+
4
−
0
View file @
5a5147dd
o Minor bugfixes:
- Fix an invalid memory read that occured when a pluggable
transport proxy failed its configuration protocol.
Fixes bug 9288.
This diff is collapsed.
Click to expand it.
src/or/transports.c
+
15
−
9
View file @
5a5147dd
...
...
@@ -105,7 +105,7 @@ static void managed_proxy_destroy(managed_proxy_t *mp,
int
also_terminate_process
);
static
void
handle_finished_proxy
(
managed_proxy_t
*
mp
);
static
void
configure_proxy
(
managed_proxy_t
*
mp
);
static
int
configure_proxy
(
managed_proxy_t
*
mp
);
static
void
parse_method_error
(
const
char
*
line
,
int
is_server_method
);
#define parse_server_method_error(l) parse_method_error(l, 1)
...
...
@@ -572,10 +572,8 @@ pt_configure_remaining_proxies(void)
/* If the proxy is not fully configured, try to configure it
futher. */
if
(
!
proxy_configuration_finished
(
mp
))
configure_proxy
(
mp
);
if
(
proxy_configuration_finished
(
mp
))
at_least_a_proxy_config_finished
=
1
;
if
(
configure_proxy
(
mp
)
==
1
)
at_least_a_proxy_config_finished
=
1
;
}
SMARTLIST_FOREACH_END
(
mp
);
...
...
@@ -587,10 +585,14 @@ pt_configure_remaining_proxies(void)
mark_my_descriptor_dirty
(
"configured managed proxies"
);
}
/** Attempt to continue configuring managed proxy <b>mp</b>. */
static
void
/** Attempt to continue configuring managed proxy <b>mp</b>.
* Return 1 if the transport configuration finished, and return 0
* otherwise (if we still have more configuring to do for this
* proxy). */
static
int
configure_proxy
(
managed_proxy_t
*
mp
)
{
int
configuration_finished
=
0
;
smartlist_t
*
proxy_output
=
NULL
;
enum
stream_status
stream_status
=
0
;
...
...
@@ -600,7 +602,7 @@ configure_proxy(managed_proxy_t *mp)
mp
->
conf_state
=
PT_PROTO_FAILED_LAUNCH
;
handle_finished_proxy
(
mp
);
}
return
;
return
0
;
}
tor_assert
(
mp
->
conf_state
!=
PT_PROTO_INFANT
);
...
...
@@ -632,13 +634,17 @@ configure_proxy(managed_proxy_t *mp)
done:
/* if the proxy finished configuring, exit the loop. */
if
(
proxy_configuration_finished
(
mp
))
if
(
proxy_configuration_finished
(
mp
))
{
handle_finished_proxy
(
mp
);
configuration_finished
=
1
;
}
if
(
proxy_output
)
{
SMARTLIST_FOREACH
(
proxy_output
,
char
*
,
cp
,
tor_free
(
cp
));
smartlist_free
(
proxy_output
);
}
return
configuration_finished
;
}
/** Register server managed proxy <b>mp</b> transports to state */
...
...
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