]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
7 years agoremove redundant "implement this" from log message
Roger Dingledine [Fri, 5 Jan 2018 23:23:07 +0000 (18:23 -0500)] 
remove redundant "implement this" from log message

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Fri, 5 Jan 2018 21:41:34 +0000 (16:41 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Fri, 5 Jan 2018 21:41:34 +0000 (16:41 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Fri, 5 Jan 2018 21:41:34 +0000 (16:41 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoMerge branch 'teor_ticket24681_028' into maint-0.2.9
Nick Mathewson [Fri, 5 Jan 2018 21:41:31 +0000 (16:41 -0500)] 
Merge branch 'teor_ticket24681_028' into maint-0.2.9

7 years agofix a wide line
Nick Mathewson [Fri, 5 Jan 2018 16:28:23 +0000 (11:28 -0500)] 
fix a wide line

7 years agoMerge branch 'bug24634' into maint-0.3.2
Nick Mathewson [Wed, 3 Jan 2018 15:08:36 +0000 (10:08 -0500)] 
Merge branch 'bug24634' into maint-0.3.2

7 years agoFix some shadowed-global warnings.
Nick Mathewson [Wed, 3 Jan 2018 14:13:00 +0000 (09:13 -0500)] 
Fix some shadowed-global warnings.

These are all about local variables shadowing global
functions. That isn't normally a problem, but at least one
compiler we care about seems to treat this as a case of -Wshadow
violation, so let's fix it.

Fixes bug 24634; bugfix on 0.3.2.1-alpha.

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Wed, 3 Jan 2018 14:00:00 +0000 (09:00 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 3 Jan 2018 13:59:59 +0000 (08:59 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Wed, 3 Jan 2018 13:59:59 +0000 (08:59 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoMerge branch 'bug24633_029' into maint-0.2.9
Nick Mathewson [Wed, 3 Jan 2018 13:59:52 +0000 (08:59 -0500)] 
Merge branch 'bug24633_029' into maint-0.2.9

7 years agoMerge remote-tracking branch 'teor/bug24703_032' into maint-0.3.2
Nick Mathewson [Tue, 2 Jan 2018 19:42:27 +0000 (14:42 -0500)] 
Merge remote-tracking branch 'teor/bug24703_032' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Tue, 2 Jan 2018 15:10:28 +0000 (10:10 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Tue, 2 Jan 2018 15:10:28 +0000 (10:10 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 2 Jan 2018 15:10:28 +0000 (10:10 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge remote-tracking branch 'teor/bug24736_028' into maint-0.2.9
Nick Mathewson [Tue, 2 Jan 2018 15:09:44 +0000 (10:09 -0500)] 
Merge remote-tracking branch 'teor/bug24736_028' into maint-0.2.9

7 years agoClear the address when we can't choose a reachable address
teor [Sun, 24 Dec 2017 14:53:14 +0000 (01:53 +1100)] 
Clear the address when we can't choose a reachable address

When the fascist_firewall_choose_address_ functions don't find a
reachable address, set the returned address to the null address and port.

This is a precautionary measure, because some callers do not check the
return value.

Fixes bug 24736; bugfix on 0.2.8.2-alpha.

7 years agoMake the default DirAuthorityFallbackRate 0.1
teor [Fri, 22 Dec 2017 13:00:18 +0000 (00:00 +1100)] 
Make the default DirAuthorityFallbackRate 0.1

This makes clients on the public tor network prefer to bootstrap off fallback
directory mirrors.

This is a follow-up to 24679, which removed weights from the default fallbacks.

Implements ticket 24681.

7 years agoBump the dates and Tor versions on the sample torrcs
teor [Fri, 22 Dec 2017 00:22:48 +0000 (11:22 +1100)] 
Bump the dates and Tor versions on the sample torrcs

7 years agoClarify the OutboundBindAddressOR documentation in the sample torrc
teor [Fri, 22 Dec 2017 00:22:10 +0000 (11:22 +1100)] 
Clarify the OutboundBindAddressOR documentation in the sample torrc

Part of 22145

7 years agoDocument IPv6Exit in the sample torrcs
teor [Fri, 22 Dec 2017 00:10:30 +0000 (11:10 +1100)] 
Document IPv6Exit in the sample torrcs

Sample config-only change.

Implements 24703.

7 years agoIncrement version to 0.3.2.8-rc-dev
Nick Mathewson [Thu, 21 Dec 2017 19:22:54 +0000 (14:22 -0500)] 
Increment version to 0.3.2.8-rc-dev

7 years agoIncrement version to 0.3.2.8-rc
Nick Mathewson [Thu, 21 Dec 2017 17:42:00 +0000 (12:42 -0500)] 
Increment version to 0.3.2.8-rc

7 years agoMerge remote-tracking branch 'dgoulet/bug24671_032_01' into maint-0.3.2
Nick Mathewson [Thu, 21 Dec 2017 16:13:33 +0000 (11:13 -0500)] 
Merge remote-tracking branch 'dgoulet/bug24671_032_01' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Thu, 21 Dec 2017 15:50:33 +0000 (10:50 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Thu, 21 Dec 2017 15:50:06 +0000 (10:50 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Thu, 21 Dec 2017 15:49:40 +0000 (10:49 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoUse monotime_coarse_absolute_msec() in destroy queue
Nick Mathewson [Thu, 21 Dec 2017 15:48:37 +0000 (10:48 -0500)] 
Use monotime_coarse_absolute_msec() in destroy queue

This way it will match the insert queue in 029 and later.

7 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Thu, 21 Dec 2017 15:43:12 +0000 (10:43 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

7 years agoMerge branch 'maint-0.2.5' into maint-0.2.8 maint-0.2.8
Nick Mathewson [Thu, 21 Dec 2017 15:43:06 +0000 (10:43 -0500)] 
Merge branch 'maint-0.2.5' into maint-0.2.8

7 years agoMerge branch 'bug24666_squashed_025' into maint-0.2.5
Nick Mathewson [Thu, 21 Dec 2017 15:40:10 +0000 (10:40 -0500)] 
Merge branch 'bug24666_squashed_025' into maint-0.2.5

7 years agoMove free to end of test function so coverity won't complain.
Nick Mathewson [Thu, 21 Dec 2017 15:39:29 +0000 (10:39 -0500)] 
Move free to end of test function so coverity won't complain.

7 years agoMove destroy cells into a separate queue type of their own, to save RAM
Nick Mathewson [Tue, 19 Dec 2017 18:53:52 +0000 (13:53 -0500)] 
Move destroy cells into a separate queue type of their own, to save RAM

We've been seeing problems with destroy cells queues taking up a
huge amount of RAM.  We can mitigate this, since while a full packed
destroy cell takes 514 bytes, we only need 5 bytes to remember a
circuit ID and a reason.

Fixes bug 24666. Bugfix on 0.2.5.1-alpha, when destroy cell queues
were introduced.

7 years agoclarify a comment
Nick Mathewson [Thu, 21 Dec 2017 15:27:37 +0000 (10:27 -0500)] 
clarify a comment

7 years agosched: Consider extra_space even if negative in KIST
David Goulet [Tue, 19 Dec 2017 21:20:36 +0000 (16:20 -0500)] 
sched: Consider extra_space even if negative in KIST

With extra_space negative, it means that the "notsent" queue is quite large so
we must consider that value with the current computed tcp_space. If we end up
to have negative space, we should not add more data to the kernel since the
notsent queue is just too filled up.

Fixes #24665

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agosched: Use lower layer cell limit with KISTLite
David Goulet [Wed, 20 Dec 2017 19:14:02 +0000 (14:14 -0500)] 
sched: Use lower layer cell limit with KISTLite

Instead of using INT_MAX as a write limit for KISTLite, use the lower layer
limit which is using the specialized num_cells_writeable() of the channel that
will down the line check the connection's outbuf and limit it to 32KB
(OR_CONN_HIGHWATER).

That way we don't take the chance of bloating the connection's outbuf and we
keep the cells in the circuit queue which our OOM handler can take care of,
not the outbuf.

Finally, this commit adds a log_debug() in the update socket information
function of KIST so we can get the socket information in debug.

Fixes #24671

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Wed, 20 Dec 2017 17:15:24 +0000 (12:15 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Wed, 20 Dec 2017 17:15:24 +0000 (12:15 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Wed, 20 Dec 2017 17:15:24 +0000 (12:15 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Wed, 20 Dec 2017 17:15:23 +0000 (12:15 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

7 years agoMerge branch 'maint-0.2.5' into maint-0.2.8
Nick Mathewson [Wed, 20 Dec 2017 17:15:23 +0000 (12:15 -0500)] 
Merge branch 'maint-0.2.5' into maint-0.2.8

7 years agoUpdate geoip and geoip6 to the December 6 2017 database.
Karsten Loesing [Wed, 20 Dec 2017 16:36:29 +0000 (17:36 +0100)] 
Update geoip and geoip6 to the December 6 2017 database.

7 years agoMerge branch 'stack_again_032' into maint-0.3.2
Nick Mathewson [Wed, 20 Dec 2017 16:19:18 +0000 (11:19 -0500)] 
Merge branch 'stack_again_032' into maint-0.3.2

7 years agoUpdate the unit tests to reflect the change of 24425
Nick Mathewson [Wed, 20 Dec 2017 15:39:19 +0000 (10:39 -0500)] 
Update the unit tests to reflect the change of 24425

7 years agoMerge remote-tracking branch 'dgoulet/ticket24425_032_01' into maint-0.3.2
Nick Mathewson [Wed, 20 Dec 2017 14:59:06 +0000 (09:59 -0500)] 
Merge remote-tracking branch 'dgoulet/ticket24425_032_01' into maint-0.3.2

7 years agoFix the clz32 and clz64 settings on MSVC.
Nick Mathewson [Wed, 20 Dec 2017 14:34:25 +0000 (09:34 -0500)] 
Fix the clz32 and clz64 settings on MSVC.

Fixes bug 24633; bugfix on 0.2.9.1-alpha.

7 years agobump to 0.3.2.7-rc-dev
Nick Mathewson [Thu, 14 Dec 2017 19:12:31 +0000 (14:12 -0500)] 
bump to 0.3.2.7-rc-dev

7 years agovim sometimes makes swo tempfiles
Nick Mathewson [Wed, 13 Dec 2017 17:07:45 +0000 (12:07 -0500)] 
vim sometimes makes swo tempfiles

7 years agoupdate to 0.3.2.7-rc
Nick Mathewson [Wed, 13 Dec 2017 17:06:09 +0000 (12:06 -0500)] 
update to 0.3.2.7-rc

7 years agoAnother attempt at fixing the STACK warning in tortls.c
Nick Mathewson [Wed, 13 Dec 2017 15:07:22 +0000 (10:07 -0500)] 
Another attempt at fixing the STACK warning in tortls.c

Patch suggestion from catalyst.

Related to 24423

7 years agoMake sandbox.c compile when libseccomp-dev is installed on arm64
Nick Mathewson [Wed, 13 Dec 2017 00:46:03 +0000 (19:46 -0500)] 
Make sandbox.c compile when libseccomp-dev is installed on arm64

Fixes ticket 24424.  Patch from weasel.

7 years agoMerge branch 'bug24367_032_squashed' into maint-0.3.2
Nick Mathewson [Wed, 13 Dec 2017 00:17:38 +0000 (19:17 -0500)] 
Merge branch 'bug24367_032_squashed' into maint-0.3.2

7 years agoMake sure bridges are definitely running before delaying directory fetches
teor [Sun, 10 Dec 2017 15:29:05 +0000 (02:29 +1100)] 
Make sure bridges are definitely running before delaying directory fetches

Retry directory downloads when we get our first bridge descriptor
during bootstrap or while reconnecting to the network. Keep retrying
every time we get a bridge descriptor, until we have a reachable bridge.

Stop delaying bridge descriptor fetches when we have cached bridge
descriptors. Instead, only delay bridge descriptor fetches when we
have at least one reachable bridge.

Fixes bug 24367; bugfix on 0.2.0.3-alpha.

7 years agoSimplify some conditionals in circuit_get_open_circ_or_launch()
teor [Sun, 10 Dec 2017 14:14:28 +0000 (01:14 +1100)] 
Simplify some conditionals in circuit_get_open_circ_or_launch()

When entry_list_is_constrained() is true, guards_retry_optimistic()
always returns true.

When entry_list_is_constrained() is false,
options->UseBridges is always false,
therefore !options->UseBridges is always true,
therefore (!options->UseBridges || ...) is always true.

Cleanup after #24367.

7 years agoMerge remote-tracking branch 'dgoulet/bug24595_032_02' into maint-0.3.2
Nick Mathewson [Tue, 12 Dec 2017 14:32:24 +0000 (09:32 -0500)] 
Merge remote-tracking branch 'dgoulet/bug24595_032_02' into maint-0.3.2

7 years agohs-v3: Don't lookup an intro point while cleaning it up
George Kadianakis [Tue, 12 Dec 2017 14:12:30 +0000 (16:12 +0200)] 
hs-v3: Don't lookup an intro point while cleaning it up

Commit e80893e51b0c0320838cbed8c46fd5b0fe608bef made tor call
hs_service_intro_circ_has_closed() when we mark for close a circuit.

When we cleanup intro points, we iterate over the descriptor's map of intro
points and we can possibly mark for close a circuit. This was problematic
because we would MAP_DEL_CURRENT() the intro point then free it and finally
mark for close the circuit which would lookup the intro point that we just
free in the map we are iterating over.

This can't be done and leads to a use-after-free because the intro point will
be returned successfully due to the fact that we are still in the loop
iterating. In other words, MAP_DEL_CURRENT() followed by a digest256map_get()
of the same object should never be done in the same loop.

Fixes #24595

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Tue, 12 Dec 2017 14:13:12 +0000 (09:13 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 12 Dec 2017 14:13:12 +0000 (09:13 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agorename changes file
Nick Mathewson [Tue, 12 Dec 2017 14:13:05 +0000 (09:13 -0500)] 
rename changes file

7 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

7 years agoMerge branch 'maint-0.2.5' into maint-0.2.8
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.2.5' into maint-0.2.8

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoMerge branch 'bug24167_025' into maint-0.2.5
Nick Mathewson [Mon, 11 Dec 2017 21:56:28 +0000 (16:56 -0500)] 
Merge branch 'bug24167_025' into maint-0.2.5

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoMerge branch 'maint-0.2.5' into maint-0.2.8
Nick Mathewson [Mon, 11 Dec 2017 21:54:11 +0000 (16:54 -0500)] 
Merge branch 'maint-0.2.5' into maint-0.2.8

7 years agoMerge remote-tracking branch 'public/ticket23856_025_01' into maint-0.2.5
Nick Mathewson [Mon, 11 Dec 2017 21:53:02 +0000 (16:53 -0500)] 
Merge remote-tracking branch 'public/ticket23856_025_01' into maint-0.2.5

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:51:58 +0000 (16:51 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:51:58 +0000 (16:51 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:51:58 +0000 (16:51 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

7 years agoMerge remote-tracking branch 'public/bug23985_029' into maint-0.2.9
Nick Mathewson [Mon, 11 Dec 2017 21:51:54 +0000 (16:51 -0500)] 
Merge remote-tracking branch 'public/bug23985_029' into maint-0.2.9

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:50:48 +0000 (16:50 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'bug24086_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:49:01 +0000 (16:49 -0500)] 
Merge branch 'bug24086_031' into maint-0.3.1

7 years agoMerge remote-tracking branch 'public/bug24099_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:48:44 +0000 (16:48 -0500)] 
Merge remote-tracking branch 'public/bug24099_031' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:46:00 +0000 (16:46 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge remote-tracking branch 'public/bug23817_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:45:54 +0000 (16:45 -0500)] 
Merge remote-tracking branch 'public/bug23817_031' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:43:48 +0000 (16:43 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge remote-tracking branch 'asn/bug23862_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:43:41 +0000 (16:43 -0500)] 
Merge remote-tracking branch 'asn/bug23862_031' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:43:24 +0000 (16:43 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

"ours" merge to avoid taking the 030 version of 23862.

7 years agoMerge remote-tracking branch 'asn/bug23862_030' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:41:28 +0000 (16:41 -0500)] 
Merge remote-tracking branch 'asn/bug23862_030' into maint-0.3.0

7 years agoMerge branch 'stack_fixes_032_v2' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:25:04 +0000 (16:25 -0500)] 
Merge branch 'stack_fixes_032_v2' into maint-0.3.2

7 years agoAdd a changelog for the STACK fixes
Nick Mathewson [Sun, 26 Nov 2017 22:37:36 +0000 (17:37 -0500)] 
Add a changelog for the STACK fixes

7 years agoMove subtraction in rephist to try to avoid STACK warning
Nick Mathewson [Sun, 26 Nov 2017 22:34:49 +0000 (17:34 -0500)] 
Move subtraction in rephist to try to avoid STACK warning

(I do not know why this one is happening)

7 years agoStop checking for sandbox:new_element() failures: it can't fail.
Nick Mathewson [Sun, 26 Nov 2017 22:16:25 +0000 (17:16 -0500)] 
Stop checking for sandbox:new_element() failures: it can't fail.

(It can't fail because the tor_malloc*() family of functions can
never return NULL)

Found with STACK

7 years agotransport_new() cannot fail; do not check for it to fail.
Nick Mathewson [Sun, 26 Nov 2017 22:05:30 +0000 (17:05 -0500)] 
transport_new() cannot fail; do not check for it to fail.

(It can't fail because the tor_malloc*() family of functions can
never return NULL)

Found with STACK.

7 years agosched: Avoid integer overflow when computing tcp_space
David Goulet [Mon, 11 Dec 2017 20:42:28 +0000 (15:42 -0500)] 
sched: Avoid integer overflow when computing tcp_space

In KIST, we could have a small congestion window value than the unacked
packets leading to a integer overflow which leaves the tcp_space value to be
humongous.

This has no security implications but it results in KIST scheduler allowing to
send cells on a potentially saturated connection.

Found by #24423. Fixes #24590.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge remote-tracking branch 'dgoulet/bug23603_032_02' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 14:42:12 +0000 (09:42 -0500)] 
Merge remote-tracking branch 'dgoulet/bug23603_032_02' into maint-0.3.2

7 years agoRun the download_status_increment test in a forked process.
Nick Mathewson [Fri, 1 Dec 2017 21:06:25 +0000 (16:06 -0500)] 
Run the download_status_increment test in a forked process.

It messes with global state somehow in a way that makes several of
the entryconn tests fail now.

8 years agoMerge branch 'arthuredelstein_18859+1_031' into maint-0.3.2
Nick Mathewson [Thu, 7 Dec 2017 13:42:49 +0000 (08:42 -0500)] 
Merge branch 'arthuredelstein_18859+1_031' into maint-0.3.2

8 years agoRewrite 18859 changes file from user POV.
Nick Mathewson [Thu, 7 Dec 2017 13:41:00 +0000 (08:41 -0500)] 
Rewrite 18859 changes file from user POV.

8 years agoDon't consider a port "handled" by an isolated circuit.
Arthur Edelstein [Wed, 6 Dec 2017 04:23:02 +0000 (20:23 -0800)] 
Don't consider a port "handled" by an isolated circuit.

Previously, circuit_stream_is_being_handled incorrectly reported
that (1) an exit port was "handled" by a circuit regardless of
whether the circuit was already isolated in some way, and
(2) that a stream could be "handled" by a circuit even if their
isolation settings were incompatible.

As a result of (1), in Tor Browser, circuit_get_unhandled_ports was
reporting that all ports were handled even though all non-internal
circuits had already been isolated by a SOCKS username+password.

Therefore, circuit_predict_and_launch_new was declining to launch
new exit circuits. Then, when the user visited a new site in Tor
Browser, a stream with new SOCKS credentials would be initiated,
and the stream would have to wait while a new circuit with those
credentials could be built. That wait was making the
time-to-first-byte longer than it needed to be.

Now, clean, not-yet-isolated circuit(s) will be automatically
launched ahead of time and be ready for use whenever a new stream
with new SOCKS credentials (or other isolation criteria) is
initiated.

Fixes bug 18859. Thanks to Nick Mathewson for improvements.

8 years agoMerge remote-tracking branch 'dgoulet/bug24502_032_01' into maint-0.3.2
Nick Mathewson [Wed, 6 Dec 2017 19:37:53 +0000 (14:37 -0500)] 
Merge remote-tracking branch 'dgoulet/bug24502_032_01' into maint-0.3.2

8 years agotest: Add a KIST test for a non opened channel
David Goulet [Wed, 6 Dec 2017 16:33:01 +0000 (11:33 -0500)] 
test: Add a KIST test for a non opened channel

This makes sure that a non opened channel is never put back in the channel
pending list and that its state is consistent with what we expect that is
IDLE.

Test the fixes in #24502.

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoTweaks to strings in 24500
Nick Mathewson [Tue, 5 Dec 2017 17:09:57 +0000 (12:09 -0500)] 
Tweaks to strings in 24500

8 years agoMake errno error log more useful for getrandom()
Fernando Fernandez Mancera [Mon, 4 Dec 2017 23:17:09 +0000 (00:17 +0100)] 
Make errno error log more useful for getrandom()

Making errno error log more useful for getrandom() call. Adding if statement to
make difference between ENOSYS and other errors.

Fixes #24500

Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>