]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
9 years agoChanges file for bug19973
Nick Mathewson [Wed, 24 Aug 2016 14:34:00 +0000 (10:34 -0400)] 
Changes file for bug19973

9 years agoFix path selection on firewalled clients
teor [Thu, 18 Aug 2016 02:02:33 +0000 (12:02 +1000)] 
Fix path selection on firewalled clients

Signed-off-by: teor <teor2345@gmail.com>
9 years agoMerge branch 'maint-0.2.7' into maint-0.2.8
Nick Mathewson [Wed, 24 Aug 2016 14:02:52 +0000 (10:02 -0400)] 
Merge branch 'maint-0.2.7' into maint-0.2.8

9 years agoChanges file for bifroest
Nick Mathewson [Wed, 24 Aug 2016 14:02:42 +0000 (10:02 -0400)] 
Changes file  for bifroest

9 years agoReplace Tonga with Bifroest.
Isis Lovecruft [Tue, 23 Aug 2016 14:39:40 +0000 (14:39 +0000)] 
Replace Tonga with Bifroest.

 * FIXES #19728: https://bugs.torproject.org/19728
 * CLOSES #19690: https://bugs.torproject.org/19690

9 years agoDo not pass NULL to log(%s) in dir_server_new.
Nick Mathewson [Mon, 22 Aug 2016 05:22:19 +0000 (01:22 -0400)] 
Do not pass NULL to log(%s) in dir_server_new.

This bug had existed since 0.2.4.7-alpha, but now that we have
FallbackDirs by default, it actually matters.

Fixes bug 19947; bugfix on 0.2.4.7-alpha or maybe 0.2.8.1-alpha.

Rubiate wrote the patch; teor wrote the changes file.

9 years agoMerge branch 'bug19903_028_v2' into maint-0.2.8
Nick Mathewson [Fri, 19 Aug 2016 23:35:26 +0000 (19:35 -0400)] 
Merge branch 'bug19903_028_v2' into maint-0.2.8

9 years agoAvoid confusing GCC 4.2.1 by saying "int foo()... inline int foo() {...}"
Nick Mathewson [Fri, 12 Aug 2016 00:29:37 +0000 (20:29 -0400)] 
Avoid confusing GCC 4.2.1 by saying "int foo()... inline int foo() {...}"

Fixes bug 19903; bugfix on 0.2.8.1-alpha.

9 years agoMerge branch 'maint-0.2.7' into maint-0.2.8
Nick Mathewson [Fri, 12 Aug 2016 14:27:14 +0000 (10:27 -0400)] 
Merge branch 'maint-0.2.7' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.6' into maint-0.2.7
Nick Mathewson [Fri, 12 Aug 2016 14:27:08 +0000 (10:27 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7

9 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Fri, 12 Aug 2016 14:27:01 +0000 (10:27 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

9 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Fri, 12 Aug 2016 14:26:48 +0000 (10:26 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

9 years agoUpdate geoip and geoip6 to the August 2 2016 database.
Karsten Loesing [Fri, 12 Aug 2016 09:53:38 +0000 (11:53 +0200)] 
Update geoip and geoip6 to the August 2 2016 database.

9 years agobump maint-0.2.8 to 0.2.8.6-dev
Nick Mathewson [Tue, 2 Aug 2016 15:13:44 +0000 (11:13 -0400)] 
bump maint-0.2.8 to 0.2.8.6-dev

9 years agobump to 0.2.8.6
Nick Mathewson [Fri, 29 Jul 2016 15:17:28 +0000 (11:17 -0400)] 
bump to 0.2.8.6

9 years agoRemove a fallback that was on the hardcoded list, then opted-out
teor (Tim Wilson-Brown) [Fri, 29 Jul 2016 00:00:49 +0000 (10:00 +1000)] 
Remove a fallback that was on the hardcoded list, then opted-out

The fallback was added in 0.2.8.2-alpha.

9 years agoCoverity hates it when we do "E1 ? E2 : E2".
Nick Mathewson [Thu, 21 Jul 2016 12:14:33 +0000 (14:14 +0200)] 
Coverity hates it when we do "E1 ? E2 : E2".

It says, 'Incorrect expression (IDENTICAL_BRANCHES)'

Fix for CID 1364127. Not in any released Tor.

9 years agoMerge branch 'maint-0.2.7' into maint-0.2.8
Nick Mathewson [Tue, 19 Jul 2016 10:34:27 +0000 (12:34 +0200)] 
Merge branch 'maint-0.2.7' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.6' into maint-0.2.7
Nick Mathewson [Tue, 19 Jul 2016 10:32:14 +0000 (12:32 +0200)] 
Merge branch 'maint-0.2.6' into maint-0.2.7

9 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Tue, 19 Jul 2016 10:31:54 +0000 (12:31 +0200)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

9 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Tue, 19 Jul 2016 10:31:20 +0000 (12:31 +0200)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

9 years agoUpdate geoip and geoip6 to the July 6 2016 database.
Karsten Loesing [Mon, 18 Jul 2016 06:39:23 +0000 (08:39 +0200)] 
Update geoip and geoip6 to the July 6 2016 database.

9 years agoMerge remote-tracking branch 'weasel/bug19660' into maint-0.2.8
Nick Mathewson [Sun, 17 Jul 2016 17:54:40 +0000 (13:54 -0400)] 
Merge remote-tracking branch 'weasel/bug19660' into maint-0.2.8

9 years agoFix warnings in test_util_formats.
Nick Mathewson [Sun, 17 Jul 2016 17:51:45 +0000 (13:51 -0400)] 
Fix warnings in test_util_formats.

Storing 255 into a char gives a warning when char is signed.

Fixes bug 19682; bugfix on 0.2.8.1-alpha, where these tests were added.

9 years agochanges file for bug18397
Nick Mathewson [Wed, 13 Jul 2016 13:19:23 +0000 (09:19 -0400)] 
changes file for bug18397

9 years agoMerge remote-tracking branch 'Jigsaw52/seccomp-fix-18397' into maint-0.2.8
Nick Mathewson [Wed, 13 Jul 2016 13:16:59 +0000 (09:16 -0400)] 
Merge remote-tracking branch 'Jigsaw52/seccomp-fix-18397' into maint-0.2.8

9 years agoAdd (SOCK_DGRAM, IPPROTO_UDP) sockets to the sandboxing whitelist
Peter Palfrader [Mon, 11 Jul 2016 07:37:01 +0000 (09:37 +0200)] 
Add (SOCK_DGRAM, IPPROTO_UDP) sockets to the sandboxing whitelist

If we did not find a non-private IPaddress by iterating over interfaces,
we would try to get one via
get_interface_address6_via_udp_socket_hack().  This opens a datagram
socket with IPPROTO_UDP.  Previously all our datagram sockets (via
libevent) used IPPROTO_IP, so we did not have that in the sandboxing
whitelist.  Add (SOCK_DGRAM, IPPROTO_UDP) sockets to the sandboxing
whitelist.  Fixes bug 19660.

9 years agoAdds missing syscalls to seccomp filter.
Daniel Pinto [Fri, 8 Jul 2016 23:36:37 +0000 (00:36 +0100)] 
Adds missing syscalls to seccomp filter.

Fixes #18397 which prevented tor starting with Sandbox 1.

9 years agoBump maint-0.2.8 to 0.2.8.5-rc-dev
Nick Mathewson [Thu, 7 Jul 2016 16:43:52 +0000 (12:43 -0400)] 
Bump maint-0.2.8 to 0.2.8.5-rc-dev

9 years agoWhen checking if a routerstatus is reachable, don't check the node
teor (Tim Wilson-Brown) [Wed, 6 Jul 2016 04:35:01 +0000 (14:35 +1000)] 
When checking if a routerstatus is reachable, don't check the node

This fixes #19608, allowing IPv6-only clients to use
microdescriptors, while preserving the ability of bridge clients
to have some IPv4 bridges and some IPv6 bridges.

Fix on c281c036 in 0.2.8.2-alpha.

9 years agoMerge branch 'maint-0.2.7' into maint-0.2.8
Nick Mathewson [Tue, 5 Jul 2016 17:52:18 +0000 (13:52 -0400)] 
Merge branch 'maint-0.2.7' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.6' into maint-0.2.7
Nick Mathewson [Tue, 5 Jul 2016 17:52:04 +0000 (13:52 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7

9 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Tue, 5 Jul 2016 17:51:51 +0000 (13:51 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

9 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Tue, 5 Jul 2016 17:51:34 +0000 (13:51 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

9 years agowhoops. changelog file for 19271.
Nick Mathewson [Tue, 5 Jul 2016 17:51:21 +0000 (13:51 -0400)] 
whoops. changelog file for 19271.

9 years agoUpdate version to 0.2.8.5-rc. This is not yet a release.
Nick Mathewson [Tue, 5 Jul 2016 17:05:36 +0000 (13:05 -0400)] 
Update version to 0.2.8.5-rc. This is not yet a release.

9 years agoAppease lint-changes script.
Nick Mathewson [Tue, 5 Jul 2016 16:57:43 +0000 (12:57 -0400)] 
Appease lint-changes script.

9 years agoRepair unit test that assumed we have 9 dirauths.
Nick Mathewson [Tue, 5 Jul 2016 16:52:19 +0000 (12:52 -0400)] 
Repair unit test that assumed we have 9 dirauths.

9 years agoMerge remote-tracking branch 'weasel/bug19557' into maint-0.2.8
Nick Mathewson [Tue, 5 Jul 2016 16:40:25 +0000 (12:40 -0400)] 
Merge remote-tracking branch 'weasel/bug19557' into maint-0.2.8

9 years agoMerge remote-tracking branch 'weasel/bug19556' into maint-0.2.8
Nick Mathewson [Tue, 5 Jul 2016 16:39:40 +0000 (12:39 -0400)] 
Merge remote-tracking branch 'weasel/bug19556' into maint-0.2.8

9 years agoRun asciidoc in UTC timezone for build reproducibility.
intrigeri [Sun, 3 Jul 2016 18:44:13 +0000 (18:44 +0000)] 
Run asciidoc in UTC timezone for build reproducibility.

asciidoc adds a timestamp at the end of a generated HTML file.
This timestamp is based on the date of the file but it can change
depending on the TZ environment variable.

9 years agoMerge branch 'maint-0.2.7' into maint-0.2.8
Nick Mathewson [Tue, 5 Jul 2016 16:23:14 +0000 (12:23 -0400)] 
Merge branch 'maint-0.2.7' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.6' into maint-0.2.7
Nick Mathewson [Tue, 5 Jul 2016 16:22:47 +0000 (12:22 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7

9 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Tue, 5 Jul 2016 16:21:25 +0000 (12:21 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

9 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Tue, 5 Jul 2016 16:20:42 +0000 (12:20 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

9 years agoRemove urras as a default trusted directory authority
Sebastian Hahn [Sun, 3 Jul 2016 19:56:39 +0000 (21:56 +0200)] 
Remove urras as a default trusted directory authority

It had been a directory authority since 0.2.1.20.

9 years agosandboxing: allow writing to stats/hidserv-stats
Peter Palfrader [Sun, 3 Jul 2016 16:03:26 +0000 (18:03 +0200)] 
sandboxing: allow writing to stats/hidserv-stats

Our sandboxing code would not allow us to write to stats/hidserv-stats,
causing tor to abort while trying to write stats.  This was previously
masked by bug#19556.

9 years agoNote which bug this fixes in the changes entry
Peter Palfrader [Sun, 3 Jul 2016 16:04:33 +0000 (18:04 +0200)] 
Note which bug this fixes in the changes entry

9 years agosandboxing: allow open() of stats dir
Peter Palfrader [Sun, 3 Jul 2016 15:47:45 +0000 (17:47 +0200)] 
sandboxing: allow open() of stats dir

When sandboxing is enabled, we could not write any stats to disk.
check_or_create_data_subdir("stats"), which prepares the private stats
directory, calls check_private_dir(), which also opens and not just stats() the
directory.  Therefore, we need to also allow open() for the stats dir in our
sandboxing setup.

9 years agoWhen tor can't find a directory, log less
teor (Tim Wilson-Brown) [Fri, 1 Jul 2016 04:26:00 +0000 (14:26 +1000)] 
When tor can't find a directory, log less

9 years agoMerge branch 'bug19071-extra-squashed' into maint-0.2.8
Nick Mathewson [Tue, 28 Jun 2016 23:15:20 +0000 (19:15 -0400)] 
Merge branch 'bug19071-extra-squashed' into maint-0.2.8

9 years agoComment-out fallbacks in a way the stem fallback parser understands
teor (Tim Wilson-Brown) [Thu, 23 Jun 2016 00:49:03 +0000 (10:49 +1000)] 
Comment-out fallbacks in a way the stem fallback parser understands

If we manually remove fallbacks in C by adding '/*' and '*/' on separate
lines, stem still parses them as being present, because it only looks at
the start of a line.

Add a comment to this effect in the generated source code.

9 years agowhitespace fixes
Nick Mathewson [Tue, 28 Jun 2016 15:14:42 +0000 (11:14 -0400)] 
whitespace fixes

9 years agoMerge remote-tracking branch 'teor/bug18812' into maint-0.2.8
Nick Mathewson [Tue, 28 Jun 2016 15:12:51 +0000 (11:12 -0400)] 
Merge remote-tracking branch 'teor/bug18812' into maint-0.2.8

9 years agoResolve bug18812 by logging fallback key changes at info level
teor (Tim Wilson-Brown) [Tue, 28 Jun 2016 04:15:11 +0000 (14:15 +1000)] 
Resolve bug18812 by logging fallback key changes at info level

9 years agoMake it clear that fallbacks include authorities
teor (Tim Wilson-Brown) [Tue, 28 Jun 2016 04:14:04 +0000 (14:14 +1000)] 
Make it clear that fallbacks include authorities

Comment-only change

9 years agoRefactor connection_or_client_learned_peer_id for bug18812
teor (Tim Wilson-Brown) [Tue, 28 Jun 2016 04:12:18 +0000 (14:12 +1000)] 
Refactor connection_or_client_learned_peer_id for bug18812

No behavioural change.
Also clarify some comments.

9 years agoBug19499: Fix GCC warnings when building against bleeding edge OpenSSL.
Yawning Angel [Fri, 24 Jun 2016 22:20:41 +0000 (22:20 +0000)] 
Bug19499: Fix GCC warnings when building against bleeding edge OpenSSL.

The previous version of the new accessors didn't specify const but it
was changed in master.

9 years agoWhitelist a fallback's new IPv6 address
teor (Tim Wilson-Brown) [Thu, 23 Jun 2016 00:38:52 +0000 (10:38 +1000)] 
Whitelist a fallback's new IPv6 address

The IPv4-only entry will be used for 0.2.8.
The IPv4 and IPv6 entry will be considered in 0.2.9.

9 years agoRemove a fallback that changed DirPort
teor (Tim Wilson-Brown) [Thu, 23 Jun 2016 00:38:03 +0000 (10:38 +1000)] 
Remove a fallback that changed DirPort

The operator has confirmed that the DirPort change is perament.
The relay will be reconsidered as a fallback in 0.2.9.

9 years agoChanges file for 19071 and 19480
teor (Tim Wilson-Brown) [Wed, 22 Jun 2016 02:37:59 +0000 (12:37 +1000)] 
Changes file for 19071 and 19480

9 years agoRemove and blacklist 3 fallbacks which disappeared
teor (Tim Wilson-Brown) [Wed, 22 Jun 2016 02:09:32 +0000 (12:09 +1000)] 
Remove and blacklist 3 fallbacks which disappeared

Blacklist them in case they appear again.

9 years agoRemove 2 fallbacks: one lost guard, the other had bad uptime
teor (Tim Wilson-Brown) [Wed, 22 Jun 2016 01:33:00 +0000 (11:33 +1000)] 
Remove 2 fallbacks: one lost guard, the other had bad uptime

Leave these fallbacks in the whitelist, they may improve before 0.2.9.

9 years agoRemove and blacklist 4 fallbacks which are unsuitable
teor (Tim Wilson-Brown) [Tue, 21 Jun 2016 23:59:05 +0000 (09:59 +1000)] 
Remove and blacklist 4 fallbacks which are unsuitable

Remove a fallback that changed its fingerprint after it was listed
This happened after to a software update:
https://lists.torproject.org/pipermail/tor-relays/2016-June/009473.html

Remove a fallback that changed IPv4 address

Remove two fallbacks that were slow to deliver consensuses,
we can't guarantee they'll be fast in future.

Blacklist all these fallbacks until operators confirm they're stable.

9 years agoUpdate the fallback whitelist and blacklist
teor (Tim Wilson-Brown) [Thu, 28 Apr 2016 11:37:19 +0000 (21:37 +1000)] 
Update the fallback whitelist and blacklist

Operators have sent emails asking to have their relays added or
removed from the fallback list. Since none of the blacklisted
relays are in the hard-coded falback list, it does not need to
be changed.

9 years agoAvoid errors in updateFallbackDirs.py when there are no fallbacks
teor (Tim Wilson-Brown) [Wed, 22 Jun 2016 01:04:54 +0000 (11:04 +1000)] 
Avoid errors in updateFallbackDirs.py when there are no fallbacks

9 years agoDocument how to test the hard-coded fallback list
teor (Tim Wilson-Brown) [Tue, 21 Jun 2016 23:16:29 +0000 (09:16 +1000)] 
Document how to test the hard-coded fallback list

9 years agoRemove useless message about nonexistent onion services after uploading a descriptor
Ivan Markin [Mon, 20 Jun 2016 19:29:27 +0000 (19:29 +0000)] 
Remove useless message about nonexistent onion services after uploading a descriptor

9 years agoFix bug when disabling heartbeats.
George Kadianakis [Tue, 21 Jun 2016 12:05:59 +0000 (15:05 +0300)] 
Fix bug when disabling heartbeats.

Callbacks can't return 0.

9 years agoBump to 0.2.8.4-rc-dev
Nick Mathewson [Wed, 15 Jun 2016 16:55:17 +0000 (12:55 -0400)] 
Bump to 0.2.8.4-rc-dev

9 years agobump version to 0.2.8.4-rc
Nick Mathewson [Wed, 15 Jun 2016 00:36:35 +0000 (20:36 -0400)] 
bump version to 0.2.8.4-rc

9 years agoResolve the remaining openssl "-Wredundant-decls" warnings.
Nick Mathewson [Wed, 15 Jun 2016 00:14:53 +0000 (20:14 -0400)] 
Resolve the remaining openssl "-Wredundant-decls" warnings.

Another part of 19406

9 years agoSuppress the Wredundant-decls warning in another set of openssl headers
Nick Mathewson [Tue, 14 Jun 2016 16:17:02 +0000 (12:17 -0400)] 
Suppress the Wredundant-decls warning in another set of openssl headers

9 years agoBug 19406: Add a changes file.
Yawning Angel [Tue, 14 Jun 2016 06:37:03 +0000 (06:37 +0000)] 
Bug 19406: Add a changes file.

9 years agoBug 19406: Fix the unit tests to work with OpenSSL 1.1.x
Yawning Angel [Tue, 14 Jun 2016 06:24:13 +0000 (06:24 +0000)] 
Bug 19406: Fix the unit tests to work with OpenSSL 1.1.x

Just as it says on the tin.  Don't need to fully disable any tests and
reduce coverage either.  Yay me.

9 years agoBug 19406: OpenSSL removed SSL_R_RECORD_TOO_LARGE in 1.1.0.
Yawning Angel [Tue, 14 Jun 2016 06:22:19 +0000 (06:22 +0000)] 
Bug 19406: OpenSSL removed SSL_R_RECORD_TOO_LARGE in 1.1.0.

This is a logging onlu change, we were suppressing the severity down to
INFO when it occured (treating it as "Mostly harmless").  Now it is no
more.

9 years agoBug 19406: OpenSSL made RSA and DH opaque in 1.1.0.
Yawning Angel [Tue, 14 Jun 2016 06:14:28 +0000 (06:14 +0000)] 
Bug 19406: OpenSSL made RSA and DH opaque in 1.1.0.

There's accessors to get at things, but it ends up being rather
cumbersome.  The only place where behavior should change is that the
code will fail instead of attempting to generate a new DH key if our
internal sanity check fails.

Like the previous commit, this probably breaks snapshots prior to pre5.

9 years agoBug 19406: OpenSSL changed the Thread API in 1.1.0 again.
Yawning Angel [Tue, 14 Jun 2016 04:40:36 +0000 (04:40 +0000)] 
Bug 19406: OpenSSL changed the Thread API in 1.1.0 again.

Instead of `ERR_remove_thread_state()` having a modified prototype, it
now has the old prototype and a deprecation annotation.  Since it's
pointless to add extra complexity just to remain compatible with an old
OpenSSL development snapshot, update the code to work with 1.1.0pre5
and later.

9 years agolintChanges fixes
Nick Mathewson [Mon, 13 Jun 2016 17:57:03 +0000 (13:57 -0400)] 
lintChanges fixes

9 years agoMerge branch 'maint-0.2.7' into maint-0.2.8
Nick Mathewson [Mon, 13 Jun 2016 14:49:05 +0000 (10:49 -0400)] 
Merge branch 'maint-0.2.7' into maint-0.2.8

9 years agoMerge branch 'maint-0.2.6' into maint-0.2.7
Nick Mathewson [Mon, 13 Jun 2016 14:48:56 +0000 (10:48 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7

9 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Mon, 13 Jun 2016 14:48:48 +0000 (10:48 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

9 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Mon, 13 Jun 2016 14:48:35 +0000 (10:48 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

9 years agoUpdate geoip and geoip6 to the June 7 2016 database.
Karsten Loesing [Sun, 12 Jun 2016 09:35:50 +0000 (11:35 +0200)] 
Update geoip and geoip6 to the June 7 2016 database.

9 years agoMerge remote-tracking branch 'public/bug19203_027' into maint-0.2.8
Nick Mathewson [Sat, 11 Jun 2016 14:16:00 +0000 (10:16 -0400)] 
Merge remote-tracking branch 'public/bug19203_027' into maint-0.2.8

9 years agoUse directory_must_use_begindir to predict we'll surely use begindir
Nick Mathewson [Thu, 2 Jun 2016 14:40:39 +0000 (10:40 -0400)] 
Use directory_must_use_begindir to predict we'll surely use begindir

Previously, we used !directory_fetches_from_authorities() to predict
that we would tunnel connections.  But the rules have changed
somewhat over the course of 0.2.8

9 years agoMerge branch 'maint-0.2.7' into maint-0.2.8
Nick Mathewson [Thu, 2 Jun 2016 14:12:56 +0000 (10:12 -0400)] 
Merge branch 'maint-0.2.7' into maint-0.2.8

9 years agoUse tor_sscanf, not sscanf, in test_util.c.
Nick Mathewson [Thu, 2 Jun 2016 14:11:29 +0000 (10:11 -0400)] 
Use tor_sscanf, not sscanf, in test_util.c.

Fixes the 0.2.7 case of bug #19213, which prevented mingw64 from
working.

9 years agoFix a warning on unnamed nodes in node_get_by_nickname().
Nick Mathewson [Mon, 30 May 2016 16:03:03 +0000 (12:03 -0400)] 
Fix a warning on unnamed nodes in node_get_by_nickname().

There was a > that should have been an ==, and a missing !.  These
together prevented us from issuing a warning in the case that a
nickname matched an Unnamed node only.

Fixes bug 19203; bugfix on 0.2.3.1-alpha.

9 years agoBump to 0.2.8.3-alpha-dev
Nick Mathewson [Fri, 27 May 2016 01:09:01 +0000 (21:09 -0400)] 
Bump to 0.2.8.3-alpha-dev

9 years agoBump to 0.2.8.3-alpha
Nick Mathewson [Thu, 26 May 2016 16:12:38 +0000 (12:12 -0400)] 
Bump to 0.2.8.3-alpha

9 years agoFix two long lines
Nick Mathewson [Thu, 26 May 2016 16:11:57 +0000 (12:11 -0400)] 
Fix two long lines

9 years agoMerge branch 'bug18668_028' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 20:58:43 +0000 (16:58 -0400)] 
Merge branch 'bug18668_028' into maint-0.2.8

9 years agoMerge branch 'bug19175_028_v2' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 20:12:01 +0000 (16:12 -0400)] 
Merge branch 'bug19175_028_v2' into maint-0.2.8

9 years agoFix a double-free bug in routerlist_reparse_old
Nick Mathewson [Wed, 25 May 2016 15:52:52 +0000 (11:52 -0400)] 
Fix a double-free bug in routerlist_reparse_old

I introduced this bug when I moved signing_key_cert into
signed_descriptor_t. Bug not in any released Tor.  Fixes bug 19175, and
another case of 19128.

Just like signed_descriptor_from_routerinfo(), routerlist_reparse_old()
copies the fields from one signed_descriptor_t to another, and then
clears the fields from the original that would have been double-freed by
freeing the original.  But when I fixed the s_d_f_r() bug [#19128] in
50cbf220994c7cec593, I missed the fact that the code was duplicated in
r_p_o().

Duplicated code strikes again!

For a longer-term solution here, I am not only adding the missing fix to
r_p_o(): I am also extracting the duplicated code into a new function.

Many thanks to toralf for patiently sending me stack traces until
one made sense.

9 years agoMerge branch 'bug19161_028_v2' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 14:17:26 +0000 (10:17 -0400)] 
Merge branch 'bug19161_028_v2' into maint-0.2.8

9 years agoMerge branch 'bug19152_024_v2' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 13:26:45 +0000 (09:26 -0400)] 
Merge branch 'bug19152_024_v2' into maint-0.2.8

9 years agoFix a dangling pointer issue in our RSA keygen code
Nick Mathewson [Fri, 20 May 2016 17:58:52 +0000 (13:58 -0400)] 
Fix a dangling pointer issue in our RSA keygen code

If OpenSSL fails to generate an RSA key, do not retain a dangling
pointer to the previous (uninitialized) key value. The impact here
should be limited to a difficult-to-trigger crash, if OpenSSL is
running an engine that makes key generation failures possible, or if
OpenSSL runs out of memory. Fixes bug 19152; bugfix on
0.2.1.10-alpha. Found by Yuan Jochen Kang, Suman Jana, and Baishakhi
Ray.

This is potentially scary stuff, so let me walk through my analysis.
I think this is a bug, and a backport candidate, but not remotely
triggerable in any useful way.

Observation 1a:

Looking over the OpenSSL code here, the only way we can really fail in
the non-engine case is if malloc() fails.  But if malloc() is failing,
then tor_malloc() calls should be tor_asserting -- the only way that an
attacker could do an exploit here would be to figure out some way to
make malloc() fail when openssl does it, but work whenever Tor does it.

(Also ordinary malloc() doesn't fail on platforms like Linux that
overcommit.)

Observation 1b:

Although engines are _allowed_ to fail in extra ways, I can't find much
evidence online  that they actually _do_ fail in practice. More evidence
would be nice, though.

Observation 2:

We don't call crypto_pk_generate*() all that often, and we don't do it
in response to external inputs. The only way to get it to happen
remotely would be by causing a hidden service to build new introduction
points.

Observation 3a:

So, let's assume that both of the above observations are wrong, and the
attacker can make us generate a crypto_pk_env_t with a dangling pointer
in its 'key' field, and not immediately crash.

This dangling pointer will point to what used to be an RSA structure,
with the fields all set to NULL.  Actually using this RSA structure,
before the memory is reused for anything else, will cause a crash.

In nearly every function where we call crypto_pk_generate*(), we quickly
use the RSA key pointer -- either to sign something, or to encode the
key, or to free the key.  The only exception is when we generate an
intro key in rend_consider_services_intro_points().  In that case, we
don't actually use the key until the intro circuit is opened -- at which
point we encode it, and use it to sign an introduction request.

So in order to exploit this bug to do anything besides crash Tor, the
attacker needs to make sure that by the time the introduction circuit
completes, either:
  * the e, d, and n BNs look valid, and at least one of the other BNs is
    still NULL.
OR
  * all 8 of the BNs must look valid.

To look like a valid BN, *they* all need to have their 'top' index plus
their 'd' pointer indicate an addressable region in memory.

So actually getting useful data of of this, rather than a crash, is
going to be pretty damn hard.  You'd have to force an introduction point
to be created (or wait for one to be created), and force that particular
crypto_pk_generate*() to fail, and then arrange for the memory that the
RSA points to to in turn point to 3...8 valid BNs, all by the time the
introduction circuit completes.

Naturally, the signature won't check as valid [*], so the intro point
will reject the ESTABLISH_INTRO cell.  So you need to _be_ the
introduction point, or you don't actually see this information.

[*] Okay, so if you could somehow make the 'rsa' pointer point to a
different valid RSA key, then you'd get a valid signature of an
ESTABLISH_INTRO cell using a key that was supposed to be used for
something else ... but nothing else looks like that, so you can't use
that signature elsewhere.

Observation 3b:

Your best bet as an attacker would be to make the dangling RSA pointer
actually contain a fake method, with a fake RSA_private_encrypt
function that actually pointed to code you wanted to execute.  You'd
still need to transit 3 or 4 pointers deep though in order to make that
work.

Conclusion:

By 1, you probably can't trigger this without Tor crashing from OOM.

By 2, you probably can't trigger this reliably.

By 3, even if I'm wrong about 1 and 2, you have to jump through a pretty
big array of hoops in order to get any kind of data leak or code
execution.

So I'm calling it a bug, but not a security hole. Still worth
patching.

9 years agoMerge branch 'memarea_overflow_027_squashed' into maint-0.2.8
Nick Mathewson [Wed, 25 May 2016 13:22:02 +0000 (09:22 -0400)] 
Merge branch 'memarea_overflow_027_squashed' into maint-0.2.8

9 years agoFix a pointer arithmetic bug in memarea_alloc()
Nick Mathewson [Thu, 19 May 2016 14:52:27 +0000 (10:52 -0400)] 
Fix a pointer arithmetic bug in memarea_alloc()

Fortunately, the arithmetic cannot actually overflow, so long as we
*always* check for the size of potentially hostile input before
copying it.  I think we do, though.  We do check each line against
MAX_LINE_LENGTH, and each object name or object against
MAX_UNPARSED_OBJECT_SIZE, both of which are 128k.  So to get this
overflow, we need to have our memarea allocated way way too high up
in RAM, which most allocators won't actually do.

Bugfix on 0.2.1.1-alpha, where memarea was introduced.

Found by Guido Vranken.