Commit Graph

11861 Commits

Author SHA1 Message Date
Peter Palfrader
a19140828d Build-Depend on libssl-dev >= 0.9.8k-6.
libssl 0.9.8k-6 disabled autorenegotation, and the -dev package
introduced the SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION flag.

Since we now set that flag if available we want to make sure that it
*is* available when building.

Therefore build-depend on libssl-dev >= 0.9.8k-6.

If we build against earlier versions we will not work once libssl gets
upgraded to a version that disabled renegotiations.
2009-11-15 10:51:08 +01:00
Peter Palfrader
a28b5628c2 Pick 0a58567ce3 from master git tree
work with libssl that has renegotiation disabled by default.
(debian/patches/0a58567c-work-with-reneg-ssl.dpatch)
2009-11-15 10:41:33 +01:00
Peter Palfrader
6d01081fb3 Merge branch 'debian-merge' into debian
* debian-merge:
  New upstream version
  fix compile on windows
  bump to 0.2.2.5-alpha
  Move dizum to an alternate IP address.
  Ship test.h in release
2009-11-15 10:37:48 +01:00
Peter Palfrader
0165f2765f New upstream version 2009-11-15 10:37:39 +01:00
Peter Palfrader
fa79ef3573 Merge commit 'tor-0.2.2.5-alpha' into debian-merge
* commit 'tor-0.2.2.5-alpha':
  fix compile on windows
  bump to 0.2.2.5-alpha
  Move dizum to an alternate IP address.
  Ship test.h in release
2009-11-15 10:37:34 +01:00
Jacob Appelbaum
6f1fe7e941 Fix compilation with with bionic libc.
This fixes bug 1147:

 bionic doesn't have an actual implementation of mlockall();
 mlockall() is merely in the headers but not actually in the library.
 This prevents Tor compilation with the bionic libc for Android handsets.
2009-11-14 16:45:14 -05:00
Nick Mathewson
0f212193a0 Merge commit 'debian-tor-0.2.1.20-1' into maint-0.2.1 2009-11-13 15:47:18 -05:00
Peter Palfrader
4db6e63c26 Merge branch 'debian-merge' into debian-0.2.1
* debian-merge: (37 commits)
  New upstream version
  bump to 0.2.1.20
  Move moria1 and Tonga to alternate IP addresses.
  read the "circwindow" parameter from the consensus
  Code to parse and access network parameters.
  Revert "Teach connection_ap_can_use_exit about Exclude*Nodes"
  Work around a memory leak in openssl 0.9.8g (and maybe others)
  Teach connection_ap_can_use_exit about Exclude*Nodes
  make some bug 1090 warnings go away
  Fix a memory leak when parsing a ns
  Fix obscure 64-bit big-endian hidserv bug
  turns out the packaging changes aren't in 0.2.1.20
  update changelog with bundle details
  Use an _actual_ fix for the byte-reverse warning.
  Use a simpler fix for the byte-reversing warning
  Fix compile warnings on Snow Leopard
  Add getinfo accepted-server-descriptor. Clean spec.
  Reduce log level for bug case that we now know really exists.
  Only send reachability status events on overall success/failure
  update the README instructions and OS X makefiles
  ...
2009-11-13 19:58:59 +01:00
Peter Palfrader
751e9b2bb6 New upstream version 2009-11-13 19:57:10 +01:00
Peter Palfrader
0e74939671 Merge commit 'tor-0.2.1.20' into debian-merge
* commit 'tor-0.2.1.20': (36 commits)
  bump to 0.2.1.20
  Move moria1 and Tonga to alternate IP addresses.
  read the "circwindow" parameter from the consensus
  Code to parse and access network parameters.
  Revert "Teach connection_ap_can_use_exit about Exclude*Nodes"
  Work around a memory leak in openssl 0.9.8g (and maybe others)
  Teach connection_ap_can_use_exit about Exclude*Nodes
  make some bug 1090 warnings go away
  Fix a memory leak when parsing a ns
  Fix obscure 64-bit big-endian hidserv bug
  turns out the packaging changes aren't in 0.2.1.20
  update changelog with bundle details
  Use an _actual_ fix for the byte-reverse warning.
  Use a simpler fix for the byte-reversing warning
  Fix compile warnings on Snow Leopard
  Add getinfo accepted-server-descriptor. Clean spec.
  Reduce log level for bug case that we now know really exists.
  Only send reachability status events on overall success/failure
  update the README instructions and OS X makefiles
  Avoid segfault when accessing hidden service.
  ...
2009-11-13 19:01:22 +01:00
Roger Dingledine
22f674fcb8 Fix a memory leak on directory authorities during voting
Fix a memory leak on directory authorities during voting that was
introduced in 0.2.2.1-alpha. Found via valgrind.
2009-11-12 01:31:26 -05:00
Nick Mathewson
69c0147ea6 Fix building from a separate build directory. 2009-11-08 00:38:46 -05:00
Nick Mathewson
2db0256372 Add changelog entry to 0.2.2.x about openssl 0.9.8l fix 2009-11-06 15:25:41 -05:00
Nick Mathewson
0a58567ce3 Merge commit 'origin/maint-0.2.1'
Conflicts:
	src/common/tortls.c
2009-11-06 15:24:52 -05:00
Nick Mathewson
ce0a89e262 Make Tor work with OpenSSL 0.9.8l
To fix a major security problem related to incorrect use of
SSL/TLS renegotiation, OpenSSL has turned off renegotiation by
default.  We are not affected by this security problem, however,
since we do renegotiation right.  (Specifically, we never treat a
renegotiated credential as authenticating previous communication.)
Nevertheless, OpenSSL's new behavior requires us to explicitly
turn renegotiation back on in order to get our protocol working
again.

Amusingly, this is not so simple as "set the flag when you create
the SSL object" , since calling connect or accept seems to clear
the flags.

For belt-and-suspenders purposes, we clear the flag once the Tor
handshake is done.  There's no way to exploit a second handshake
either, but we might as well not allow it.
2009-11-05 18:13:08 -05:00
Nick Mathewson
eb1faf8a0a Fix a URL in a log message. 2009-11-04 11:39:10 -05:00
Sebastian Hahn
f1b7295b27 Disallow command line keywords with more than two dashes as prefix.
This might help fix cid 422, where coverity fails to notice that
argv strings are null-escaped.
2009-10-27 17:50:24 +01:00
Sebastian Hahn
b0e8c33617 Make it more obvious for coverity that cid 404 is not dead code 2009-10-27 14:19:32 +01:00
Jacob Appelbaum
2aac39a779 Implement DisableAllSwap to avoid putting secret info in page files.
This commit implements a new config option: 'DisableAllSwap'
This option probably only works properly when Tor is started as root.
We added two new functions: tor_mlockall() and tor_set_max_memlock().
tor_mlockall() attempts to mlock() all current and all future memory pages.
For tor_mlockall() to work properly we set the process rlimits for memory to
RLIM_INFINITY (and beyond) inside of tor_set_max_memlock().
We behave differently from mlockall() by only allowing tor_mlockall() to be
called one single time. All other calls will result in a return code of 1.
It is not possible to change DisableAllSwap while running.
A sample configuration item was added to the torrc.complete.in config file.
A new item in the man page for DisableAllSwap was added.
Thanks to Moxie Marlinspike and Chris Palmer for their feedback on this patch.

Please note that we make no guarantees about the quality of your OS and its
mlock/mlockall implementation. It is possible that this will do nothing at all.
It is also possible that you can ulimit the mlock properties of a given user
such that root is not required. This has not been extensively tested and is
unsupported. I have included some comments for possible ways we can handle
this on win32.
2009-10-27 04:28:40 -04:00
Karsten Loesing
56c2385157 Fix bug 1113.
Bridges do not use the default exit policy, but reject *:* by default.
2009-10-27 01:03:41 -07:00
Roger Dingledine
8c34e79263 Merge commit 'karsten/log-1092' 2009-10-27 02:26:58 -04:00
Karsten Loesing
c8b27a8e9e Improve log statement when publishing v2 hs desc. 2009-10-26 23:09:10 -07:00
Karsten Loesing
19ddee5582 Fix bug 1042.
If your relay can't keep up with the number of incoming create cells, it
would log one warning per failure into your logs. Limit warnings to 1 per
minute.
2009-10-26 22:49:43 -07:00
Sebastian Hahn
70abd843fd crypto_cipher_set_key cannot fail
In 5e4d53d535 we made it so that
crypto_cipher_set_key cannot fail. The call will now
always succeed, to returning a boolean for success/failure makes
no sense.
2009-10-27 04:31:23 +01:00
Nick Mathewson
174be15c1a Merge commit 'origin/maint-0.2.1' 2009-10-26 23:15:37 -04:00
Nick Mathewson
54973a45a6 Fix an apparently bogus check; fortunately, it seems to be untriggered. 2009-10-26 23:14:53 -04:00
Nick Mathewson
311315e077 Fix an accidentally removed free in 385853a282, and repair a check. 2009-10-26 23:13:29 -04:00
Roger Dingledine
ad525685f6 Merge commit 'karsten/fix-1066-3' 2009-10-26 22:45:12 -04:00
Nick Mathewson
698aaeb178 Note coverity fixes in changelog. 2009-10-26 22:40:41 -04:00
Nick Mathewson
385853a282 Fix/annotate deadcode for CID 402,403 2009-10-26 22:40:41 -04:00
Nick Mathewson
134ac8059b Fix the very noisy unit test memory leak of CID 420-421.
On any failing case in test_util_config_line, we would leak a couple
of strings.
2009-10-26 22:40:41 -04:00
Nick Mathewson
caa141617f Fix dead code found by Coverity (CID 419).
This was left over from an early draft of the microdescriptor code; it
began to populate the signatures array of a networkstatus vote, even
though there's no actual need to do that for a vote.
2009-10-26 22:40:41 -04:00
Nick Mathewson
98cd8c5d16 Fix a very stupid coverity complaint (CID 416).
In its zeal to keep me from saying memset(x, '0', sizeof(x)), Coverity
disallows memset(x, 48, sizeof(x)).  Fine.  I'll choose a different
magic number, see if I care!
2009-10-26 22:40:41 -04:00
Nick Mathewson
5e4d53d535 Remove checks for array existence. (CID 410..415)
In C, the code "char x[10]; if (x) {...}" always takes the true branch of
the if statement.  Coverity notices this now.

In some cases, we were testing arrays to make sure that an operation
we wanted to do would suceed.  Those cases are now always-true.

In some cases, we were testing arrays to see if something was _set_.
Those caes are now tests for strlen(s), or tests for
!tor_mem_is_zero(d,len).
2009-10-26 22:40:41 -04:00
Nick Mathewson
cec698d29e Fix CID 409: check return value of base64_encode in tests 2009-10-26 22:40:41 -04:00
Nick Mathewson
a457cd91fa Clarification to suppress Coverity CID 405.
Every or conn has an outbuf, but coverity has no way of knowing that.
Add an assert to ease its conscience.
2009-10-26 22:40:40 -04:00
Nick Mathewson
8519d36633 Merge commit 'origin/maint-0.2.1' 2009-10-26 22:40:24 -04:00
Nick Mathewson
e50e739556 Add changelog to describe coverity fixes for 0.2.1.21 2009-10-26 22:39:42 -04:00
Karsten Loesing
4256a96461 Fix bug 1066.
If all authorities restart at once right before a consensus vote, nobody
will vote about "Running", and clients will get a consensus with no usable
relays. Instead, authorities refuse to build a consensus if this happens.
2009-10-26 19:27:54 -07:00
Nick Mathewson
5c73da7faa Fix two memory leaks found by Coverity (CIDs 417-418)
The first happens on an error case when a controller wants an
impossible directory object.  The second happens when we can't write
our fingerprint file.
2009-10-26 22:12:40 -04:00
Nick Mathewson
8bada1ef67 Add missing break statements for Coverity CIDs #406,407.
The code for these was super-wrong, but will only break things when we
reset an option on a platform where sizeof(time_t) is different from
sizeof(int).
2009-10-26 21:35:26 -04:00
Nick Mathewson
071521e02f Merge commit 'origin/maint-0.2.1'
Conflicts:
	ChangeLog
2009-10-26 20:15:03 -04:00
Nick Mathewson
56048637a5 Only send the if_modified_since header for a v3 consensus.
Spotted by xmux; bugfix on 0.2.0.10-alpha.
(Bug introduced by 20b10859)
2009-10-26 20:14:11 -04:00
Roger Dingledine
e0b2c84cde add a changelog entry to karsten's fix for bug 1114 2009-10-26 03:16:47 -04:00
Karsten Loesing
d2b4b49ff0 Reduce log level for someone else sending us weak DH keys.
See task 1114. The most plausible explanation for someone sending us weak
DH keys is that they experiment with their Tor code or implement a new Tor
client. Usually, we don't care about such events, especially not on warn
level. If we really care about someone not following the Tor protocol, we
can set ProtocolWarnings to 1.
2009-10-25 23:47:05 -07:00
Roger Dingledine
fa23430496 clean up the XXX comments around bug 1038 2009-10-26 01:32:27 -04:00
Roger Dingledine
c97a4878af Merge commit 'debian-tor-0.2.2.4-alpha-1' 2009-10-25 23:59:50 -04:00
Nick Mathewson
afc76a4e71 Fix two bugs found by Coverity scan.
One was a simple buffer overrun; the other was a high-speed pointer
collision.  Both were introduced by my microdescs branch.
2009-10-19 23:19:42 -04:00
Nick Mathewson
f629687053 Merge branch 'microdesc' 2009-10-19 00:45:47 -04:00
Nick Mathewson
d40a814f4f Changelog for microdescriptor branch. 2009-10-19 00:39:20 -04:00