]>
git.ipfire.org Git - thirdparty/tor.git/log
Nick Mathewson [Mon, 29 Sep 2014 13:18:03 +0000 (09:18 -0400)]
Merge branch 'bug12971_take2_squashed'
Nick Mathewson [Mon, 29 Sep 2014 13:17:20 +0000 (09:17 -0400)]
Rename socks5 error code setting function again
I'd prefer not to use the name "send" for any function that doesn't
really send things.
rl1987 [Sun, 21 Sep 2014 16:17:44 +0000 (19:17 +0300)]
Respond with 'Command not supported' SOCKS5 reply message upon reception of unsupported request.
Nick Mathewson [Mon, 29 Sep 2014 13:05:18 +0000 (09:05 -0400)]
Merge branch 'ticket961_squashed'
Nick Mathewson [Tue, 23 Sep 2014 12:57:22 +0000 (08:57 -0400)]
Changes file for ticket 961
Nick Mathewson [Tue, 23 Sep 2014 12:46:35 +0000 (08:46 -0400)]
Avoid frequent strcmp() calls for AccountingRule
Generally, we don't like to parse the same thing over and over; it's
best IMO to do it once at the start of the code.
Nick Mathewson [Tue, 23 Sep 2014 12:34:22 +0000 (08:34 -0400)]
Add an "AccountingRule" feature to permit limiting bw usage by read+write
Patch from "chobe". Closes ticket 961.
Nick Mathewson [Mon, 29 Sep 2014 12:57:19 +0000 (08:57 -0400)]
Merge remote-tracking branch 'yawning/bug13213'
Nick Mathewson [Mon, 29 Sep 2014 12:55:17 +0000 (08:55 -0400)]
Merge remote-tracking branch 'rl1987/bug13228'
Nick Mathewson [Mon, 29 Sep 2014 12:48:22 +0000 (08:48 -0400)]
Whitespace fixes
teor [Mon, 29 Sep 2014 02:06:15 +0000 (12:06 +1000)]
Stop test & bench build failures with --disable-curve25519
Ensure test & bench code that references curve25519 is disabled by the
appropriate macros. tor now builds with and without --disable-curve25519.
Nick Mathewson [Mon, 29 Sep 2014 01:01:14 +0000 (21:01 -0400)]
Merge branch 'bug13280'
teor [Mon, 29 Sep 2014 00:08:37 +0000 (10:08 +1000)]
Stop spurious clang shallow analysis null pointer errors
Avoid 4 null pointer errors under clang shallow analysis (the default when
building under Xcode) by using tor_assert() to prove that the pointers
aren't null. Resolves issue 13284 via minor code refactoring.
teor [Mon, 29 Sep 2014 00:44:00 +0000 (20:44 -0400)]
Stop
ed25519 8-bit signed left shift overflowing
Standardise usage in ge_scalarmult_base.c for 1 new fix.
Nick Mathewson [Mon, 29 Sep 2014 00:39:09 +0000 (20:39 -0400)]
Use SHL{8,32,64} in
ed25519 /ref10 to avoid left-shifting negative values
This helps us avoid undefined behavior. It's based on a patch from teor,
except that I wrote a perl script to regenerate the patch:
#!/usr/bin/perl -p -w -i
BEGIN { %vartypes = (); }
if (/^[{}]/) {
%vartypes = ();
}
if (/^ *crypto_int(\d+) +([a-zA-Z_][_a-zA-Z0-9]*)/) {
$vartypes{$2} = $1;
} elsif (/^ *(?:signed +)char +([a-zA-Z_][_a-zA-Z0-9]*)/) {
$vartypes{$1} = '8';
}
# This fixes at most one shift per line. But that's all the code does.
if (/([a-zA-Z_][a-zA-Z_0-9]*) *<< *(\d+)/) {
$v = $1;
if (exists $vartypes{$v}) {
s/$v *<< *(\d+)/SHL$vartypes{$v}($v,$1)/;
}
}
# remove extra parenthesis
s/\(SHL64\((.*)\)\)/SHL64\($1\)/;
s/\(SHL32\((.*)\)\)/SHL32\($1\)/;
s/\(SHL8\((.*)\)\)/SHL8\($1\)/;
teor [Mon, 29 Sep 2014 00:34:21 +0000 (20:34 -0400)]
Stop signed left shifts overflowing in
ed25519 : Macros
The macros let us use unsigned types for potentially overflowing left
shifts. Create SHL32() and SHL64() and SHL8() macros for convenience.
rl1987 [Sun, 28 Sep 2014 15:09:25 +0000 (18:09 +0300)]
Improving error message.
Nick Mathewson [Fri, 26 Sep 2014 15:06:41 +0000 (11:06 -0400)]
Merge remote-tracking branch 'public/require_some_c99'
Nick Mathewson [Fri, 26 Sep 2014 13:40:30 +0000 (09:40 -0400)]
Avoid a "constant variable guards dead code" warning from coverity
Fixes CID 752028
Nick Mathewson [Fri, 26 Sep 2014 13:33:24 +0000 (09:33 -0400)]
Regenerate pwbox.c with the latest trunnel
This one should no longer generate dead-code warnings with coverity.
Fingers crossed? This was CID
1241498
Nick Mathewson [Fri, 26 Sep 2014 13:07:44 +0000 (09:07 -0400)]
Comment-out dead code in
ed25519 /ref10
There are some loops of the form
for (i=1;i<1;++i) ...
And of course, if the loop index is initialized to 1, it will never
be less than 1, and the loop body will never be executed. This
upsets coverity.
Patch fixes CID
1221543 and
1221542
Nick Mathewson [Fri, 26 Sep 2014 13:06:36 +0000 (09:06 -0400)]
Check key_len in secret_to_key_new()
This bug shouldn't be reachable so long as secret_to_key_len and
secret_to_key_make_specifier stay in sync, but we might screw up
someday.
Found by coverity; this is CID
1241500
Nick Mathewson [Thu, 18 Sep 2014 15:13:57 +0000 (11:13 -0400)]
Fix a double-free in failing case of handle_control_authenticate.
Bugfix on
ed8f020e205267e6270494634346ab68d830e1d8 ; bug not in any
released version of Tor. Found by Coverity; this is CID
1239290 .
[Yes, I used this commit message before, in
58e813d0fcfcecfc2017 .
Turns out, that fix wasn't right, since I didn't look up a
screen. :P ]
Nick Mathewson [Thu, 25 Sep 2014 21:59:10 +0000 (17:59 -0400)]
Fix on that last fix.
Nick Mathewson [Thu, 25 Sep 2014 21:50:13 +0000 (17:50 -0400)]
Fix warnings on 32-bit builds.
When size_t is the most memory you can have, make sure that things
referring to real parts of memory are size_t, not uint64_t or off_t.
But not on any released Tor.
Nick Mathewson [Thu, 25 Sep 2014 19:11:34 +0000 (15:11 -0400)]
Merge branch 'ed25519_ref10_squashed'
Conflicts:
src/common/include.am
src/ext/README
Nick Mathewson [Thu, 25 Sep 2014 19:03:55 +0000 (15:03 -0400)]
Comments and tweaks based on review by asn
Add some documentation
Rename "derive" -> "blind"
Check for failure on randombytes().
Nick Mathewson [Thu, 25 Sep 2014 14:13:25 +0000 (10:13 -0400)]
Add benchmarks for
ed25519 functions
Nick Mathewson [Mon, 1 Sep 2014 00:01:53 +0000 (20:01 -0400)]
Add comments to ed25519_vectors.inc
Nick Mathewson [Sun, 31 Aug 2014 23:45:56 +0000 (19:45 -0400)]
Cut the time to run the python
ed25519 tests by a factor of ~6
I know it's pointless to optimize them, but I just can't let them
spend all that time in expmod() when native python pow() does the same
thing.
Nick Mathewson [Sun, 31 Aug 2014 23:39:43 +0000 (19:39 -0400)]
Add a reference implementation of our
ed25519 modifications
Also, use it to generate test vectors, and add those test vectors
to test_crypto.c
This is based on
ed25519 .py from the
ed25519 webpage; the kludgy hacks
are my own.
Nick Mathewson [Sat, 30 Aug 2014 16:29:35 +0000 (12:29 -0400)]
Add the pure-python
ed25519 implementation, for testing.
Nick Mathewson [Fri, 29 Aug 2014 13:24:27 +0000 (09:24 -0400)]
More documentation for
ed25519 stuff.
Nick Mathewson [Thu, 28 Aug 2014 00:12:57 +0000 (20:12 -0400)]
Fix linux compilation of ed25519_ref10
Our integer-definition headers apparently suck in a definition for
select(2), which interferes with the select() in ge_scalarmult_base.c
Nick Mathewson [Wed, 27 Aug 2014 21:59:15 +0000 (17:59 -0400)]
Draft implementation for
ed25519 key blinding, as in prop224
This implementation allows somebody to add a blinding factor to a
secret key, and a corresponding blinding factor to the public key.
Robert Ransom came up with this idea, I believe. Nick Hopper proved a
scheme like this secure. The bugs are my own.
Nick Mathewson [Wed, 27 Aug 2014 04:18:26 +0000 (00:18 -0400)]
Add curve25519->
ed25519 key conversion per proposal 228
For proposal 228, we need to cross-certify our identity with our
curve25519 key, so that we can prove at descriptor-generation time
that we own that key. But how can we sign something with a key that
is only for doing Diffie-Hellman? By converting it to the
corresponding
ed25519 point.
See the ALL-CAPS warning in the documentation. According to djb
(IIUC), it is safe to use these keys in the ways that ntor and prop228
are using them, but it might not be safe if we start providing crazy
oracle access.
(Unit tests included. What kind of a monster do you take me for?)
Nick Mathewson [Fri, 18 Oct 2013 17:25:00 +0000 (10:25 -0700)]
Support for writing
ed25519 public/private components to disk.
This refactors the "== type:tag ==" code from crypto_curve25519.c
Nick Mathewson [Mon, 30 Sep 2013 17:38:12 +0000 (13:38 -0400)]
Add encode/decode functions for
ed25519 public keys
Nick Mathewson [Wed, 27 Aug 2014 03:15:14 +0000 (23:15 -0400)]
Restore the operation of extra_strong in ed25519_secret_key_generate
Nick Mathewson [Wed, 27 Aug 2014 01:35:25 +0000 (21:35 -0400)]
Another
ed25519 tweak: store secret keys in expanded format
This will be needed/helpful for the key blinding of prop224, I
believe.
Nick Mathewson [Tue, 26 Aug 2014 18:55:08 +0000 (14:55 -0400)]
Fix API for ed25519_ref10_open()
This is another case where DJB likes sticking the whole signature
prepended to the message, and I don't think that's the hottest idea.
The unit tests still pass.
Nick Mathewson [Tue, 26 Aug 2014 16:47:27 +0000 (12:47 -0400)]
Tweak
ed25519 ref10 signing interface to use less space.
Unit tests still pass.
Nick Mathewson [Tue, 26 Aug 2014 16:32:00 +0000 (12:32 -0400)]
Tweak ref10 keygen APIs to be more sane.
Nick Mathewson [Sun, 29 Sep 2013 17:30:24 +0000 (13:30 -0400)]
Add
Ed25519 support, wrappers, and tests.
Taken from earlier
ed25519 branch based on floodyberry's
ed25519 -donna. Tweaked so that it applies to ref10 instead.
Nick Mathewson [Thu, 25 Sep 2014 18:49:00 +0000 (14:49 -0400)]
Use --require-version to prevent running trunnel pre-1.2
(Also, regenerate trunnel stuff with trunnel 1.2. This just adds a
few comments to our output.)
Nick Mathewson [Thu, 25 Sep 2014 17:16:35 +0000 (13:16 -0400)]
Have the run_trunnel.sh script tell trunnel to update src/ext/trunnel too
Nick Mathewson [Thu, 25 Sep 2014 16:31:31 +0000 (12:31 -0400)]
Add a script to run trunnel on the trunnel files.
Also, re-run the latest trunnel.
Closes ticket 13242
Nick Mathewson [Thu, 25 Sep 2014 16:03:46 +0000 (12:03 -0400)]
Mention trunnel in LICENSE and src/ext/README
Nick Mathewson [Thu, 25 Sep 2014 16:03:41 +0000 (12:03 -0400)]
Merge branch 'libscrypt_trunnel_squashed'
Conflicts:
src/test/test_crypto.c
Nick Mathewson [Wed, 24 Sep 2014 16:32:18 +0000 (12:32 -0400)]
Add tests for failing cases of crypto_pwbox
Nick Mathewson [Wed, 24 Sep 2014 14:51:39 +0000 (10:51 -0400)]
Use trunnel for crypto_pwbox encoding/decoding.
This reduces the likelihood that I have made any exploitable errors
in the encoding/decoding.
This commit also imports the trunnel runtime source into Tor.
Nick Mathewson [Tue, 23 Sep 2014 18:47:23 +0000 (14:47 -0400)]
Adjust pwbox format: use a random IV each time
Suggested by yawning
Nick Mathewson [Tue, 23 Sep 2014 18:34:59 +0000 (14:34 -0400)]
Test a full array of s2k flags with pwbox test.
Suggested by yawning.
Nick Mathewson [Sat, 30 Aug 2014 16:03:20 +0000 (12:03 -0400)]
Use preferred key-expansion means for pbkdf2, scrypt.
Use HKDF for RFC2440 s2k only.
Nick Mathewson [Sat, 30 Aug 2014 15:52:41 +0000 (11:52 -0400)]
Test vectors for PBKDF2 from RFC6070
Nick Mathewson [Sat, 30 Aug 2014 15:28:42 +0000 (11:28 -0400)]
Test vectors for scrypt from draft-josefsson-scrypt-kdf-00
Nick Mathewson [Sat, 30 Aug 2014 14:42:02 +0000 (10:42 -0400)]
Tweak and expose secret_to_key_compute_key for testing
Doing this lets me pass in a salt of an unusual length.
Nick Mathewson [Thu, 28 Aug 2014 21:59:06 +0000 (17:59 -0400)]
Rudimentary-but-sufficient passphrase-encrypted box code.
See crypto_pwbox.c for a description of the file format.
There are tests for successful operation, but it still needs
error-case tests.
Nick Mathewson [Thu, 28 Aug 2014 21:38:22 +0000 (17:38 -0400)]
More generic passphrase hashing code, including scrypt support
Uses libscrypt when found; otherwise, we don't have scrypt and we
only support openpgp rfc2440 s2k hashing, or pbkdf2.
Includes documentation and unit tests; coverage around 95%. Remaining
uncovered code is sanity-checks that shouldn't be reachable fwict.
Nick Mathewson [Thu, 25 Sep 2014 15:36:28 +0000 (11:36 -0400)]
Tell autoconf to make the compiler act as c99
Apparently some compilers want extra switches.
Nick Mathewson [Thu, 25 Sep 2014 15:22:02 +0000 (11:22 -0400)]
Tweak address.c to use a little c99 syntax
Since address.c is the first file to get compiled, let's have it use
a little judicious c99 in order to catch broken compilers that
somehow make it past our autoconf tests.
Nick Mathewson [Thu, 25 Sep 2014 15:20:04 +0000 (11:20 -0400)]
Require two c99 features (midblock decls, designated initializers)
c99 lets us do neat stuff like:
{
int j, k;
foo(&j, &k);
int z = j + k;
}
and also
struct point { int x; int y; };
struct point pt = { .x=5, .y=5 };
This commit makes the configure scripts check to make sure your
compiler implements them. It also disables our longstanding warning
about midblock declarations.
Closes ticket 13233.
Yawning Angel [Wed, 24 Sep 2014 09:39:15 +0000 (09:39 +0000)]
Do not launch pluggable transport plugins when DisableNetwork is set.
When DisableNetwork is set, do not launch pluggable transport plugins,
and if any are running already, terminate the existing instances.
Resolves ticket 13213.
Roger Dingledine [Tue, 23 Sep 2014 22:30:02 +0000 (18:30 -0400)]
two more typos
Roger Dingledine [Tue, 23 Sep 2014 00:09:03 +0000 (20:09 -0400)]
+ is not how we say concatenate
Nick Mathewson [Mon, 22 Sep 2014 18:45:38 +0000 (14:45 -0400)]
Merge remote-tracking branch 'public/bug12693_025'
Nick Mathewson [Mon, 22 Sep 2014 18:35:14 +0000 (14:35 -0400)]
Merge branch 'master' of git-rw.torproject.org:/tor
Nick Mathewson [Mon, 22 Sep 2014 18:34:52 +0000 (14:34 -0400)]
Merge branch 'bug8197_squashed'
Conflicts:
src/test/test_policy.c
Roger Dingledine [Mon, 22 Sep 2014 18:21:26 +0000 (14:21 -0400)]
and forward-port those changelogs too
rl1987 [Sun, 21 Sep 2014 11:35:48 +0000 (14:35 +0300)]
Writing comments for newly added functions.
rl1987 [Sun, 14 Sep 2014 14:35:13 +0000 (17:35 +0300)]
Adding changes file for 8197.
rl1987 [Sun, 14 Sep 2014 14:07:05 +0000 (17:07 +0300)]
Whitespace fixes
rl1987 [Sat, 13 Sep 2014 16:32:35 +0000 (19:32 +0300)]
Using the new API in unit-test.
rl1987 [Sat, 13 Sep 2014 13:25:48 +0000 (16:25 +0300)]
New API for policies_parse_exit_policy().
Nick Mathewson [Mon, 22 Sep 2014 14:55:53 +0000 (10:55 -0400)]
changes file for 12884
Adrien BAK [Mon, 22 Sep 2014 14:55:01 +0000 (10:55 -0400)]
Remove config options that have been obsolete since 0.2.3
Nick Mathewson [Mon, 22 Sep 2014 14:49:10 +0000 (10:49 -0400)]
Merge remote-tracking branch 'arma/feature13211'
Nick Mathewson [Mon, 22 Sep 2014 14:42:54 +0000 (10:42 -0400)]
Merge remote-tracking branch 'arma/feature13153'
Nick Mathewson [Mon, 22 Sep 2014 14:39:51 +0000 (10:39 -0400)]
changes file for 7733
Nick Mathewson [Mon, 22 Sep 2014 14:38:05 +0000 (10:38 -0400)]
Merge remote-tracking branch 'public/bug7733a'
Nick Mathewson [Mon, 22 Sep 2014 14:31:24 +0000 (10:31 -0400)]
Merge remote-tracking branch 'intrigeri/bug13196-systemd-writable-run-directory'
Roger Dingledine [Mon, 22 Sep 2014 00:02:12 +0000 (20:02 -0400)]
clients use optimistic data when reaching hidden services
Allow clients to use optimistic data when connecting to a hidden service,
which should cut out the initial round-trip for client-side programs
including Tor Browser.
(Now that Tor 0.2.2.x is obsolete, all hidden services should support
server-side optimistic data.)
See proposal 181 for details. Implements ticket 13211.
Roger Dingledine [Sun, 21 Sep 2014 23:12:20 +0000 (19:12 -0400)]
Use optimistic data even if we don't know exitnode->rs
I think we should know the routerstatus for our exit relay, since
we built a circuit to it. So I think this is just a code simplication.
Roger Dingledine [Sun, 21 Sep 2014 23:04:18 +0000 (19:04 -0400)]
get rid of routerstatus->version_supports_optimistic_data
Clients are now willing to send optimistic circuit data (before they
receive a 'connected' cell) to relays of any version. We used to
only do it for relays running 0.2.3.1-alpha or later, but now all
relays are new enough.
Resolves ticket 13153.
Roger Dingledine [Sun, 21 Sep 2014 22:56:48 +0000 (18:56 -0400)]
get rid of trivial redundant comment
Roger Dingledine [Sun, 21 Sep 2014 05:23:39 +0000 (01:23 -0400)]
Stop silently skipping invalid args to setevents
Return an error when the second or later arguments of the
"setevents" controller command are invalid events. Previously we
would return success while silently skipping invalid events.
Fixes bug 13205; bugfix on 0.2.3.2-alpha. Reported by "fpxnns".
Roger Dingledine [Sat, 20 Sep 2014 20:51:17 +0000 (16:51 -0400)]
Merge branch 'maint-0.2.5'
Roger Dingledine [Sat, 20 Sep 2014 20:50:32 +0000 (16:50 -0400)]
Merge branch 'maint-0.2.4' into maint-0.2.5
Conflicts:
src/or/config.c
Roger Dingledine [Sat, 20 Sep 2014 20:49:24 +0000 (16:49 -0400)]
Merge branch 'maint-0.2.3' into maint-0.2.4
Sebastian Hahn [Fri, 19 Sep 2014 11:40:37 +0000 (13:40 +0200)]
gabelmoo's IPv4 address changed
intrigeri [Fri, 19 Sep 2014 16:07:31 +0000 (16:07 +0000)]
Add changes file for #13196.
Note that this will likely need to be folded with the changes file for #12751,
as this change is a mere fixup on top of the changes introduced for #12751.
intrigeri [Fri, 19 Sep 2014 16:04:59 +0000 (16:04 +0000)]
systemd unit file: set up /var/run/tor as writable for the Tor service.
For some strange reason, this was not needed with systemd v208.
But it's needed with systemd v215 on current Debian sid, and entirely
makes sense.
Nick Mathewson [Thu, 18 Sep 2014 19:31:08 +0000 (15:31 -0400)]
Merge branch 'bug4244b_squashed'
Roger Dingledine [Thu, 11 Sep 2014 03:01:18 +0000 (23:01 -0400)]
Clients no longer write "DirReqStatistics 0" in their saveconf output
Stop modifying the value of our DirReqStatistics torrc option just
because we're not a bridge or relay. This bug was causing Tor
Browser users to write "DirReqStatistics 0" in their torrc files
as if they had chosen to change the config.
Fixes bug 4244; bugfix on 0.2.3.1-alpha.
Nick Mathewson [Thu, 18 Sep 2014 15:13:57 +0000 (11:13 -0400)]
Fix a double-free in failing case of handle_control_authenticate.
Bugfix on
ed8f020e205267e6270494634346ab68d830e1d8 ; bug not in any
released version of Tor. Found by Coverity; this is CID
1239290 .
Nick Mathewson [Thu, 18 Sep 2014 14:51:44 +0000 (10:51 -0400)]
Use the DL_SCHED_CONSENSUS schedule for consensuses.
Fixes bug 11679; bugfix on 0.2.2.6-alpha
Nick Mathewson [Thu, 18 Sep 2014 14:23:14 +0000 (10:23 -0400)]
Activate INSTRUMENT_DOWNLOADS under clang analyzer as well as coverity
Patch from teor; ticket 13177.
Nick Mathewson [Wed, 17 Sep 2014 15:00:27 +0000 (11:00 -0400)]
Fix a windows unused-arg warning
Nick Mathewson [Wed, 17 Sep 2014 14:27:40 +0000 (10:27 -0400)]
Merge remote-tracking branch 'public/ticket_13119_v3'
Peter Palfrader [Wed, 10 Sep 2014 15:18:34 +0000 (17:18 +0200)]
torrc.sample: Fix units