Commit Graph

35005 Commits

Author SHA1 Message Date
Nick Mathewson
5721ec22d8 pem_decode(): Tolerate CRLF line endings
Fixes bug 33032; bugfix on 0.3.5.1-alpha when we introduced our own
PEM decoder.
2020-03-11 10:35:17 -04:00
David Goulet
894ff2dc84 dos: Pass transport name on new client connection
For a bridge configured with a pluggable transport, the transport name is
used, with the IP address, for the GeoIP client cache entry.

However, the DoS subsystem was not aware of it and always passing NULL when
doing a lookup into the GeoIP cache.

This resulted in bridges with a PT are never able to apply DoS defenses for
newly created connections.

Fixes #33491

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-03-10 14:45:13 -04:00
Nick Mathewson
f0646919af Bump to 0.4.3.3-alpha. 2020-03-10 10:28:09 -04:00
rl1987
72550c18c8 Tweak double-underscore 2020-03-10 09:13:29 -04:00
rl1987
f89c32ccd0 Document poll_interval_tv in procmon.c 2020-03-10 09:13:22 -04:00
rl1987
94a2376e01 Document __OwningControllerProcess torrc option and mention polling interval 2020-03-10 09:13:19 -04:00
Nick Mathewson
87e0873056 changes file for ticket 33460. 2020-02-26 14:19:53 -05:00
Nick Mathewson
2c792d1e0e In typed_var_kvassign, include config names in error messages.
This should improve the usability of our configuration error messages.
2020-02-26 14:18:40 -05:00
Nick Mathewson
7e7aff9b6a confmgt: when a units value is invalid, include a meaningful error.
Part of 33460.
2020-02-26 13:03:10 -05:00
Nick Mathewson
b133325a3e confmgt: when an int/enum value is invalid, say which values are ok.
Part of 33460.
2020-02-26 13:02:28 -05:00
Nick Mathewson
7b42502869 Merge remote-tracking branch 'tor-github/pr/1757/head' into maint-0.4.3 2020-02-20 10:44:36 -05:00
Nick Mathewson
f733b8acd6 Merge remote-tracking branch 'tor-github/pr/1719/head' into maint-0.4.3 2020-02-20 08:48:17 -05:00
teor
57ff8d4a53
practracker: Read unicode files when using Python 2
Allow the "practracker" coding best practices checking script to read
unicode files, when using Python 2.

We made the script use unicode literals in 0.4.3.1-alpha, but didn't
change the codec for opening files.

Fixes bug 33374; bugfix on 0.4.3.1-alpha.
2020-02-19 08:22:01 +10:00
Nick Mathewson
a79841fd83 Merge branch 'ticket33290_v2_042' into maint-0.4.3 2020-02-14 08:16:22 -05:00
Nick Mathewson
393bbd823e Merge branch 'ticket33290_v2_041' into ticket33290_v2_042 2020-02-14 08:16:01 -05:00
Nick Mathewson
c1649ab015 Wipe the entire hashent structure, not just the first sizeof(void*) 2020-02-14 08:15:37 -05:00
Nick Mathewson
6c5307e42f Merge branch 'ticket33290_v2_043' into maint-0.4.3 2020-02-13 10:47:32 -05:00
Nick Mathewson
baeff46d36 Merge branch 'ticket33290_v2_042' into ticket33290_v2_043
Conflicts:
	src/core/or/circuitmux_ewma.c
2020-02-13 09:21:47 -05:00
Nick Mathewson
fd1686c7d8 Merge branch 'ticket33290_v2_041' into ticket33290_v2_042 2020-02-13 09:12:48 -05:00
Nick Mathewson
fff1054d17 Before freeing ewma objects, use memwipe instead of resetting magic. 2020-02-13 09:11:35 -05:00
teor
3e8e4af1ac
Merge branch 'bug33195_042' into bug33195_043
Conflicts:
* Keep disable module relay from maint-0.4.3
* Keep doxygen from maint-0.4.3
* Keep the ordering from bug33195_042
2020-02-13 14:21:26 +10:00
teor
f021389e92
Merge branch 'bug33195_041' into bug33195_042
Conflicts:
* Keep RUST_VERSION from maint-0.4.2
* Keep the commented-out allow_failure entries from bug33195_041
2020-02-13 13:58:13 +10:00
teor
c96cf14943
Merge branch 'bug33195_035' into bug33195_041
Conflicts:
* Keep TOR_TEST_RNG_SEED from maint-0.4.1
* Keep the ordering from bug33195_035
2020-02-13 13:55:55 +10:00
teor
add387c507
Travis: Sort jobs in order of speed
Putting the slowest jobs first takes full advantage of Travis
concurrency.

Closes 33194.
2020-02-13 13:52:41 +10:00
teor
fc3555100f
Travis: Remove a redundant distcheck job
Part of 33194.
2020-02-13 13:45:18 +10:00
teor
03650e0f60
Travis: Require the macOS IPv6 chutney job
The job was previously set to fast_finish / allow_failure, to
speed up the build.

Closes ticket 33195.
2020-02-13 13:43:59 +10:00
teor
e849881d3a Run "make autostyle"
But only take the changes that were caused by the rest of the 33087
branch.

Part of 33087.
2020-02-13 09:28:21 +10:00
Nick Mathewson
d0c3350218 Run "make autostyle". 2020-02-12 18:25:51 -05:00
Nick Mathewson
80e3dc4727 Use more memory poisoning and better asserts around ewma code
Attempt to diagnose 32464; fixes 33290.
2020-02-12 14:17:19 -05:00
Nick Mathewson
3147cbba52 Merge remote-tracking branch 'tor-github/pr/1728/head' into maint-0.4.3 2020-02-12 13:48:39 -05:00
Taylor Yu
0ab859aabe changes file for ticket 33188 2020-02-12 12:28:35 -06:00
swati
d33c80f0ee Moved [[RephistTrackTime]] to General Options. 2020-02-12 23:17:31 +05:30
swati
809090d24d Addressed minor changes suggested in the ticket 2020-02-12 23:07:00 +05:30
teor
4f533ed28b
Merge branch 'bug33087_042' into bug33087_043
"ours" merge, because the 0.4.2 backport deletes the close
functions. But the 0.4.3 bug fix replaces them with fsync()
where available.
2020-02-13 00:02:11 +10:00
teor
8a23393eda
log: Stop duplicating error file fds
Since we're not closing these fds, they don't need to be duplicated
any more.

Cleanup after 33087.
2020-02-13 00:01:47 +10:00
teor
3d1ef3b6f8
err/log: Stop closing stderr and stdout during shutdown
Closing these file descriptors can hide sanitiser logs.

Instead, flush the logs before tor exits, using fsync().
Some Windows environments don't have fsync(), so we check
for it at compile time.

Fixes bug 33087; bugfix on 0.4.1.6.
2020-02-13 00:00:41 +10:00
teor
b6d1f99cb2
Merge branch 'bug33087_041' into bug33087_042 2020-02-12 19:19:43 +10:00
teor
2c0dfb093e
Merge branch 'maint-0.4.1' into bug33087_041 2020-02-12 19:19:38 +10:00
teor
c8242e4c0a
err/log: Stop closing stderr and stdout during shutdown
Closing these file descriptors can hide sanitiser logs.

Fixes bug 33087; bugfix on 0.4.1.6.
2020-02-12 19:18:07 +10:00
teor
e0ea7407a4
Merge remote-tracking branch 'tor-github/pr/1725' into maint-0.4.3 2020-02-12 14:14:11 +10:00
teor
0e00d9369f
Merge branch 'maint-0.4.2' into maint-0.4.3
"ours" merge, because simiar BridgeDistribution fixes have already
been merged to maint-0.4.3. (See 32753.)

The stem changes in 33075 have already been merged to maint-0.4.3,
so this "ours" merge does not affect them.
2020-02-12 14:13:15 +10:00
David Goulet
88489cd290
hs-v3: Remove BUG() that can occur normally
Fixes #28992

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-12 14:09:40 +10:00
teor
ff52205362
Merge branch 'maint-0.4.1' into maint-0.4.2 2020-02-12 12:22:04 +10:00
teor
5298113da9
Merge branch 'maint-0.3.5' into maint-0.4.1 2020-02-12 12:21:57 +10:00
Alexander Færøy
b9c7c61ea5
Lowercase the BridgeDistribution value from torrc in descriptors.
This patch ensures that we always lowercase the BridgeDistribution from
torrc in descriptors before submitting it.

See: https://bugs.torproject.org/32753
2020-02-12 12:21:41 +10:00
teor
88723ad169
Merge remote-tracking branch 'tor-github/pr/1689' into maint-0.3.5 2020-02-12 12:18:59 +10:00
David Goulet
f0964628e6 Merge branch 'ticket33029_042_01' into ticket33029_043_03
Conflicts:
	doc/tor.1.txt
	src/app/config/config.c
	src/app/config/or_options_st.h
	src/core/mainloop/connection.h

Between 042 and 043, the dirauth options were modularized so this merge commit
address this by moving the AuthDirRejectUncompressedRequests to the module
along with a series of accessors.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 10:30:29 -05:00
David Goulet
7b4d9fabef dirauth: Rename function for better clarity
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 10:15:23 -05:00
David Goulet
33414e5494 test: Add unit test for connection_dir_is_global_write_low()
Part of #33029

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 10:15:04 -05:00
David Goulet
6d9113d2f6 dirauth: Resume sending 503 directory error code
Authorities were never sending back 503 error code because by design they
should be able to always answer directory requests regardless of bandwidth
capacity.

However, that recently backfired because of a large number of requests from
unknown source using the DirPort that are _not_ getting their 503 code which
overloaded the DirPort leading to the authority to be unable to answer to its
fellow authorities.

This is not a complete solution to the problem but it will help ease off the
load on the authority side by sending back 503 codes *unless* the connection
is from a known relay or an authority.

Fixes #33029

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:58:28 -05:00