Commit Graph

23812 Commits

Author SHA1 Message Date
teor
c83463ef74
Remove a rendundant check for PidFile changes at runtime
This check is already performed regardless of whether the sandbox is active.

Fixes bug 21123; bugfix on commit 2ae47d3 in 0.2.5.4-alpha.
2017-01-03 15:03:34 +11:00
teor
ceeaf04d16
Document options that can't be changed while tor is running
Closes #21122, bug on multiple tor versions.
2017-01-03 14:54:00 +11:00
Nick Mathewson
6aac6c6bee Make ed25519_fmt() log 0-valued keys more nicely.
Because <unset> makes more sense than AAAAAAAAAAAAAAAAAAA...

(I have indeed verified that ed25519_fmt() is only used for
logging. This patch also clarifies the intention that ed25519_fmt()
is only for logging.

Closes ticket 21037.
2017-01-02 12:31:15 -05:00
Nick Mathewson
97ed2ce085 Unindent long-misindented blocks.
We switched these to be "if (1) " a while back, so we could keep
the indentation and avoid merge conflicts.  But it's nice to clean
up from time to time.
2017-01-02 12:16:57 -05:00
Nick Mathewson
26651d7fdb Fix some dubious indentation 2017-01-02 12:13:11 -05:00
Nick Mathewson
991aeeccb1 changes file for 20823 2017-01-02 10:50:02 -05:00
Nick Mathewson
b317813485 Make GETINFO entry-guards work again with prop271
This is not a great solution, but it's as close to
backward-compatible as possible.  A better GETINFO API should expose
more information.
2017-01-02 10:10:03 -05:00
Nick Mathewson
9d37449fb0 Move entry-guard-is-up notification later into dirguard path.
Previously we were marking directory guards up in
..._process_inbuf(), but that's wrong: we call that function on
close as well as on success.  Instead, we're marking the dirguard up
only after we parse the HTTP headers. Closes 20974.
2017-01-02 09:56:06 -05:00
Nick Mathewson
ded98be45c Merge remote-tracking branch 'jryans/doc-formatting' 2017-01-02 08:53:17 -05:00
J. Ryan Stinnett
58172be657 Use the correct spelling for "Dependent" in the control protocol.
Fixes #18146.
2016-12-29 22:32:42 -06:00
Nick Mathewson
1a45398ffa Fix double-free on test failure
Found by coverity scan; CID 1398167.
2016-12-27 10:20:13 -05:00
Nick Mathewson
1fbb66fa77 Merge branch 'maint-0.2.9' 2016-12-23 11:02:04 -05:00
Nick Mathewson
c27ae62ade Merge branch 'bug21051_v2' into maint-0.2.9 2016-12-23 11:01:54 -05:00
Nick Mathewson
0a0e513d42 Merge remote-tracking branch 'dgoulet/bug20991_030_01' 2016-12-23 10:56:36 -05:00
cypherpunks
04f21f0322 Remove abort handler from the backtrace generator
The abort handler masks the exit status of the backtrace generator by
capturing the abort signal from the backtrace handler and exiting with
zero. Because the output of the backtrace generator is meant to be piped
to `bt_test.py`, its exit status is unimportant and is currently
ignored.

The abort handler calls `exit(3)` which is not asynchronous-signal-safe
and calling it in this context is undefined behavior [0].

Closes ticket 21026.

[0] https://www.securecoding.cert.org/confluence/x/34At
2016-12-23 10:54:17 -05:00
cypherpunks
d3c0b137af Remove dead code related to the old tor-fw-helper
This commit removes more code related to the old tor-fw-helper which was
removed in ticket 13338.

Closes ticket 21024.
2016-12-23 10:50:41 -05:00
Nick Mathewson
40ce7a83c4 whitespace fix 2016-12-23 10:46:14 -05:00
cypherpunks
b4c95bb42a Report errors when updating configuration files 2016-12-23 10:35:26 -05:00
cypherpunks
a1c0ebc3eb Use AM_PROG_AR to improve portability
Turning on warnings in Automake makes it complain about not using the
AM_PROG_AR macro. The AM_PROG_AR macro is required when LIBRARIES or
LTLIBRARIES is used.

The macro looks for an archiver and wraps it in the ar-lib script which
is automatically generated so Git should ignore it.

It makes the custom check for 'ar' obsolete so it is removed.

The AM_PROG_AR macro was added in Automake 1.11.2 thus the minimum
Automake version is increased.
2016-12-23 10:35:22 -05:00
cypherpunks
dee0b869c9 Use the Autoconf macro for finding sed
The AC_PROG_SED macro was added in Autoconf 2.59b and the minimum
supported Autoconf version is now 2.63 so we can safely assume it is
available.
2016-12-23 10:35:13 -05:00
cypherpunks
ef2b7c8a9b Add a cross-compile action to AC_RUN_IFELSE 2016-12-23 10:34:15 -05:00
cypherpunks
be080a402f Replace obsolete macros with modern equivalents 2016-12-23 10:34:11 -05:00
Nick Mathewson
0087fe36c1 Merge remote-tracking branch 'dgoulet/bug20572_030_01' 2016-12-23 10:03:35 -05:00
Nick Mathewson
fda7f00321 Note memset as redundant; see 20764. 2016-12-23 09:59:41 -05:00
Nick Mathewson
70243affe7 changes file for 19222 2016-12-23 09:53:16 -05:00
Nick Mathewson
cea1a4e19d This is no longer inline. 2016-12-23 09:50:44 -05:00
Hans Jerry Illikainen
a23fd15786 Fix unreachable heap corruption in base64_decode()
Give size_mul_check() external linkage and use it in base64_decode() to
avoid a potential integer wrap.

Closes #19222
2016-12-23 09:47:09 -05:00
Nick Mathewson
f3da62dbdf changes file for 19899 2016-12-23 08:29:11 -05:00
Nick Mathewson
9fb2bf2f3f Merge remote-tracking branch 'dgoulet/bug19899_030_01' 2016-12-23 08:28:05 -05:00
Nick Mathewson
2f589e1057 Use event_base_new(), not event_init(), to detect libevent 2.
(event_init() is obsoleted in libevent 2.)

Fixes bug 21051; bugfix on 0.2.9.1-alpha when we dropped libevent 1
support.
2016-12-23 08:18:31 -05:00
Nick Mathewson
d528690e90 Merge branch 'maint-0.2.9' 2016-12-23 08:08:23 -05:00
Nick Mathewson
aaeb50b2f3 changes file for 21035. 2016-12-23 08:08:14 -05:00
George Kadianakis
7456677a50 Make outter (plaintext) layer of HS desc conform to prop224.
This basically means changing the 'encrypted' field to 'superencrypted'.
2016-12-23 15:07:21 +02:00
Nick Mathewson
a6eaa121e4 Merge branch 'maint-0.2.9' 2016-12-23 08:06:19 -05:00
Nick Mathewson
1d91bf57df Merge branch 'bug21035' into maint-0.2.9 2016-12-23 08:06:11 -05:00
David Goulet
955d4b7abd circuit: Change close reasons from uint16_t to int
When marking for close a circuit, the reason value, a integer, was assigned to
a uint16_t converting any negative reasons (internal) to the wrong value. On
the HS side, this was causing the client to flag introduction points to be
unreachable as the internal reason was wrongfully converted to a positive
16bit value leading to flag 2 out of 3 intro points to be unreachable.

Fixes #20307 and partially fixes #21056

Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-22 12:37:42 -05:00
David Goulet
2d1fa58fb4 test: Add unit test for prune_services_on_reload()
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-21 15:00:19 -05:00
David Goulet
36b5ca2c8b hs: Move and improve the service pruning code
First, this commit moves the code used to prune the service list when
reloading Tor (HUP signal for instance) to a function from
rend_config_services().

Second, fix bug #21054, improve the code by using the newly added
circuit_get_next_service_intro_circ() function instead of poking at the global
list directly and add _many_ more comments.

Fixes #21054.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-21 15:00:19 -05:00
David Goulet
8a05e1a5d2 circuit: Add a function to get the next service intro circuit
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-21 15:00:19 -05:00
Nick Mathewson
a757f76967 Withstand failures in CLOCK_MONOTONIC_COARSE
This came up on #21035, where somebody tried to build on a linux
system with kernel headers including CLOCK_MONOTONIC_COARSE, then
run on a kernel that didn't support it.

I've adopted a belt-and-suspenders approach here: we detect failures
at initialization time, and we also detect (loudly) failures later on.

Fixes bug 21035; bugfix on 0.2.9.1-alpha when we started using
monotonic time.
2016-12-21 08:17:26 -05:00
Nick Mathewson
df87812b41 Merge remote-tracking branch 'teor/fallbacks-20161219' 2016-12-20 18:38:45 -05:00
Nick Mathewson
3341ad1e9b Merge branch 'maint-0.2.9' 2016-12-20 18:24:09 -05:00
Nick Mathewson
490cd03869 Merge branch 'maint-0.2.8' into maint-0.2.9 2016-12-20 18:23:54 -05:00
Nick Mathewson
cb2e2056b5 Merge branch 'maint-0.2.7' into maint-0.2.8 2016-12-20 18:23:35 -05:00
Nick Mathewson
2673b4b7a8 Merge branch 'maint-0.2.6' into maint-0.2.7 2016-12-20 18:23:19 -05:00
Nick Mathewson
b6227edae1 Add a one-word sentinel value of 0x0 at the end of each buf_t chunk
This helps protect against bugs where any part of a buf_t's memory
is passed to a function that expects a NUL-terminated input.

It also closes TROVE-2016-10-001 (aka bug 20384).
2016-12-20 18:22:53 -05:00
Nick Mathewson
746c51b613 Merge branch 'maint-0.2.5' into maint-0.2.6
("ours" merge because there is a separate 20384 patch for 026)
2016-12-20 18:22:27 -05:00
Nick Mathewson
39ef343523 Add a one-word sentinel value of 0x0 at the end of each buf_t chunk
This helps protect against bugs where any part of a buf_t's memory
is passed to a function that expects a NUL-terminated input.
2016-12-20 18:20:01 -05:00
Nick Mathewson
7d3d56e59a Merge branch 'maint-0.2.4' into maint-0.2.5
(ours merge -- there is a separate 0.2.5 patch for 20384.)
2016-12-20 18:19:41 -05:00
Nick Mathewson
8f857c23b7 Add a one-word sentinel value of 0x0 at the end of each buf_t chunk
This helps protect against bugs where any part of a buf_t's memory
is passed to a function that expects a NUL-terminated input.
2016-12-20 18:18:53 -05:00