Commit Graph

15767 Commits

Author SHA1 Message Date
Mike Perry
4e42a8a2f2 Address Nick's comments from code review.
Also promote log messages to notice and rate-limit them.
2012-08-16 16:29:19 -07:00
Mike Perry
ec6a7effb8 Bug 6475: Explicitly track our path bias state.
This is done to avoid spurious warns. Additional log lines are also
added to try to track down the codepaths where we are somehow overcounting
success counts.
2012-08-15 19:59:55 -07:00
Nick Mathewson
6a33c33a12 Fix warnings and 64-bit problems in openbsd-malloc code
The warning fixes are:
  - Only define issetugid if it's missing.
  - Explicitly ignore the return value of writev.
  - Explicitly cast the retval of readlink() to int.

The 64-bit problems are related to just storing a size_t in an int. Not cool!  Use a size_t instead.

Fix for bug 6379. Bugfix on 0.2.0.20-rc, which introduced openbsd-malloc.
2012-08-15 19:26:53 -04:00
Nick Mathewson
2ba52f4095 Fix wildcarded address mappings from the control port
Apparently, we weren't actually detecting wildcardedness when parsing
them: whoops!

bug 6244.  Bugfix on 0.2.3.9-alpha
2012-08-15 17:59:30 -04:00
Nick Mathewson
959f850056 Raise the part of torrc mapaddress handling that knows wildcards
This patch extracts the inner part of config_register_addressmaps --
the part that knows about detecting wildcard addresses addresses --
and makes it into a new function.  The new function is deliberately
not moved or reindented, so that the diff is smaller.

I need this to fix bug 6244.
2012-08-15 17:52:40 -04:00
Nick Mathewson
cdd882ee71 Check for stream_id, not conn, on extend cells.
Extend cells aren't allowed to have a stream_id, but we were only
blocking them when they had a stream_id that corresponded to a
connection.  As far as I can tell, this change is harmless: it will
make some kinds of broken clients not work any more, but afaik nobody
actually make a client that was broken in that way.

Found while hunting for other places where we made the same mistake
as in 6271.

Bugfix on d7f50337c1 back from May 2003, which introduced
telescoping circuit construction into 0.0.2pre8.
2012-08-15 13:16:41 -04:00
Nick Mathewson
a4fbfa81b3 Update description of what we did to upper limit on md size
Spotted by asn
2012-08-14 03:10:14 -04:00
Nick Mathewson
a9eed33111 Fix memory leak in dirvote_create_microdescriptor
Found by George, who gets a cookie.
2012-08-14 03:07:17 -04:00
Nick Mathewson
c9d3e09cf8 Clarify the last changes message 2012-08-13 14:50:29 -04:00
Nick Mathewson
182f463be9 oops: changes file for f45cde05f9 2012-08-13 14:37:53 -04:00
Nick Mathewson
f45cde05f9 Remove tor_malloc_roundup().
This function never actually did us any good, and it added a little
complexity.  See the changes file for more info.
2012-08-13 13:27:32 -04:00
Roger Dingledine
37d19fdfcd forward-port the 0.2.2.38 changelog 2012-08-13 00:35:37 -04:00
Nick Mathewson
d993b04485 Reject attempts to say FooPort and FooPort 0 in the same cfg domain 2012-08-09 16:13:03 -04:00
Nick Mathewson
e1fb3b8d65 Fix spaces from last patch 2012-08-09 16:02:57 -04:00
Nick Mathewson
dfe03d36c8 Don't infer we have a FooPort from the presence of a FooPort line
Thanks to the changes we started making with SocksPort and friends
in 0.2.3.3-alpha, any of our code that did "if (options->Sockport)"
became wrong, since "SocksPort 0" would make that test true whereas
using the default SocksPort value would make it false.  (We didn't
actually do "if (options->SockPort)" but we did have tests for
TransPort.  When we moved DirPort, ORPort, and ControlPort over to
the same system in 0.2.3.9-alpha, the problem got worse, since our
code is littered with checks for DirPort and ORPort as booleans.

This code renames the current linelist-based FooPort options to
FooPort_lines, and adds new FooPort_set options which get set at
parse-and-validate time on the or_options_t.  FooPort_set is true
iff we will actually try to open a listener of the given type. (I
renamed the FooPort options rather than leave them alone so that
every previous user of a FooPort would need to get inspected, and so
that any new code that forgetfully uses FooPort will need fail to
compile.)

Fix for bug 6507.
2012-08-09 15:48:43 -04:00
Stewart Smith
301e24e4a8 fix up calling of config.status to generate docs 2012-08-09 11:03:48 -04:00
Stewart Smith
2606c8b289 Fix up make distcheck and greatly simplify docs dependencies (although it's still a bit odd) 2012-08-09 11:03:48 -04:00
Stewart Smith
2e80ae895d fix circular dependency for generating code digests 2012-08-09 11:03:48 -04:00
Stewart Smith
8f466a1c60 fix TESTS to include full path to src/test/test 2012-08-09 11:03:48 -04:00
Stewart Smith
7bb04f111a fix dependencies for some generated files 2012-08-09 11:03:47 -04:00
Stewart Smith
12aa553349 remove contrib/Makefile and contrib/suse/Makefile from configure.in
(otherwise would throw an error of "required file X" not found as part
of autogen.sh)
2012-08-09 11:03:47 -04:00
Stewart Smith
e612179e09 add subdir-objects to AUTOMAKE_OPTIONS, this builds object files in subdirs with non-recursive make 2012-08-09 11:03:47 -04:00
Stewart Smith
2a4a149624 Move to non-recursive make
This gives us a few benefits:
1) make -j clean all
   this will start working, as it should. It currently doesn't.
2) increased parallel build
   recursive make will max out at number of files in a directory,
   non-recursive make doesn't have such a limitation
3) Removal of duplicate information in make files,
   less error prone

I've also slightly updated how we call AM_INIT_AUTOMAKE, as the way
that was used was not only deprecated but will be *removed* in the next
major automake release (1.13).... so probably best that we can continue
to bulid tor without requiring old automake.
(see http://www.gnu.org/software/automake/manual/html_node/Public-Macros.html )

For more reasons  why, see resources such as:
http://miller.emu.id.au/pmiller/books/rmch/
2012-08-09 11:03:47 -04:00
Nick Mathewson
ca90aea5eb Temporarily make spurious sendmes warn louder at arma's suggestion. 2012-08-09 10:55:33 -04:00
Nick Mathewson
0b21170085 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-09 10:52:45 -04:00
Nick Mathewson
91b52a259a Merge remote-tracking branch 'public/bug6252_again' into maint-0.2.3 2012-08-09 10:50:11 -04:00
Roger Dingledine
0ea3a3a7a6 forward-port the 0.2.3.20-rc changelog 2012-08-07 17:27:03 -04:00
Nick Mathewson
d373922217 Speak not the name of INT_MIN; it can upset older compilers
And more to the point, some GCCs will warn that you can't say it
before C90.

Bug not in any released version of Tor.
2012-08-03 13:54:12 -04:00
Nick Mathewson
aa584fd3a3 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-03 12:04:36 -04:00
Nick Mathewson
93be3a8822 Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
Conflicts:
	src/or/routerlist.c
2012-08-03 12:04:11 -04:00
Nick Mathewson
d48cebc5e4 Try to clarify impact of bug 6537
I don't personally agree that this is likely to be easy to exploit,
and some initial experimention I've done suggests that cache-miss
times are just plain too fast to get useful info out of when they're
mixed up with the rest of Tor's timing noise.  Nevertheless, I'm
leaving Robert's initial changelog entry in the git history so that he
can be the voice of reason if I'm wrong. :)
2012-08-03 11:54:11 -04:00
Robert Ransom
308f6dad20 Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix.
2012-08-03 11:49:51 -04:00
Nick Mathewson
860c4fc811 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-03 11:46:03 -04:00
Robert Ransom
82c5e385cb Remove bogus comment claiming that an assertion is triggerable by consensus 2012-08-03 11:45:33 -04:00
Nick Mathewson
6c64681879 Fix a bunch of "implicit 64->32" warnings from introduce refactoring 2012-08-03 11:31:04 -04:00
Nick Mathewson
babf8e2a85 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-03 11:23:06 -04:00
Nick Mathewson
1040afb242 Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3 2012-08-03 11:18:40 -04:00
Nick Mathewson
55f635745a Clarify security impact of bug 6530 2012-08-03 11:16:13 -04:00
Nick Mathewson
57e35ad3d9 Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha.
2012-08-03 10:53:00 -04:00
Matthew Finkel
b50eb14bbf Updated docs for new connections. 2012-08-02 16:15:23 -04:00
Nick Mathewson
65d8448209 Merge remote-tracking branch 'sysrqb/bug6518' 2012-08-02 15:45:10 -04:00
Matthew Finkel
a47e4343de Constify struct sockaddr *sa parameter for check
The values are only being checked, not modified.
2012-08-02 15:29:38 -04:00
Matthew Finkel
d91bbf376c Removed redundant check_sockaddr_family_match call 2012-08-02 15:13:34 -04:00
Stewart Smith
c9aafa0962 add $(AM_V_GEN) to documentation generation Makefile targets.
This makes the V=1 or V=0 automake silent build options display (or hide)
the full command line used.

  GEN foo.bar

will be seen rather than the full command.

As with all automake silent rules, "make V=1" will output the full command.
2012-08-02 10:05:36 -04:00
Stewart Smith
9572bebcda Enable the automake silent rules.
$ make V=1 # will temporarily disable them

otherwise you see:

   CC foo.c

rather than the giant long bulid line.

This makes it significantly easier to spot compiler warnings etc.

Additionally, make them conditional, so we won't error on automake <
1.11

(commits squashed by nickm.)
2012-08-02 10:04:13 -04:00
Nick Mathewson
2d6d5db2fe Defensive programming: clear rs_out between iterations.
I can't currently find a bug here, but there are a couple of
near-misses.  Addresses ticket 6514; reported pseudonymously on
IRC.
2012-08-01 17:25:34 -04:00
Nick Mathewson
c49975a2b8 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-31 17:20:36 -04:00
Nick Mathewson
122c8efb09 Merge branch 'bug6480_squashed' into maint-0.2.3 2012-07-31 17:19:47 -04:00
Nick Mathewson
62637fa224 Avoid hard (impossible?)-to-trigger double-free in dns_resolve()
Fixes 6480; fix on 0.2.0.1-alpha; based on pseudonymous patch.
2012-07-31 17:19:17 -04:00
Nick Mathewson
d4e2ccc387 Merge branch 'bug6177_squashed' 2012-07-31 17:09:47 -04:00