-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(android): avoid fdsan crash in tor code (#1070)
This diff patches tor to avoid closing the controller socket twice. See ooni/probe#2405.
- Loading branch information
1 parent
8e1bed1
commit a904ba5
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/src/feature/api/tor_api.c b/src/feature/api/tor_api.c | ||
index 88e91ebfd5..2773949264 100644 | ||
--- a/src/feature/api/tor_api.c | ||
+++ b/src/feature/api/tor_api.c | ||
@@ -131,9 +131,13 @@ tor_main_configuration_free(tor_main_configuration_t *cfg) | ||
} | ||
raw_free(cfg->argv_owned); | ||
} | ||
+ /* See https://gitlab.torproject.org/tpo/core/tor/-/issues/40747 to | ||
+ understand why we're not closing the socket here. */ | ||
+ /* | ||
if (SOCKET_OK(cfg->owning_controller_socket)) { | ||
raw_closesocket(cfg->owning_controller_socket); | ||
} | ||
+ */ | ||
raw_free(cfg); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters