junglefowl
373d9aff7a
Fail if file is too large to mmap.
...
If tor_mmap_file is called with a file which is larger than SIZE_MAX,
only a small part of the file will be memory-mapped due to integer
truncation.
This can only realistically happen on 32 bit architectures with large
file support.
2017-01-25 13:21:44 -05:00
Nick Mathewson
363be43df3
Re-run gen_server_ciphers
2017-01-24 15:30:35 -05:00
Nick Mathewson
4f1dc34e36
Regenerate ciphers.inc
2017-01-24 15:05:35 -05:00
Nick Mathewson
2e656d19e5
comment fix from pastly
2017-01-11 15:12:59 -05:00
Nick Mathewson
ac3b559e93
Merge branch 'bug20569_030_02_squashed'
2017-01-11 12:52:52 -05:00
David Goulet
870b5e2227
hs: Use AES-256 for v3 descriptor
...
That key size is taken from proposal 224 thus specified in the protocol.
Closes #20569
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-11 12:52:34 -05:00
Nick Mathewson
4f1a5da473
Merge remote-tracking branch 'public/ticket21037'
2017-01-11 09:17:21 -05:00
Nick Mathewson
f23ec14d62
Make tor_addr_lookup() mockable.
2017-01-03 10:11:15 -05:00
Nick Mathewson
6aac6c6bee
Make ed25519_fmt() log 0-valued keys more nicely.
...
Because <unset> makes more sense than AAAAAAAAAAAAAAAAAAA...
(I have indeed verified that ed25519_fmt() is only used for
logging. This patch also clarifies the intention that ed25519_fmt()
is only for logging.
Closes ticket 21037.
2017-01-02 12:31:15 -05:00
Nick Mathewson
fda7f00321
Note memset as redundant; see 20764.
2016-12-23 09:59:41 -05:00
Nick Mathewson
cea1a4e19d
This is no longer inline.
2016-12-23 09:50:44 -05:00
Hans Jerry Illikainen
a23fd15786
Fix unreachable heap corruption in base64_decode()
...
Give size_mul_check() external linkage and use it in base64_decode() to
avoid a potential integer wrap.
Closes #19222
2016-12-23 09:47:09 -05:00
Nick Mathewson
a6eaa121e4
Merge branch 'maint-0.2.9'
2016-12-23 08:06:19 -05:00
Nick Mathewson
a757f76967
Withstand failures in CLOCK_MONOTONIC_COARSE
...
This came up on #21035 , where somebody tried to build on a linux
system with kernel headers including CLOCK_MONOTONIC_COARSE, then
run on a kernel that didn't support it.
I've adopted a belt-and-suspenders approach here: we detect failures
at initialization time, and we also detect (loudly) failures later on.
Fixes bug 21035; bugfix on 0.2.9.1-alpha when we started using
monotonic time.
2016-12-21 08:17:26 -05:00
Roger Dingledine
51ee549a90
fix typos and trivial syntax problems
2016-12-18 04:06:02 -05:00
Roger Dingledine
f3d056ab16
clarify debug-level log while initializing entropy
...
I got confused when I saw my Tor saying it was opening a file
that doesn't exist. It turns out it isn't opening it, it's just
calling open() on it and then moving on when it's not there.
2016-12-18 03:48:31 -05:00
Nick Mathewson
2a00110e5b
Revert "Stop checking whether environ is declared."
...
This reverts commit 954eeda619
.
Apparently, OpenBSD is what expects you to declare environ
yourself. So 19142 is a wontfix.
2016-12-16 12:16:52 -05:00
Nick Mathewson
2cee38f76a
Merge branch 'prop271_030_v1_squashed'
2016-12-16 11:20:59 -05:00
Nick Mathewson
1d52ac4d3f
Lay down some infrastructure for bridges in the New Guard Order.
...
This includes:
* making bridge_info_t exposed but opaque
* allowing guards where we don't know an identity
* making it possible to learn the identity of a guard
* creating a guard that lacks a node_t
* remembering a guard's address and port.
* Looking up a guard by address and port.
* Only enforcing the rule that we need a live consensus to update
the "listed" status for guards when we are not using bridges.
2016-12-16 11:06:18 -05:00
Nick Mathewson
df6c475e59
Merge remote-tracking branch 'public/ticket19142'
2016-12-16 10:27:27 -05:00
Nick Mathewson
c838d34921
Merge branch 'dgoulet_ticket19043_030_03_squashed'
2016-12-14 15:28:28 -05:00
David Goulet
118691cd47
crypto: Change crypto_mac_sha3_256 to use the key length in the construction
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-14 15:18:40 -05:00
George Kadianakis
297213825b
prop224: Add unittests handling v3 ESTABLISH_INTRO cells.
...
Test for both v2 and v3 ESTABLISH_INTRO handling.
2016-12-14 15:18:40 -05:00
George Kadianakis
b9010c8bf5
prop224 prepwork: Introduce HMAC-SHA3 function.
2016-12-14 15:17:57 -05:00
Nick Mathewson
954eeda619
Stop checking whether environ is declared.
...
There seems to be pretty good evidence that it's always declared,
and that checking for it is pointless.
Closes ticket 19142.
2016-12-12 10:55:10 -05:00
Nick Mathewson
b659ffe9ac
Merge remote-tracking branch 'jryans/log-severity'
2016-12-12 09:46:07 -05:00
Nick Mathewson
e1f00c5f86
whitespace cleanups
2016-12-08 16:53:29 -05:00
Nick Mathewson
e93234af70
Merge branch 'feature15056_v1_squashed'
2016-12-08 16:49:24 -05:00
Nick Mathewson
937aef48ee
Add an ed25519_copy; use it in a couple of places dgoulet suggested.
2016-12-08 16:48:01 -05:00
Nick Mathewson
2cdd24ddd6
Helper function for logging ed25519 public keys.
2016-12-08 16:47:58 -05:00
Nick Mathewson
129cee1c75
Merge branch 'maint-0.2.9'
2016-12-07 10:52:28 -05:00
Nick Mathewson
d6ca36defa
Merge branch 'bug20710_025' into maint-0.2.9
2016-12-07 10:52:12 -05:00
J. Ryan Stinnett
9b2b799d82
Accept non-space whitespace characters in log severity syntax.
...
Adds a test_config_parse_log_severity unit test to verify behavior.
Fixes #19965 .
2016-12-06 11:11:43 -10:00
Nick Mathewson
daeb633825
whitespace fix
2016-12-05 10:31:10 -05:00
Nick Mathewson
f92630941a
Merge remote-tracking branch 'chelseakomlo/20717_hashing_api_bug'
2016-12-05 10:27:16 -05:00
J. Ryan Stinnett
7ffa95abd9
Clarify that ClientRejectInternalAddresses also rejects mDNS *.local hosts
...
Fixes #17070 .
2016-12-03 21:10:40 -06:00
Nick Mathewson
e6facbfe7a
Add accessor for inspecting timer callbacks.
2016-12-02 12:15:07 -05:00
Nick Mathewson
6a069959c6
Fix major errors in freeing getaddrinfo sandbox cache
...
Patch from cypherpunks. Fixes bug 20710; bugfix on 0.2.5.5-alpha.
2016-12-01 10:36:02 -05:00
teor
1e8f68a9c7
Add an extra warning message to check_private_dir
2016-12-01 09:51:19 -05:00
Nick Mathewson
21c47c4410
Add a smartlist_remove_keeporder() function, with tests.
2016-11-30 14:42:52 -05:00
Nick Mathewson
bf64564e37
Add a GUARD log domain, for use with new guards code
2016-11-30 14:42:52 -05:00
Nick Mathewson
539eba0a4b
Teach parse_iso_time about the spaceless variant.
...
(We previously added support for generating the spaceless
2016-11-14T19:58:12 variant, but not for actually parsing it.)
2016-11-30 14:42:52 -05:00
Chelsea H. Komlo
e01b09d5ce
crypto_digest512 returns expected error value of -1
2016-11-24 12:14:54 -05:00
Chelsea H. Komlo
9d9110f65d
crypto_digest256 returns expected error value of -1
2016-11-24 12:13:07 -05:00
Chelsea H. Komlo
276d07a88a
crypto_digest returns expected error value of -1
2016-11-24 10:01:03 -05:00
Nick Mathewson
4614f8e681
Merge remote-tracking branch 'teor/fix-mingw-pagesize'
2016-11-22 18:29:50 -05:00
Fabian Keil
db2dd8434e
finish_writing_to_file_impl(): Remove temporary file if replacing the existing one failed
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-16 11:25:26 -05:00
Nick Mathewson
431565e053
Helper function to see if an ed25519 pk is set.
2016-11-10 09:43:27 -05:00
Nick Mathewson
31f41fe096
Merge branch 'maint-0.2.9'
2016-11-08 18:45:10 -05:00
Nick Mathewson
286fa94064
Use va_copy() in pure-windows version of tor_asprintf().
...
It's not okay to use the same varargs list twice, and apparently
some windows build environments produce code here that would leave
tor_asprintf() broken. Fix for bug 20560; bugfix on 0.2.2.11-alpha
when tor_asprintf() was introduced.
2016-11-08 18:44:06 -05:00