Commit Graph

31574 Commits

Author SHA1 Message Date
Alexander Færøy
aa360b255b Fix crash bug in PT subsystem.
This patch fixes a crash bug (assertion failure) in the PT subsystem
that could get triggered if the user cancels bootstrap via the UI in
TorBrowser. This would cause Tor to call `managed_proxy_destroy()` which
called `process_free()` after it had called `process_terminate()`. This
leads to a crash when the various process callbacks returns with data
after the `process_t` have been freed using `process_free()`.

We solve this issue by ensuring that everywhere we call
`process_terminate()` we make sure to detach the `managed_proxy_t` from
the `process_t` (by calling `process_set_data(process, NULL)`) and avoid
calling `process_free()` at all in the transports code. Instead we just
call `process_terminate()` and let the process exit callback in
`managed_proxy_exit_callback()` handle the `process_free()` call by
returning true to the process subsystem.

See: https://bugs.torproject.org/29562
2019-02-26 15:43:09 +01:00
Nick Mathewson
732855c2e5 Merge branch 'maint-0.4.0' 2019-02-26 07:27:50 -05:00
Nick Mathewson
35257a1c69 Merge remote-tracking branch 'tor-github/pr/726' into maint-0.4.0 2019-02-26 07:27:42 -05:00
George Kadianakis
57d33b5786 Merge branch 'tor-github/pr/698' 2019-02-26 12:35:14 +02:00
George Kadianakis
7fbfdf2af7 Merge branch 'tor-github/pr/611' 2019-02-26 12:33:23 +02:00
Kris Katterjohn
1b9e77349f Fix some error-checking logic and a misleading error message
When IPv4Only (IPv6Only) was used but the address could not be
interpreted as a IPv4 (IPv6) address, the error message referred
to the wrong IP version.

This also fixes up the error-checking logic so it's more precise
about what's being checked.

Fixes bug 13221; bugfix on 0.2.3.9-alpha

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-02-25 16:03:42 -06:00
Nick Mathewson
626e6d2c39 Merge remote-tracking branch 'tor-github/pr/684' 2019-02-25 13:33:39 -05:00
Nick Mathewson
065e7da8e6 Re-enable and fix unit test for nofork mappings
This test was previously written to use the contents of the system
headers to decide whether INHERIT_NONE or INHERIT_ZERO was going to
work.  But that won't work across different environments, such as
(for example) when the kernel doesn't match the headers.  Instead,
we add a testing-only feature to the code to track which of these
options actually worked, and verify that it behaved as we expected.

Closes ticket 29541; bugfix not on any released version of Tor.
2019-02-25 08:55:25 -05:00
Nick Mathewson
69238ca2da Merge remote-tracking branch 'tor-github/pr/646' 2019-02-24 17:17:16 -05:00
Nick Mathewson
34601105a3 Merge branch 'ticket29065_squashed' 2019-02-24 17:02:35 -05:00
rl1987
b7dced893a Fix shellcheck SC2006 warnings in test_switch_id.sh 2019-02-24 17:02:06 -05:00
Neel Chauhan
df8ad64735 When a DirAuth checks reachability on itself and has IPv6, mark it as reachable 2019-02-22 13:36:02 -05:00
George Kadianakis
f229a33685 Merge remote-tracking branch 'nickm/thread_rng' 2019-02-22 16:07:57 +02:00
Nick Mathewson
b3b737b875 Update pre-commit.git-hook for ticket 29553
- handle older source layout
 - handle empty changes directories
 - "set -e" so that  we exit if there's a problem.
2019-02-21 13:35:33 -05:00
Nick Mathewson
9ac8c85435 Merge branch 'maint-0.4.0'
"ours" to avoid version bump.
2019-02-21 13:25:54 -05:00
Nick Mathewson
1bff5646e6 Bump to 0.4.0.2-alpha-dev 2019-02-21 13:25:33 -05:00
Nick Mathewson
5f44e1e5dc Merge branch 'maint-0.3.5' into maint-0.4.0
"ours" to avoid version bump.
2019-02-21 13:25:02 -05:00
Nick Mathewson
955ca72f95 Bump to 0.3.5.8-dev 2019-02-21 13:24:42 -05:00
Nick Mathewson
e1079266e7 Merge branch 'maint-0.3.4' into maint-0.3.5
"ours" to avoid version bump.
2019-02-21 13:23:52 -05:00
Nick Mathewson
a56b9501f1 Bump to 0.3.4.11-dev 2019-02-21 13:23:46 -05:00
Nick Mathewson
df70c44960 Merge branch 'maint-0.3.3' into maint-0.3.4
"ours" to avoid version bump
2019-02-21 13:23:22 -05:00
Nick Mathewson
fb309f6eba Bump to 0.3.3.12-dev 2019-02-21 13:22:56 -05:00
Nick Mathewson
658770a0f0 Remove changes entries for fixes that appeared in 0.4.0.2-alpha 2019-02-21 10:33:16 -05:00
Nick Mathewson
85e1c49378 Copy today's releases into changelogs and releasenotes. 2019-02-21 10:32:08 -05:00
Nick Mathewson
00a93b19cf Merge branch 'maint-0.3.5' into maint-0.4.0 2019-02-21 10:08:14 -05:00
Nick Mathewson
4a8a1f76ea Merge branch 'maint-0.3.4' into maint-0.3.5 2019-02-21 10:08:14 -05:00
Nick Mathewson
5062647918 Merge branch 'maint-0.3.3' into maint-0.3.4 2019-02-21 10:08:14 -05:00
Nick Mathewson
54e42fe364 Merge branch 'maint-0.4.0' 2019-02-21 10:08:14 -05:00
David Goulet
be84ed1a64 kist: Don't write above the highwater outbuf mark
KIST works by computing how much should be allowed to write to the kernel for
a given socket, and then it writes that amount to the outbuf.

The problem is that it could be possible that the outbuf already has lots of
data in it from a previous scheduling round (because the kernel is full/busy
and Tor was not able to flush the outbuf yet). KIST ignores that the outbuf
has been filling (is above its "highwater") and writes more anyway. The end
result is that the outbuf length would exceed INT_MAX, hence causing an
assertion error and a corresponding "Bug()" message to get printed to the
logs.

This commit makes it for KIST to take into account the outbuf length when
computing the available space.

Bug found and patch by Rob Jansen.

Closes #29168. TROVE-2019-001.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-02-21 10:07:34 -05:00
Nick Mathewson
d04f6d9dff Merge branch 'maint-0.4.0'
"ours" to avoid version bump
2019-02-21 09:52:35 -05:00
Nick Mathewson
df3484b2b0 Bump version to 0.4.0.2-alpha 2019-02-21 09:52:27 -05:00
Nick Mathewson
332fe15679 Merge branch 'maint-0.3.5' into maint-0.4.0
"ours" to avoid version bump.
2019-02-21 09:51:38 -05:00
Nick Mathewson
c663716b67 Bump to 0.3.5.8 2019-02-21 09:51:29 -05:00
Nick Mathewson
46910c060f Merge branch 'maint-0.3.4' into maint-0.3.5
"ours" to avoid version bump.
2019-02-21 09:50:46 -05:00
Nick Mathewson
508002a4c2 Bump to 0.3.4.11 2019-02-21 09:50:22 -05:00
Nick Mathewson
7614a8b612 Merge branch 'maint-0.3.3' into maint-0.3.4 2019-02-21 09:49:56 -05:00
Nick Mathewson
41c2bf590b Update to 0.3.3.12 2019-02-21 09:49:48 -05:00
Nick Mathewson
aa79196ee0 Merge branch 'maint-0.4.0' 2019-02-21 09:10:34 -05:00
Nick Mathewson
34183f0d71 Fix a goofy change from abcde10fce that broke test-slow linking
boklm tracked this down, and it doesn't make sense.  It caused

This change goes back to the previous LDFLAGS line.
2019-02-21 09:10:15 -05:00
Nick Mathewson
b3416476b4 Remove all uses of weak_rng.
I'm not removing the weak_rng code itself yet, since it is possible
that we will want to revert one of these.
2019-02-20 12:24:34 -05:00
Nick Mathewson
97b9dfe305 Add a convenience macro to get a fast one-in-n calculation 2019-02-20 12:21:05 -05:00
David Goulet
59c3910bec Merge branch 'tor-github/pr/695' 2019-02-20 12:15:26 -05:00
David Goulet
d259194c82 Merge branch 'tor-github/pr/658' 2019-02-20 12:09:52 -05:00
David Goulet
da179088ee Merge branch 'tor-github/pr/687' 2019-02-20 12:09:02 -05:00
David Goulet
7037fe1163 Merge branch 'tor-github/pr/700' 2019-02-20 12:06:39 -05:00
rl1987
b7ad8bcaad Use setrlimit instead of ulimit -c in backtrace tests 2019-02-20 12:06:26 -05:00
David Goulet
8f5a3c0460 Merge branch 'tor-github/pr/675' 2019-02-20 11:45:58 -05:00
David Goulet
a30f17f72f Merge branch 'tor-github/pr/696' 2019-02-20 11:29:55 -05:00
Roger Dingledine
c22446e305 Merge branch 'maint-0.4.0' 2019-02-20 10:40:20 -05:00
Roger Dingledine
5ec65be8bf Merge remote-tracking branch 'nickm/ticket29530_040' into maint-0.4.0 2019-02-20 10:39:28 -05:00