]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
14 years agoUpdate to the October 2011 GeoIP database.
Karsten Loesing [Thu, 13 Oct 2011 05:43:47 +0000 (07:43 +0200)] 
Update to the October 2011 GeoIP database.

14 years agoUpdate to the September 2011 GeoIP database.
Karsten Loesing [Mon, 12 Sep 2011 09:40:26 +0000 (11:40 +0200)] 
Update to the September 2011 GeoIP database.

14 years agoGenerate our ssl session certs with a plausible lifetime
Roger Dingledine [Tue, 13 Sep 2011 22:24:45 +0000 (18:24 -0400)] 
Generate our ssl session certs with a plausible lifetime

Nobody but Tor uses certs on the wire with 2 hour lifetimes,
and it makes us stand out. Resolves ticket 4014.

14 years agoUpdate to the August 2011 GeoIP database.
Karsten Loesing [Mon, 8 Aug 2011 14:57:01 +0000 (16:57 +0200)] 
Update to the August 2011 GeoIP database.

14 years agoupdate to the july 2011 geoip db
Roger Dingledine [Thu, 7 Jul 2011 17:28:36 +0000 (13:28 -0400)] 
update to the july 2011 geoip db

14 years agoMerge branches 'cov217_021' and 'cid_450' into maint-0.2.1
Nick Mathewson [Fri, 1 Jul 2011 16:54:51 +0000 (12:54 -0400)] 
Merge branches 'cov217_021' and 'cid_450' into maint-0.2.1

14 years agoUse strlcpy in create_unix_sockaddr()
Nick Mathewson [Fri, 1 Jul 2011 16:06:54 +0000 (12:06 -0400)] 
Use strlcpy in create_unix_sockaddr()

Using strncpy meant that if listenaddress were ever >=
sizeof(sockaddr_un.sun_path), we would fail to nul-terminate
sun_path.  This isn't a big deal: we never read sun_path, and the
kernel is smart enough to reject the sockaddr_un if it isn't
nul-terminated.  Nonetheless, it's a dumb failure mode.  Instead, we
should reject addresses that don't fit in sockaddr_un.sun_path.

Coverity found this; it's CID 428.  Bugfix on 0.2.0.3-alpha.

14 years agoFix a rare memory leak in rend_cache_store
Nick Mathewson [Fri, 1 Jul 2011 15:52:39 +0000 (11:52 -0400)] 
Fix a rare memory leak in rend_cache_store

When we rejected a descriptor for not being the one we wanted, we
were letting the parsed descriptor go out of scope.

Found by Coverity; CID # 30.

Bugfix on 0.2.1.26.

(No changes file yet, since this is not in any 0.2.1.x release.)

14 years agoFix insanely large stack_allocation in log_credential_status
Nick Mathewson [Fri, 1 Jul 2011 16:36:33 +0000 (12:36 -0400)] 
Fix insanely large stack_allocation in log_credential_status

I'm not one to insist on C's miserly stack limits, but allocating a
256K array on the stack is too much even for me.

Bugfix on 0.2.1.7-alpha.  Found by coverity.  Fixes CID # 450.

14 years agoAbandon rendezvous circuits on SIGNAL NEWNYM
Robert Ransom [Fri, 10 Jun 2011 02:56:40 +0000 (19:56 -0700)] 
Abandon rendezvous circuits on SIGNAL NEWNYM

14 years agomove to the june 1 2011 maxmind geoip db
Roger Dingledine [Sun, 5 Jun 2011 15:12:28 +0000 (11:12 -0400)] 
move to the june 1 2011 maxmind geoip db

14 years agoFix typo in changes/bug2574. Thanks, rransom
Nick Mathewson [Sat, 28 May 2011 06:13:04 +0000 (02:13 -0400)] 
Fix typo in changes/bug2574. Thanks, rransom

14 years agoMerge branch 'bug2574' into maint-0.2.1
Nick Mathewson [Sat, 28 May 2011 06:07:48 +0000 (02:07 -0400)] 
Merge branch 'bug2574' into maint-0.2.1

14 years agoWork correctly if your nameserver is ::1
Nick Mathewson [Mon, 23 May 2011 21:42:38 +0000 (17:42 -0400)] 
Work correctly if your nameserver is ::1

We had all the code in place to handle this right... except that we
were unconditionally opening a PF_INET socket instead of looking at
sa_family.  Ow.

Fixes bug 2574; not a bugfix on any particular version, since this
never worked before.

14 years agorm files for changes merged in all of release021, release022, master
Nick Mathewson [Mon, 16 May 2011 20:17:35 +0000 (16:17 -0400)] 
rm files for changes merged in all of release021, release022, master

14 years agosquash! Add crypto_pk_check_key_public_exponent function
Nick Mathewson [Mon, 16 May 2011 18:44:23 +0000 (14:44 -0400)] 
squash! Add crypto_pk_check_key_public_exponent function

Rename crypto_pk_check_key_public_exponent to crypto_pk_public_exponent_ok:
it's nice to name predicates s.t. you can tell how to interpret true
and false.

14 years agoRequire that certain public keys have public exponent 65537
Robert Ransom [Thu, 28 Apr 2011 21:35:03 +0000 (14:35 -0700)] 
Require that certain public keys have public exponent 65537

14 years agoAdd crypto_pk_check_key_public_exponent function
Robert Ransom [Thu, 28 Apr 2011 19:13:03 +0000 (12:13 -0700)] 
Add crypto_pk_check_key_public_exponent function

14 years agoCheck fetched rendezvous descriptors' service IDs
Robert Ransom [Wed, 27 Apr 2011 20:37:08 +0000 (13:37 -0700)] 
Check fetched rendezvous descriptors' service IDs

14 years agoFixup whitespace issues from 3122 commit
Nick Mathewson [Mon, 16 May 2011 00:06:36 +0000 (20:06 -0400)] 
Fixup whitespace issues from 3122 commit

14 years agoAnother doc tweak on tor_memcmp: <b>b</b>, not <b>.
Nick Mathewson [Sun, 15 May 2011 23:56:05 +0000 (19:56 -0400)] 
Another doc tweak on tor_memcmp: <b>b</b>, not <b>.

14 years agominor tweaks to 4b19730c8234d
Roger Dingledine [Sun, 15 May 2011 23:20:42 +0000 (19:20 -0400)] 
minor tweaks to 4b19730c8234d

14 years agoMerge remote-tracking branch 'public/bug3122_memcmp_squashed' into maint-0.2.1
Nick Mathewson [Thu, 12 May 2011 23:20:40 +0000 (19:20 -0400)] 
Merge remote-tracking branch 'public/bug3122_memcmp_squashed' into maint-0.2.1

14 years agoMerge branch 'bug3135' into maint-0.2.1
Nick Mathewson [Thu, 12 May 2011 02:49:44 +0000 (22:49 -0400)] 
Merge branch 'bug3135' into maint-0.2.1

14 years agoFix crash when read_file_to_string() fails in SAVECONF
Nick Mathewson [Thu, 12 May 2011 02:05:41 +0000 (22:05 -0400)] 
Fix crash when read_file_to_string() fails in SAVECONF

The new behavior is to try to rename the old file if there is one there
that we can't read.  In all likelihood, that will fail too, but at least
we tried, and at least it won't crash.

14 years agoHand-conversion and audit phase of memcmp transition
Nick Mathewson [Tue, 10 May 2011 20:58:38 +0000 (16:58 -0400)] 
Hand-conversion and audit phase of memcmp transition

Here I looked at the results of the automated conversion and cleaned
them up as follows:

   If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I
   changed it to a fast_memcmp or fast_memeq.

   Otherwise if there was a tor_memcmp that could turn into a
   tor_memneq or tor_memeq, I converted it.

This wants close attention.

[*] I'm erring on the side of caution here, and leaving some things
as tor_memcmp that could in my opinion use the data-dependent
fast_memcmp variant.

14 years agoAutomated conversion of memcmp to tor_memcmp/tor_mem[n]eq
Nick Mathewson [Tue, 10 May 2011 20:23:43 +0000 (16:23 -0400)] 
Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq

This commit is _exactly_ the result of

perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch]
perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch]
git checkout src/common/di_ops.[ch]
git checkout src/or/test.c
git checkout src/common/test.h

14 years agoAdd a "di_ops.h" include to util.h
Nick Mathewson [Tue, 10 May 2011 20:19:58 +0000 (16:19 -0400)] 
Add a "di_ops.h" include to util.h

14 years agoAdd a data-independent variant of memcmp and a d-i memeq function.
Nick Mathewson [Mon, 9 May 2011 22:39:23 +0000 (18:39 -0400)] 
Add a data-independent variant of memcmp and a d-i memeq function.

The tor_memcmp code is by Robert Ransom, and the tor_memeq code is
by me.  Both incorporate some ideas from DJB's stuff.

14 years agoUpdate to the May 1 2011 Maxmind GeoLite Country database
Roger Dingledine [Wed, 11 May 2011 03:04:11 +0000 (23:04 -0400)] 
Update to the May 1 2011 Maxmind GeoLite Country database

14 years agoFix a failure case of connection_ap_handshake_attach_circuit()
Sebastian Hahn [Wed, 27 Apr 2011 23:48:25 +0000 (01:48 +0200)] 
Fix a failure case of connection_ap_handshake_attach_circuit()

tor_fragile_assert() might be a no-op, so we have to return something
here to indicate failure to the caller.

14 years agoFix a bug introduced by purging rend_cache on NEWNYM
Robert Ransom [Mon, 25 Apr 2011 13:38:35 +0000 (06:38 -0700)] 
Fix a bug introduced by purging rend_cache on NEWNYM

If the user sent a SIGNAL NEWNYM command after we fetched a rendezvous
descriptor, while we were building the introduction-point circuit, we
would give up entirely on trying to connect to the hidden service.

Original patch by rransom slightly edited to go into 0.2.1

14 years agoAllow rend_client_send_introduction to fail transiently
Robert Ransom [Mon, 25 Apr 2011 15:36:02 +0000 (08:36 -0700)] 
Allow rend_client_send_introduction to fail transiently

i.e. without closing the AP connection.

14 years agoForget all rendezvous client state on SIGNAL NEWNYM
Robert Ransom [Wed, 20 Apr 2011 09:27:58 +0000 (02:27 -0700)] 
Forget all rendezvous client state on SIGNAL NEWNYM

14 years agoMake SIZE_T_CEILING unsigned; add a signed SSIZE_T_CEILING
Nick Mathewson [Tue, 26 Apr 2011 17:00:46 +0000 (13:00 -0400)] 
Make SIZE_T_CEILING unsigned; add a signed SSIZE_T_CEILING

None of the comparisons were _broken_ previously, but avoiding
signed/unsigned comparisons makes everybody happier.

Fixes bug2475.

14 years agoFix a bug in removing DNSPort requests from their circular list
Nick Mathewson [Thu, 21 Apr 2011 17:39:00 +0000 (13:39 -0400)] 
Fix a bug in removing DNSPort requests from their circular list

Under heavy load, this could result in an assertion failure.  Fix for
bug 2933; bugfix on 0.2.0.10-alpha.

14 years agoMerge remote-tracking branch 'rransom/bug2750-v3' into maint-0.2.1
Nick Mathewson [Tue, 19 Apr 2011 16:30:50 +0000 (12:30 -0400)] 
Merge remote-tracking branch 'rransom/bug2750-v3' into maint-0.2.1

14 years agoOuch: correctly tabify the micro-revision.i target in Makefile.am (0.2.1 only)
Nick Mathewson [Tue, 19 Apr 2011 16:29:20 +0000 (12:29 -0400)] 
Ouch: correctly tabify the micro-revision.i target in Makefile.am (0.2.1 only)

14 years agoAdd an XXX
Robert Ransom [Mon, 18 Apr 2011 20:25:48 +0000 (13:25 -0700)] 
Add an XXX

14 years agoCorrect the warning emitted when rejecting an oversized HS desc
Robert Ransom [Mon, 11 Apr 2011 09:26:07 +0000 (02:26 -0700)] 
Correct the warning emitted when rejecting an oversized HS desc

14 years agoMerge remote-tracking branch 'public/bug2402_again' into maint-0.2.1
Nick Mathewson [Wed, 6 Apr 2011 20:13:22 +0000 (16:13 -0400)] 
Merge remote-tracking branch 'public/bug2402_again' into maint-0.2.1

14 years agoswitch to the apr 2011 geoip db
Roger Dingledine [Mon, 4 Apr 2011 07:52:58 +0000 (03:52 -0400)] 
switch to the apr 2011 geoip db

14 years agoFix configure.in zlib package names.
Erinn Clark [Tue, 15 Feb 2011 01:15:42 +0000 (02:15 +0100)] 
Fix configure.in zlib package names.

14 years agoFix a compile warning when using clang
Sebastian Hahn [Wed, 9 Mar 2011 15:39:04 +0000 (16:39 +0100)] 
Fix a compile warning when using clang

Issue noticed by Steven Murdoch; fixes bug 2689. The cast didn't do
anything, and we don't need to look at the return value of the function
here.

14 years agowe're not reachable if we don't have a routerinfo yet
Roger Dingledine [Sun, 13 Mar 2011 19:47:59 +0000 (15:47 -0400)] 
we're not reachable if we don't have a routerinfo yet

14 years agoput the 0.2.1.30 changes into releasenotes
Roger Dingledine [Fri, 11 Mar 2011 22:38:55 +0000 (17:38 -0500)] 
put the 0.2.1.30 changes into releasenotes

14 years agoBackport: Generate version tags using Git, not (broken) svn revisions.
Nick Mathewson [Tue, 25 Jan 2011 19:01:04 +0000 (14:01 -0500)] 
Backport: Generate version tags using Git, not (broken) svn revisions.

Partial backport of daa0326aaaa85a760be94ee2360cfa61a9fb5be2 .
Resolves bug 2402.  Bugfix on 0.2.1.15 (for the part where we switched to
git) and on 0.2.1.30 (for the part where we dumped micro-revisions.)

14 years agoRevert "Simplest fix to bug2402: do not include SVN versions"
Nick Mathewson [Fri, 11 Mar 2011 15:47:25 +0000 (10:47 -0500)] 
Revert "Simplest fix to bug2402: do not include SVN versions"

This reverts commit a1073ee956021ead19d30c2151510dbaced416a8.

Apparently, we totally misunderstood how the debian packages were using
microrevisions.  Better fix that!

14 years agomove to march 2011 geoip file
Roger Dingledine [Tue, 8 Mar 2011 23:15:17 +0000 (18:15 -0500)] 
move to march 2011 geoip file

14 years agoAvoid crash in any_pending_bridge_descriptor_fetches
Nick Mathewson [Tue, 8 Mar 2011 20:17:41 +0000 (15:17 -0500)] 
Avoid crash in any_pending_bridge_descriptor_fetches

This is based on shitlei's fix for bug2629, with extra parens removed.
Fixes bug 2629, bugfix on 0.2.1.2-alpha.

14 years agoMerge branch 'real_ipv6_fix' into maint-0.2.1
Nick Mathewson [Sun, 6 Mar 2011 18:42:05 +0000 (13:42 -0500)] 
Merge branch 'real_ipv6_fix' into maint-0.2.1

14 years agoOops, here's the *REAL* fix for the ipv6 issue
Nick Mathewson [Sun, 6 Mar 2011 18:31:06 +0000 (13:31 -0500)] 
Oops, here's the *REAL* fix for the ipv6 issue

We need to _REJECT_ descriptors with accept6/reject6 lines.  If we
let them onto the network , other un-upgraded tors will crash.

14 years agoMerge branch 'careful_with_all_descs' into maint-0.2.1
Nick Mathewson [Sun, 6 Mar 2011 18:35:42 +0000 (13:35 -0500)] 
Merge branch 'careful_with_all_descs' into maint-0.2.1

14 years agochanges file for careful_with_all_descs
Nick Mathewson [Sun, 6 Mar 2011 18:35:24 +0000 (13:35 -0500)] 
changes file for careful_with_all_descs

14 years agoRevert "Disallow reject6 and accept6 lines in descriptors"
Nick Mathewson [Sun, 6 Mar 2011 18:26:38 +0000 (13:26 -0500)] 
Revert "Disallow reject6 and accept6 lines in descriptors"

This reverts commit b3918b3bbbfa9097246d63746c8b540eff2ec8e8.

14 years agoexit_policy_is_general_exit is IPv4 only; it should admit it.
Nick Mathewson [Sun, 6 Mar 2011 18:16:53 +0000 (13:16 -0500)] 
exit_policy_is_general_exit is IPv4 only; it should admit it.

14 years agoChanges file for ipv6 parsing issue
Nick Mathewson [Sun, 6 Mar 2011 18:15:32 +0000 (13:15 -0500)] 
Changes file for ipv6 parsing issue

14 years agoDisallow reject6 and accept6 lines in descriptors
Sebastian Hahn [Sun, 6 Mar 2011 17:20:28 +0000 (18:20 +0100)] 
Disallow reject6 and accept6 lines in descriptors

This fixes a remotely triggerable assert on directory authorities, who
don't handle descriptors with ipv6 contents well yet. We will want to
revert this once we're ready to handle ipv6.

Issue raised by lorth on #tor, who wasn't able to use Tor anymore.
Analyzed with help from Christian Fromme. Fix suggested by arma. Bugfix
on 0.2.1.3-alpha.

14 years agoDo not serve encrypt-only descriptors with the "all" request. Reported by piebeer
Nick Mathewson [Fri, 4 Mar 2011 04:51:07 +0000 (23:51 -0500)] 
Do not serve encrypt-only descriptors with the "all" request. Reported by piebeer

14 years agoRemove doc/spec/Makefile.in from list of generated files
Nick Mathewson [Tue, 22 Feb 2011 22:51:03 +0000 (17:51 -0500)] 
Remove doc/spec/Makefile.in from list of generated files

14 years agoMerge remote branch 'public/bug1859_021' into maint-0.2.1
Nick Mathewson [Tue, 22 Feb 2011 22:19:41 +0000 (17:19 -0500)] 
Merge remote branch 'public/bug1859_021' into maint-0.2.1

14 years agoMerge remote branch 'public/bug2402_nothing' into maint-0.2.1
Nick Mathewson [Tue, 22 Feb 2011 20:54:13 +0000 (15:54 -0500)] 
Merge remote branch 'public/bug2402_nothing' into maint-0.2.1

14 years agochanges file for removing torspec from the tarball
Roger Dingledine [Tue, 22 Feb 2011 19:50:00 +0000 (14:50 -0500)] 
changes file for removing torspec from the tarball

14 years agoprefer https urls
Roger Dingledine [Tue, 22 Feb 2011 19:39:09 +0000 (14:39 -0500)] 
prefer https urls

14 years agoRemove specs from 0.2.1 branch: they have moved to a new repository.
Nick Mathewson [Mon, 21 Feb 2011 21:02:16 +0000 (16:02 -0500)] 
Remove specs from 0.2.1 branch: they have moved to a new repository.

14 years agofix the other half of bug 1074
Roger Dingledine [Thu, 10 Feb 2011 22:11:06 +0000 (17:11 -0500)] 
fix the other half of bug 1074

14 years agoMake the DH parameter we use for TLS match the one from Apache's mod_ssl
Nick Mathewson [Mon, 24 Jan 2011 21:03:14 +0000 (16:03 -0500)] 
Make the DH parameter we use for TLS match the one from Apache's mod_ssl

Our regular DH parameters that we use for circuit and rendezvous
crypto are unchanged.  This is yet another small step on the path of
protocol fingerprinting resistance.

(Backport from 0.2.2's 5ed73e3807d90dd0a3)

14 years agoUpdate documentation for PublishServerDescriptor
Robert Ransom [Wed, 19 Jan 2011 21:38:40 +0000 (13:38 -0800)] 
Update documentation for PublishServerDescriptor

14 years agoIgnore and warn about "PublishServerDescriptor hidserv"
Robert Ransom [Tue, 18 Jan 2011 11:54:56 +0000 (03:54 -0800)] 
Ignore and warn about "PublishServerDescriptor hidserv"

Fixes #2408.

14 years agomove the clause above the "if bw is too low" check
Roger Dingledine [Tue, 8 Feb 2011 04:22:45 +0000 (23:22 -0500)] 
move the clause above the "if bw is too low" check

14 years agodtrt when only relaybandwidthburst is set
Roger Dingledine [Tue, 8 Feb 2011 04:21:33 +0000 (23:21 -0500)] 
dtrt when only relaybandwidthburst is set

fixes bug 2470

14 years agoUpdate to the February 1 2011 Maxmind GeoLite Country database.
Karsten Loesing [Thu, 3 Feb 2011 06:34:00 +0000 (07:34 +0100)] 
Update to the February 1 2011 Maxmind GeoLite Country database.

14 years agofix the links in the exit-list notice we give out to users.
Andrew Lewman [Wed, 26 Jan 2011 16:14:44 +0000 (11:14 -0500)] 
fix the links in the exit-list notice we give out to users.

14 years agoBackport current tor-exit-notice to 0.2.1
Nick Mathewson [Wed, 26 Jan 2011 16:13:57 +0000 (11:13 -0500)] 
Backport current tor-exit-notice to 0.2.1

14 years agoSimplest fix to bug2402: do not include SVN versions
Nick Mathewson [Tue, 25 Jan 2011 19:08:13 +0000 (14:08 -0500)] 
Simplest fix to bug2402: do not include SVN versions

When we stopped using svn, 0.2.1.x lost the ability to notice its svn
revision and report it in the version number.  However, it kept
looking at the micro-revision.i file... so if you switched to master,
built tor, then switched to 0.2.1.x, you'd get a micro-revision.i file
from master reported as an SVN tag.  This patch takes out the "include
the svn tag" logic entirely.

Bugfix on 0.2.1.15-rc; fixes bug 2402.

14 years agoMerge remote branch 'rransom/policy_summarize-assert' into maint-0.2.1
Nick Mathewson [Thu, 20 Jan 2011 19:59:23 +0000 (14:59 -0500)] 
Merge remote branch 'rransom/policy_summarize-assert' into maint-0.2.1

14 years agoFix bounds-checking in policy_summarize
Robert Ransom [Thu, 20 Jan 2011 19:17:57 +0000 (11:17 -0800)] 
Fix bounds-checking in policy_summarize

Found by piebeer.

14 years agoOops; actually add the code to the last patch. :/
Nick Mathewson [Wed, 19 Jan 2011 18:25:17 +0000 (13:25 -0500)] 
Oops; actually add the code to the last patch. :/

14 years agoFix two more SIZE_T_CEILING issues
Nick Mathewson [Wed, 19 Jan 2011 18:22:50 +0000 (13:22 -0500)] 
Fix two more SIZE_T_CEILING issues

This patch imposes (very long) limits on the length of a line in a
directory document, and on the length of a certificate.  I don't
think it should actually be possible to overrun these remotely,
since we already impose a maximum size on any directory object we're
downloading, but a little defensive programming never hurt anybody.

Roger emailed me that doorss reported these on IRC, but nobody seems
to have put them on the bugtracker.

14 years agobe the winner, rewrite history
Roger Dingledine [Wed, 19 Jan 2011 00:12:01 +0000 (19:12 -0500)] 
be the winner, rewrite history

14 years ago0.2.1.29 changelog and blurb
Roger Dingledine [Sun, 16 Jan 2011 00:56:10 +0000 (19:56 -0500)] 
0.2.1.29 changelog and blurb

14 years agoFix a couple of non-cleared key issues in hidden services
Nick Mathewson [Sat, 15 Jan 2011 16:32:56 +0000 (11:32 -0500)] 
Fix a couple of non-cleared key issues in hidden services

we need to do more hunting, but this fixes the ones mentioned in 2385.

14 years agoZero out some more key data before freeing it
Nick Mathewson [Sat, 15 Jan 2011 16:22:25 +0000 (11:22 -0500)] 
Zero out some more key data before freeing it

Found by cypherpunks; fixes bug 2384.

14 years agoMerge branch 'bug2352_obsize' into maint-0.2.1
Nick Mathewson [Sat, 15 Jan 2011 18:15:06 +0000 (13:15 -0500)] 
Merge branch 'bug2352_obsize' into maint-0.2.1

14 years agoAdd missing check for hostname answer_len in dnsserv size
Nick Mathewson [Sat, 15 Jan 2011 18:09:12 +0000 (13:09 -0500)] 
Add missing check for hostname answer_len in dnsserv size

This is checked elsewhere too, but let's be RFC-conformant.

14 years agoMerge branch 'bug2332_part2' into maint-0.2.1
Nick Mathewson [Sat, 15 Jan 2011 17:43:02 +0000 (12:43 -0500)] 
Merge branch 'bug2332_part2' into maint-0.2.1

14 years agoMerge branch 'bug2324_uncompress' into maint-0.2.1
Nick Mathewson [Sat, 15 Jan 2011 17:12:34 +0000 (12:12 -0500)] 
Merge branch 'bug2324_uncompress' into maint-0.2.1

14 years agoclean up message; explain a magic number in a comment
Nick Mathewson [Sat, 15 Jan 2011 17:12:10 +0000 (12:12 -0500)] 
clean up message; explain a magic number in a comment

14 years agomake the description of tolen_asserts more dire
Nick Mathewson [Sat, 15 Jan 2011 15:54:58 +0000 (10:54 -0500)] 
make the description of tolen_asserts more dire

We have a CVE # for this bug.

14 years agoFix a heap overflow found by debuger, and make it harder to make that mistake again
Nick Mathewson [Thu, 13 Jan 2011 19:36:41 +0000 (14:36 -0500)] 
Fix a heap overflow found by debuger, and make it harder to make that mistake again

Our public key functions assumed that they were always writing into a
large enough buffer.  In one case, they weren't.

(Incorporates fixes from sebastian)

14 years agoAlways nul-terminate the result passed to evdns_server_add_ptr_reply
Nick Mathewson [Mon, 10 Jan 2011 21:18:32 +0000 (16:18 -0500)] 
Always nul-terminate the result passed to evdns_server_add_ptr_reply

In dnsserv_resolved(), we carefully made a nul-terminated copy of the
answer in a PTR RESOLVED cell... then never used that nul-terminated
copy.  Ouch.

Surprisingly this one isn't as huge a security problem as it could be.
The only place where the input to dnsserv_resolved wasn't necessarily
nul-terminated was when it was called indirectly from relay.c with the
contents of a relay cell's payload.  If the end of the payload was
filled with junk, eventdns.c would take the strdup() of the name [This
part is bad; we might crash there if the cell is in a bad part of the
stack or the heap] and get a name of at least length
495[*]. eventdns.c then rejects any name of length over 255, so the
bogus data would be neither transmitted nor altered.

  [*] If the name was less than 495 bytes long, the client wouldn't
     actually be reading off the end of the cell.

Nonetheless this is a reasonably annoying bug.  Better fix it.

Found while looking at bug 2332, reported by doorss.  Bugfix on
0.2.0.1-alpha.

14 years agocatch another overlong malloc possibility. found by cypherpunks
Nick Mathewson [Sat, 15 Jan 2011 15:42:11 +0000 (10:42 -0500)] 
catch another overlong malloc possibility. found by cypherpunks

14 years agoMake our replacement INT32_MAX always signed
Nick Mathewson [Wed, 12 Jan 2011 19:29:38 +0000 (14:29 -0500)] 
Make our replacement INT32_MAX always signed

The C standard says that INT32_MAX is supposed to be a signed
integer.  On platforms that have it, we get the correct
platform-defined value.  Our own replacement, however, was
unsigned.  That's going to cause a bug somewhere eventually.

14 years agoAlways nul-terminate the result passed to evdns_server_add_ptr_reply
Nick Mathewson [Mon, 10 Jan 2011 21:18:32 +0000 (16:18 -0500)] 
Always nul-terminate the result passed to evdns_server_add_ptr_reply

In dnsserv_resolved(), we carefully made a nul-terminated copy of the
answer in a PTR RESOLVED cell... then never used that nul-terminated
copy.  Ouch.

Surprisingly this one isn't as huge a security problem as it could be.
The only place where the input to dnsserv_resolved wasn't necessarily
nul-terminated was when it was called indirectly from relay.c with the
contents of a relay cell's payload.  If the end of the payload was
filled with junk, eventdns.c would take the strdup() of the name [This
part is bad; we might crash there if the cell is in a bad part of the
stack or the heap] and get a name of at least length
495[*]. eventdns.c then rejects any name of length over 255, so the
bogus data would be neither transmitted nor altered.

  [*] If the name was less than 495 bytes long, the client wouldn't
     actually be reading off the end of the cell.

Nonetheless this is a reasonably annoying bug.  Better fix it.

Found while looking at bug 2332, reported by doorss.  Bugfix on
0.2.0.1-alpha.

14 years agoImpose maximum sizes on parsed objects
Nick Mathewson [Mon, 10 Jan 2011 17:12:11 +0000 (12:12 -0500)] 
Impose maximum sizes on parsed objects

An object, you'll recall, is something between -----BEGIN----- and
-----END----- tags in a directory document.  Some of our code, as
doorss has noted in bug 2352, could assert if one of these ever
overflowed SIZE_T_CEILING but not INT_MAX.  As a solution, I'm setting
a maximum size on a single object such that neither of these limits
will ever be hit.  I'm also fixing the INT_MAX checks, just to be sure.

14 years agoAdd logic in routerparse to not read overlong private keys
Nick Mathewson [Mon, 10 Jan 2011 17:07:34 +0000 (12:07 -0500)] 
Add logic in routerparse to not read overlong private keys

I am not at all sure that it is possible to trigger a bug here,
but better safe than sorry.

14 years agoUpdate to the January 1 2011 Maxmind GeoLite Country database.
Karsten Loesing [Mon, 10 Jan 2011 09:37:54 +0000 (10:37 +0100)] 
Update to the January 1 2011 Maxmind GeoLite Country database.

14 years agoRemove a loud info log message
Nick Mathewson [Sat, 8 Jan 2011 03:03:22 +0000 (22:03 -0500)] 
Remove a loud info log message

14 years agoCorrectly detect and exclude addresses outside of our virtual address range
Nick Mathewson [Fri, 7 Jan 2011 17:18:37 +0000 (12:18 -0500)] 
Correctly detect and exclude addresses outside of our virtual address range

Found by cypherpunks; fixes more of 2328.  Bug was introduced in 3623a122;
first appeared in 0.2.0.5-alpha.

14 years agoMerge branch 'bug2328_021' into maint-0.2.1
Nick Mathewson [Thu, 6 Jan 2011 18:36:29 +0000 (13:36 -0500)] 
Merge branch 'bug2328_021' into maint-0.2.1