Commit Graph

8671 Commits

Author SHA1 Message Date
Nick Mathewson
de7fcae72a Merge remote-tracking branch 'tor-github/pr/1382' 2019-10-03 09:08:23 -04:00
teor
f0993d3831 configure: Give a more useful message when pkg-config fails
When pkg-config is not installed, or a library that depends on
pkg-config is not found, tell the user what to do to fix the
problem.

Fixes bug 31922; bugfix on 0.3.1.1-alpha.
2019-10-03 16:31:20 +10:00
teor
3d17fafa04
control/control: Refactor some error handling code
Split some protocol error handling out of
connection_control_process_inbuf().

This refactor reduces the size of a practracker exception.

Closes 31840.
2019-10-03 11:35:42 +10:00
Nick Mathewson
bca30bcb90 Merge remote-tracking branch 'tor-github/pr/1374' 2019-10-02 19:19:11 -04:00
David Goulet
ca1f18c159 Merge branch 'tor-github/pr/1385' 2019-10-02 14:15:31 -04:00
David Goulet
014abf86e5 Merge branch 'tor-github/pr/1344' 2019-10-02 10:37:49 -04:00
David Goulet
40be20d542 Merge branch 'tor-github/pr/1363' 2019-10-02 10:34:46 -04:00
Nick Mathewson
a74c180691 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-10-02 08:01:34 -04:00
Nick Mathewson
c81e1e4542 Merge branch 'maint-0.4.1' 2019-10-02 08:01:34 -04:00
Nick Mathewson
4dcbbe4166 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-10-02 08:01:34 -04:00
Nick Mathewson
7b9cb4c47b Merge branch 'maint-0.2.9' into maint-0.3.5 2019-10-02 08:01:33 -04:00
Karsten Loesing
90de776ea9 Update geoip and geoip6 to the October 1 2019 database. 2019-10-02 11:11:27 +02:00
Nick Mathewson
2b825a1a2e Fix a crash bug in max_u16_in_sl()
The documentation for this function says that the smartlist can
contain NULLs, but the code only handled NULLs if they were at the
start of the list.

We didn't notice this for a long time, because when Tor is run
normally, the sequence of msg_id_t is densely packed, and so this
list (mapping msg_id_t to channel_id_t) contains no NULL elements.
We could only run into this bug:
  * when Tor was running in embedded mode, and starting more than once.
  * when Tor ran first with more pubsub messages enabled, and then
    later with fewer.
  * When the second run (the one with fewer enabled pubsub messages)
    had at least some messages enabled, and those messages were not
    the ones with numerically highest msg_id_t values.

Fixes bug 31898; bugfix on 47de9c7b0a
in 0.4.1.1-alpha.
2019-10-01 13:01:20 -04:00
teor
58746ad9ca
Merge branch 'bug31859_041' into bug31859_master
Merge master's RUST_VERSION="nightly" into the macOS Rust job
from bug31859_041.

Drop master's RUST_VERSION="beta", because we only have two
Rust jobs now.
2019-10-02 00:20:38 +10:00
teor
e5dda7f664
Merge branch 'bug31859_040' into bug31859_041
Merge TOR_TEST_RNG_SEED in maint-0.4.1 into the coverage line
from bug31859_040.
2019-10-01 23:50:24 +10:00
teor
07db4141ab
Merge branch 'bug31859_035' into bug31859_040 2019-10-01 23:46:28 +10:00
George Kadianakis
e8e42f4af9 Help users who try to use v2 client auth in v3 onions. 2019-10-01 13:41:21 +03:00
teor
f368f5bc37
Merge branch 'bug31859_029' into bug31859_035
While merging:
* leave out some redundant jobs and build matrix entries
2019-10-01 17:31:55 +10:00
Nick Mathewson
6581f3e2fa Fix the documentation for GuardLifetime. 2019-09-30 14:54:52 -04:00
teor
1e0e23c1e4
Travis: Add a macOS chutney job, but don't wait for it to finish
Since Travis macOS has IPv6 support (and Travis Linux does not), chutney
will now run its IPv6 networks as part of Travis CI.

But since chutney is slow, don't wait for the macOS chutney to finish.
(Travis have fixed the duplicate notification bug in fast_finish. So we
can use fast_finish and allow_failure to finish early. Unfortunately,
allow_failure also means we ignore failures in macOS chutney.)

Also make sure that we have:
* a compile on each platform, with each compiler,
* a check on each platform, and
* a check on each compiler.

Finally, sort builds: allow fail last, macOS first, slowest first.

Closes ticket 30860.
Closes ticket 31859 for 0.2.9.
2019-09-30 23:58:38 +10:00
teor
4e4297830e
Travis: Remove a redundant clang Linux job
Part of 31859.
2019-09-30 23:58:24 +10:00
teor
c23986246b err: Always lock the backtrace buffer before it is used
Fixes bug 31734; bugfix on 0.2.5.3-alpha.
2019-09-30 23:17:04 +10:00
teor
db329522ef
log: When initialising log domain masks, only set known log domains
And add a runtime test that checks for unknown domains and flags.

Fixes bug 31854; bugfix on 0.2.1.1-alpha.
2019-09-30 22:05:00 +10:00
George Kadianakis
de66bed604 Merge branch 'tor-github/pr/1366' 2019-09-30 14:01:01 +03:00
George Kadianakis
9318682109 Merge branch 'tor-github/pr/1346' 2019-09-30 13:56:51 +03:00
George Kadianakis
ae8d36db31 Merge branch 'tor-github/pr/1302' 2019-09-30 13:47:53 +03:00
George Kadianakis
fc760c5088 Merge branch 'tor-github/pr/1356' 2019-09-30 13:47:06 +03:00
George Kadianakis
4673cb8168 Merge branch 'tor-github/pr/1339' 2019-09-30 13:44:59 +03:00
teor
b186418792
Appveyor: Avoid spurious errors in Appveyor CI builds
When Appveyor fails before the install step, some of the finish step's
functions were not defined.

Fixes bug 31884; bugfix on 0.3.4.2-alpha.
2019-09-30 15:14:21 +10:00
teor
2420c8c936 test: Avoid a map_anon_nofork test failure on SunOS
This test failure happened due to a signed/unsigned integer
comparison.

This bug occurred on SunOS, it may also occur on other systems that
use signed char as the default. (And cast 1-byte integer constants
to an unsigned integer.)

Fixes bug 31897; bugfix on 0.4.1.1-alpha.
2019-09-30 14:54:56 +10:00
Nick Mathewson
3283fd7e79 Changes file for 31759 and 31779 2019-09-26 15:52:45 -04:00
Nick Mathewson
ffd857bbe1 Merge remote-tracking branch 'tor-github/pr/1308' 2019-09-26 14:36:37 -04:00
teor
d1eab05834
lock: Avoid some undefined behaviour when freeing mutexes.
Fixes bug 31736; bugfix on 0.0.7.
2019-09-26 12:37:25 +10:00
teor
c9c046c365
changes: file for 31614 2019-09-26 12:22:21 +10:00
Nick Mathewson
40a22fb707 Merge remote-tracking branch 'tor-github/pr/1349' 2019-09-25 13:07:19 -04:00
George Kadianakis
7157d80c6f Merge branch 'tor-github/pr/1337' 2019-09-25 14:19:49 +03:00
George Kadianakis
01a797be4e Merge branch 'tor-github/pr/1334' 2019-09-25 14:19:02 +03:00
George Kadianakis
0a77e5f1c2 Merge branch 'tor-github/pr/1341' 2019-09-25 14:18:15 +03:00
George Kadianakis
09769779a0 Merge branch 'tor-github/pr/1357' 2019-09-25 14:17:35 +03:00
George Kadianakis
6712fb9e27 Merge branch 'tor-github/pr/1353' 2019-09-25 14:16:28 +03:00
George Kadianakis
e77ad795c6 Merge branch 'tor-github/pr/1322' 2019-09-25 14:13:44 +03:00
George Kadianakis
99f75373de Merge branch 'tor-github/pr/1309' 2019-09-25 14:12:42 +03:00
teor
d30a042fa8 test: Use SEVERITY_MASK_IDX() to find the LOG_* mask indexes
In the unit tests and fuzzers.

Fixes bug 31334; bugfix on 0.2.5.2-alpha.
2019-09-25 16:40:09 +10:00
Nick Mathewson
b03cb0cc26 Add a changes file about the introduction of doc/HACKING/design. 2019-09-24 19:35:42 -04:00
Nick Mathewson
7071144859 Merge branch 'ticket31372_041' into ticket31372_042 2019-09-24 08:04:41 -04:00
Nick Mathewson
836b7a538e Merge branch 'ticket31372_040' into ticket31372_041 2019-09-24 08:04:20 -04:00
Nick Mathewson
246fdd8742 Merge branch 'ticket31372_035' into ticket31372_040 2019-09-24 08:02:44 -04:00
Nick Mathewson
da5c8277ea Merge branch 'ticket31372_029' into ticket31372_035 2019-09-24 08:01:43 -04:00
teor
0c07cd24d4
changes: file for 31839 2019-09-24 15:22:57 +10:00
teor
c7c849bba8
configure: Explain --disable-module-dirauth better
Explain what the optional Directory Authority module is, and what
happens when it is disabled.

Fixes bug 31825; bugfix on 0.3.4.1-alpha.
2019-09-24 11:29:22 +10:00
teor
876b3e2775
Merge branch 'bug31408_035' into bug31408_master 2019-09-24 11:07:38 +10:00
teor
0614f83905
changes: use correct bugfix release, and reword changes file for 31408 2019-09-24 11:06:20 +10:00
Nick Mathewson
49a11f8a8a Try using make -k in the Appveyor configuration
Frequently, when a patch fails, it has failures in several files.
Using the "-k" flag will let us learn all the compilation errors,
not just the first one that the compiler hits.

Based on a patch by rl1987.

Closes ticket 31372.
2019-09-23 15:08:34 -04:00
Nick Mathewson
6ed3d8dbd1 Try using make -k in Travis configuration
Frequently, when a patch fails, it has failures in several files.
Using the "-k" flag will let us learn all the compilation errors,
not just the first one that the compiler hits.

Based on a patch by rl1987.
2019-09-23 15:05:08 -04:00
AmreshVenugopal
3e45260594 fix: Ticket #31589
- The function `decrypt_desc_layer` has a cleaner interface.
- `is_superencrypted_layer` changed from `int` -> `bool`

[ticket details](https://trac.torproject.org/projects/tor/ticket/31589)

add(changes/*): changes file
fix(src/features/hs): is_superencrypted changed from `int` -> `bool`
fix(changes/ticket31589): header
add(changes/ticket31589): subsystem(onion services) to change
2019-09-23 23:52:01 +05:30
Daniel Pinto
15490816da
Fix bug when %including folder with comment only files. #31408
When processing a %included folder, a bug caused the pointer to
the last element of the options list to be set to NULL when
processing a file with only comments or whitepace. This could
cause options from other files on the same folder to be
discarded depending on the lines after the affected %include.
2019-09-23 10:39:08 +10:00
Nick Mathewson
6100378c29 changes file for microdesc_parse refactoring. 2019-09-19 14:37:24 -04:00
Nick Mathewson
37c616aeaf Merge branch 'bug31466_035' into bug31466_042 2019-09-18 15:48:25 -04:00
Nick Mathewson
bf4a27c0ea Merge branch 'bug31466_029' into bug31466_035_tmp 2019-09-18 15:42:40 -04:00
Nick Mathewson
f0e4120996 Add a rate-limit to our warning about the disabled .exit notation
This warning would previously be given every time we tried to open a
connection to a foo.exit address, which could potentially be used to
flood the logs.  Now, we don't allow this warning to appear more
than once every 15 minutes.

Fixes bug 31466; bugfix on 0.2.2.1-alpha, when .exit was first
deprecated.
2019-09-18 15:38:33 -04:00
Nick Mathewson
387cfccee4 Add a coccinelle script to look for {inc,dec}rements in log_debug
We want to forbid this pattern since, unlike the other log_*()
macros, log_debug() conditionally evaluates its arguments only if
debug-level logging is enabled.  Thus, a call to
    log_debug("%d", x++);
will only increment x if debugging logs are enabled, which is
probably not what the programmer intended.

One bug caused by this pattern was #30628.

This script detects log_debug( ) calls with any of E++, E--, ++E,
or --E in their arguments, where E is an arbitrary expression.

Closes ticket 30743.
2019-09-18 13:43:42 -04:00
Nick Mathewson
4bbefc2aac Merge branch 'bug30916_035' into bug30916_041 2019-09-18 11:19:41 -04:00
Nick Mathewson
2da4d64a64 Avoid a crash if our "current" and "old" ntor onion keys are equal
Our dimap code asserts if you try to add the same key twice; this
can't happen if everything is running smoothly, but it's possible if
you try to start a relay where secret_onion_key_ntor is the same as
secret_onion_key_ntor.old.

Fixes bug 30916; bugfix on 0.2.4.8-alpha when ntor keys were
introduced.
2019-09-18 11:14:45 -04:00
Nick Mathewson
82ad63ef40 changes file for 31338 2019-09-18 10:28:33 -04:00
Nick Mathewson
d6d3e829dd Merge branch 'maint-0.4.1' 2019-09-18 08:07:56 -04:00
Nick Mathewson
70bcff6010 Merge branch 'bug31772_041' into maint-0.4.1 2019-09-18 08:07:50 -04:00
Nick Mathewson
5f00c03ed0 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-09-17 21:28:38 -04:00
Nick Mathewson
9e674d0eb4 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-09-17 21:28:37 -04:00
Nick Mathewson
02840169d8 Merge remote-tracking branch 'tor-github/pr/1300' into maint-0.3.5 2019-09-17 21:28:29 -04:00
Nick Mathewson
c3e94a8ccd Merge branch 'maint-0.4.0' into maint-0.4.1 2019-09-17 21:26:32 -04:00
Nick Mathewson
a1f97bb253 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-09-17 21:26:31 -04:00
Nick Mathewson
50b45c43eb Merge branch 'maint-0.2.9' into maint-0.3.5 2019-09-17 21:26:31 -04:00
Nick Mathewson
967460389a Merge remote-tracking branch 'tor-github/pr/1216' into maint-0.2.9 2019-09-17 21:26:17 -04:00
Nick Mathewson
25af8ada30 Correct the syntax description for the MAPADDRESS command.
In 0.4.1.1-alpha I introduced a bug where we would require and
ignore a single positional argument.

Fixes bug 31772.
2019-09-17 19:26:45 -04:00
Nick Mathewson
c6f7943269 Merge branch 'bug31570_041' into maint-0.4.1 2019-09-17 19:04:25 -04:00
Nick Mathewson
50f981719f Merge branch 'maint-0.4.0' into maint-0.4.1 2019-09-17 18:58:44 -04:00
Nick Mathewson
ef35435584 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-09-17 18:58:43 -04:00
Nick Mathewson
dc41e6a80c Merge remote-tracking branch 'tor-github/pr/1307' into maint-0.3.5 2019-09-17 18:58:06 -04:00
Nick Mathewson
cec42be570 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-09-17 18:56:52 -04:00
Nick Mathewson
ab74c3560a Merge branch 'ticket31552_041' into maint-0.4.1 2019-09-17 18:54:05 -04:00
Nick Mathewson
4d7ce27105 Merge branch 'bug31107_041' into bug31107_master 2019-09-17 09:16:53 -04:00
Nick Mathewson
6ee19e57c2 Merge branch 'bug31107_040' into bug31107_041 2019-09-17 09:16:52 -04:00
Nick Mathewson
da8ba5010b Merge branch 'bug31107_035' into bug31107_040 2019-09-17 09:16:52 -04:00
Nick Mathewson
7589995111 Merge branch 'maint-0.3.5' into bug31107_035 2019-09-17 09:16:52 -04:00
Nick Mathewson
3c97ab3c24 Treat an unexpected constant-sized VERSIONS cell as a PROTOCOL_WARN.
We previously used tor_fragile_assert() to declare that this case
could not happen: VERSIONS cells are always supposed to be
variable-sized, right?

This is incorrect, though.  On a v1 link protocol connection, all
cells are fixed-sized.  There aren't supposed to be any VERSIONS
cells with this version of the protocol, but apparently, somebody
was messing up.  (The v1 link protocol is obsolete, so probably the
implementer responsible didn't mean to be using it.)

Fixes bug 31107.  Bugfix on 0.2.4.4-alpha, when we introduced a
tor_fragile_assert() for this case.
2019-09-17 09:13:25 -04:00
Nick Mathewson
1f0848e0b6 Fold new entries into 0.4.2.1-alpha changelog 2019-09-17 08:00:24 -04:00
George Kadianakis
585eaa123f Merge branch 'tor-github/pr/1323' 2019-09-17 14:51:43 +03:00
Daniel Pinto
619178bb3a Fix add_c_file.py script to support paths starting with ./ #31336 2019-09-16 22:57:20 +01:00
Nick Mathewson
7cd68b04de Fold one more entry into changelog. 2019-09-16 12:50:56 -04:00
George Kadianakis
9877423736 Merge branch 'tor-github/pr/1312' 2019-09-16 19:44:33 +03:00
Nick Mathewson
cbd3b01863 Start a changelog for 0.4.2.1-alpha
This commit sorts the changes files using sortChanges, and inserts
them into a changelog entry.
2019-09-16 08:32:01 -04:00
George Kadianakis
cd72850e08 Merge branch 'tor-github/pr/1316' 2019-09-16 15:22:18 +03:00
George Kadianakis
5ec751b38b Merge branch 'tor-github/pr/1324' 2019-09-16 15:21:28 +03:00
George Kadianakis
a1192b6b4a Merge branch 'tor-github/pr/1273' 2019-09-16 15:20:25 +03:00
George Kadianakis
bdd17da9fd Merge branch 'tor-github/pr/1318' 2019-09-16 15:19:38 +03:00
Nick Mathewson
98ab3817a8 Add a changes file for ticket 31637. 2019-09-14 19:00:41 -04:00
David Goulet
286b129b09 Merge branch 'tor-github/pr/1319' 2019-09-12 13:53:59 -04:00
David Goulet
c39c9ce26b Merge branch 'tor-github/pr/1285' 2019-09-12 13:47:09 -04:00
George Kadianakis
028733e8b6 Merge branch 'tor-github/pr/1303' 2019-09-12 18:09:35 +03:00
Nick Mathewson
0327f9a075 Merge branch 'ticket31687_035' into ticket31687_040 2019-09-12 09:51:04 -04:00