Commit Graph

21876 Commits

Author SHA1 Message Date
Nick Mathewson
c7dcf252fd Merge remote-tracking branch 'ahf-github/bugs/26437' 2018-07-17 14:33:31 -04:00
rl1987
8645647250 Fix build to work with --disable-unittests again 2018-07-17 12:09:34 +00:00
David Goulet
5aaea38d88 Merge remote-tracking branch 'pastly/issue26703' 2018-07-16 14:44:45 -04:00
Nick Mathewson
f8e9c4a894 Try putting ulimit -c 0 in test_bt.sh to see if it fixes bug 26787 2018-07-16 07:53:43 -04:00
Nick Mathewson
8505522e50 Avoid a use-after-null-check in proto_socks.c
Coverity rightly complains that early in the function we're checking
whether username is NULL, and later we're passing it unconditionally
to strlen().

Fixes CID 1437967.  Bug not in any released Tor.
2018-07-16 07:51:11 -04:00
Nick Mathewson
ef234ba303 Merge branch 'socks_trunnel4_squashed_merged' 2018-07-15 17:07:20 -04:00
Nick Mathewson
f608cc0f31 Merge remote-tracking branch 'tor-github/pr/179' 2018-07-13 18:30:17 -04:00
Alexander Færøy
46501cdd18 Fix forking tests on Windows when there is a space in the path.
See: https://bugs.torproject.org/26437
2018-07-13 12:46:18 +02:00
Alexander Færøy
c9de65f966 Add checks in get_net_param_from_list() for valid output domain.
This patch adds two assertions in get_net_param_from_list() to ensure
that the `res` value is correctly within the range of the output domain.

Hopefully fixes Coverity CID #1415721, #1415722, and #1415723.

See: https://bugs.torproject.org/26780
2018-07-13 12:43:57 +02:00
Nick Mathewson
710188f84e Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-12 14:32:16 -04:00
Nick Mathewson
98ee23ca1e Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-12 14:32:16 -04:00
Nick Mathewson
e0f33c1d3e Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-12 14:32:16 -04:00
Nick Mathewson
b6c50c6259 Merge branch 'maint-0.3.4' 2018-07-12 14:32:16 -04:00
Nick Mathewson
04512d9fcd SOCKS: Always free username/password before setting them.
This fixes a memory leak found by fuzzing.
2018-07-12 14:20:56 -04:00
Nick Mathewson
2d0e1cef20 Add fuzzing wrapper for fetch_from_buf_socks() 2018-07-12 14:20:46 -04:00
Roger Dingledine
cd4795ca3e put new bridge auth Serge into place
The "Bifroest" bridge authority has been retired; the new bridge authority
is "Serge", and it is operated by George from the TorBSD project.

Closes ticket 26771.
2018-07-12 14:12:13 -04:00
Nick Mathewson
7556933537 Merge branch 'socks_trunnel4_squashed' into socks_trunnel4_squashed_merged 2018-07-12 11:47:25 -04:00
rl1987
ba3121191b Use constants for possible values of first octet 2018-07-12 11:41:44 -04:00
rl1987
f27dc41627 Remove prop229 stuff from socks5.trunnel 2018-07-12 11:41:44 -04:00
rl1987
4c845fcf9e Rework socks_request_set_socks5_error() with trunnel 2018-07-12 11:41:44 -04:00
rl1987
a6af21c1b7 Document new code 2018-07-12 11:41:44 -04:00
rl1987
58cb2ed243 Fix buf_t advancement in fetch_buf_from_socks
We pullup 512 bytes of input to make sure that at least one SOCKS
message ends up in head of linked list
2018-07-12 11:41:44 -04:00
rl1987
01cf3007b5 Make a distinction between truncated message and expecting more messages 2018-07-12 11:41:42 -04:00
rl1987
fb105404f2 Fix whitespace/formatting 2018-07-12 11:41:20 -04:00
rl1987
d2e54ff8a5 Remove legacy SOCKS5 phase 2 code 2018-07-12 11:41:05 -04:00
rl1987
94706a427a Add CMD_RESOLVE to socks5_client_request 2018-07-12 11:41:05 -04:00
rl1987
bcbd3fb71e Second phase of SOCKS5 2018-07-12 11:41:05 -04:00
rl1987
57342b19f5 Remove legacy RFC1929 code 2018-07-12 11:41:05 -04:00
rl1987
9068ac3cac Implement SOCKS5 user/pass handling 2018-07-12 11:41:04 -04:00
rl1987
75106a26b4 Fix type in socks5.trunnel 2018-07-12 11:40:49 -04:00
rl1987
853d9b869d Remove legacy SOCKS5 phase 1 code 2018-07-12 11:40:49 -04:00
rl1987
63c478c1c4 Call new SOCKS code from parse_socks, to parse multiple packets in row 2018-07-12 11:40:49 -04:00
rl1987
27333b2298 Reimplement phase 1 of SOCKS5 using trunnel
squash! Reimplement phase 1 of SOCKS5 using trunnel
2018-07-12 11:40:49 -04:00
rl1987
c6a0b04d33 Remove legacy SOCKS4 code 2018-07-12 11:40:49 -04:00
rl1987
b160929c22 Add RESOLVE (0xF0) command to socks4_client_request 2018-07-12 11:40:49 -04:00
rl1987
9155e08450 Parsing SOCKS4/4a request using trunnel impl 2018-07-12 11:40:49 -04:00
Roger Dingledine
0317eb143e Remove a redundant typedef in proto_ext_or.h 2018-07-12 11:02:22 -04:00
Nick Mathewson
4ac87a430f Remove a redundant typedef in addr_policy_st.h 2018-07-12 10:35:29 -04:00
Nick Mathewson
a7ec493d88 Merge remote-tracking branch 'imnotbad/bug26663' 2018-07-12 08:59:23 -04:00
Nick Mathewson
2b52360448 Only use OpenSSL kdf support if it is present.
We have to check for ERR_load_KDF_strings() here, since that's the
only one that's actually a function rather than a macro.

Fixes compilation with LibreSSL.  Fixes bug 26712; bug not in
any released Tor.
2018-07-11 10:19:06 -04:00
Nick Mathewson
5aee26ee46 Move all use cases of micro-revision.i to a single place
That place is git-revision.c; git-revision.c now lives in lib/log.

Also fix the compilation rules so that all object files that need
micro-revision.i depend on it.
2018-07-11 09:52:39 -04:00
Nick Mathewson
537092cdbb Merge branch 'ticket26223' 2018-07-10 20:18:28 -04:00
Nick Mathewson
c90961a923 Document compat_getdelim_. 2018-07-10 20:18:20 -04:00
Nick Mathewson
391ef5e42c Explain why we use raw_free with getdelim result. 2018-07-10 20:16:37 -04:00
Nick Mathewson
b6d0e7caa4 Rename tm_cvt to time_to_tm 2018-07-10 15:25:53 -04:00
Nick Mathewson
e7f5f48d68 Rename torlog.[ch] to log.[ch]
Fun fact: these files used to be called log.[ch] until we ran into
conflicts with systems having a log.h file.  But now that we always
include "lib/log/log.h", we should be fine.
2018-07-10 15:20:30 -04:00
Nick Mathewson
41640b6573 Rename util_malloc to malloc. 2018-07-10 15:16:57 -04:00
Nick Mathewson
6711a172c0 Merge remote-tracking branch 'neel/fbsd-cfix' 2018-07-10 14:50:49 -04:00
Nick Mathewson
a2c44a7a7e Isolate resolve.h usage in the modules that really need it.
(Almost none of Tor should actually need to touch the platform resolver.)
2018-07-10 13:36:45 -04:00
Nick Mathewson
8de48c111c Remove addr_port_lookup.
This lets us cut the dependency from address.c to resolve.c: the
address.c module now has no paths to the libc resolver in it.
2018-07-10 13:32:37 -04:00
Nick Mathewson
2f657a1416 Remove all users of addr_port_lookup outside of address.c
This function has a nasty API, since whether or not it invokes the
resolver depends on whether one of its arguments is NULL.  That's a
good way for accidents to happen.

This patch incidentally makes tor-resolve support socks hosts on
IPv6.
2018-07-10 13:23:37 -04:00
Nick Mathewson
c2ddb7b231 Move tor_addr_{,port_}lookup to resolve.c 2018-07-10 13:00:02 -04:00
Nick Mathewson
5d8336c182 Refactor ipv[46].[ch]
These are now combined into an inaddr.[ch], since their purpose is
to implement functions for struct in_addr and struct in6_addr.

The definitions for in6_addr and its allies are now in a separate
header, inaddr_st.h.

Closes ticket 26532.
2018-07-10 12:50:38 -04:00
Neel Chauhan
6d58c20d94 Fix build on FreeBSD post-refactor 2018-07-10 12:32:14 -04:00
Nick Mathewson
ef106ce788 Document the headers in src/app/config/ 2018-07-10 12:28:31 -04:00
Nick Mathewson
4f42c923d6 File-level summary documentation for src/lib/*/*.[ch] 2018-07-10 12:22:01 -04:00
Nick Mathewson
e3e6335a08 Add controller support for listing ExtORPort and HTTPTunnelPorts
Closes ticket 26647.
2018-07-10 10:50:43 -04:00
Nick Mathewson
951d59d706 Use tor_getline() in dirserv.c to remove its upper line limit.
Closes ticket 26223.
2018-07-10 10:36:49 -04:00
Nick Mathewson
6574d4bd27 Refactor dirserv_read_measured_bandwidths to have a single exit point 2018-07-10 10:36:49 -04:00
Nick Mathewson
b04d719c10 Integrate getdelim() and getline() support into Tor. 2018-07-10 10:36:49 -04:00
Nick Mathewson
1604c0fe0e Add the compatibility definition for getdelim.c from netbsd.
We shouldn't actually need this code nearly anywhere we build:
getdelim is POSIX, and mingw provides it.
2018-07-10 10:14:24 -04:00
Nick Mathewson
5ce348c4c7 Bump to 0.3.4.4-rc-dev 2018-07-09 15:17:38 -04:00
Nick Mathewson
f5e3bcb60b Bump to 0.3.3.8-dev. 2018-07-09 15:17:16 -04:00
Nick Mathewson
19f2057d49 Fix some lingering windows compilation issues from Jenkins.
These were caused by the recent refactoring.
2018-07-09 12:54:40 -04:00
Nick Mathewson
eb856a3e51 strcasecmp should not take a size_t argument 2018-07-09 11:17:23 -04:00
Matt Traudt
d20feddfcc Lower log level of "Scheduler of type KIST has been enabled" to INFO 2018-07-09 10:48:43 -04:00
Nick Mathewson
98dff5df3f Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-09 10:17:20 -04:00
Nick Mathewson
250e0fc1c4 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-09 10:17:20 -04:00
Nick Mathewson
1b81c4b5f3 Merge branch 'maint-0.3.4' 2018-07-09 10:17:20 -04:00
Nick Mathewson
6ad2c2b92f Merge remote-tracking branch 'github/bug26269_031' into maint-0.3.2 2018-07-09 10:17:17 -04:00
Nick Mathewson
e7463be39b Merge branch 'maint-0.3.4' 2018-07-09 10:16:51 -04:00
Nick Mathewson
83de46eb25 Changes file and comment for 25928. 2018-07-09 10:16:48 -04:00
Nick Mathewson
529faef28e Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-09 10:15:16 -04:00
Nick Mathewson
69918629f5 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-09 10:14:43 -04:00
Nick Mathewson
4a604d9938 Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-09 10:14:43 -04:00
Nick Mathewson
8b53dfc362 Merge branch 'bug26269_029' into maint-0.2.9 2018-07-09 10:14:39 -04:00
Nick Mathewson
7746b071d8 Merge remote-tracking branch 'gsomlo/gls-single-da' 2018-07-09 09:59:46 -04:00
Nick Mathewson
a1a55a33c2 Merge branch 'bug26488' 2018-07-09 09:37:14 -04:00
rl1987
46998fc8fd Validate that DirAuthority address is IPv4 2018-07-09 09:37:09 -04:00
Nick Mathewson
03283c00d8 Merge remote-tracking branch 'rl1987/bug26525' 2018-07-09 09:31:12 -04:00
Nick Mathewson
532873a924 Bump to 0.3.3.8 2018-07-09 09:24:07 -04:00
Nick Mathewson
9320100d6e Bump to 0.3.3.4-rc 2018-07-09 09:23:39 -04:00
Nick Mathewson
a95cfb8a58 Clear all control.c flags on control_free_all()
Fixes bug 25512.

(Cherry-picked from 3519d0c808
2018-07-09 09:20:45 -04:00
Nick Mathewson
8e3a52e5c3 Merge branch 'maint-0.3.4' 2018-07-09 09:14:41 -04:00
Nick Mathewson
75d9db9e5b Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-09 09:14:37 -04:00
Nick Mathewson
f721a08220 Merge remote-tracking branch 'catalyst-github/bug26455_033' into maint-0.3.3 2018-07-09 09:13:58 -04:00
Nick Mathewson
75f7064a13 Merge branch 'maint-0.3.4' 2018-07-09 09:11:42 -04:00
Nick Mathewson
d3894dc34b Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-09 09:11:41 -04:00
Nick Mathewson
1af69c1812 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-09 09:11:41 -04:00
Nick Mathewson
451a84cecb Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-09 09:11:41 -04:00
Nick Mathewson
fead22fb2a Merge remote-tracking branch 'mikeperry/bug25705_v3_033' into maint-0.3.3 2018-07-09 09:08:58 -04:00
Nick Mathewson
b8554dd880 Make Tor compile with --disable-memory-sentinels again 2018-07-09 08:44:16 -04:00
Kaidan
abeb07a1bf Made 'auto' keyword in torrc case insensitive 2018-07-08 00:15:16 +10:00
Karsten Loesing
9faa28b60e Update geoip and geoip6 to the July 3 2018 database. 2018-07-06 20:54:03 +02:00
Nick Mathewson
10c782d7fa Move ntmain.c into libtor-app again
It's needed by main.c

Fixes bug 26662; bug not in any released Tor.
2018-07-06 13:59:40 -04:00
Nick Mathewson
50963f36d7 Actually sort the lines in src/core/include.am 2018-07-05 17:15:50 -04:00
Nick Mathewson
667a6e8fe9 Whoops. Protover.[ch] belong in src/core/or 2018-07-05 17:15:50 -04:00
Nick Mathewson
f720a5a439 Fix everything that previously referred to src/or 2018-07-05 17:15:50 -04:00
Nick Mathewson
5f51c2de8b Fix our build system to know the new locations of the src/or stuff 2018-07-05 17:15:50 -04:00
Nick Mathewson
ef486e3c02 Fix every include path changed in the previous commit (automated)
I am very glad to have written this script.
2018-07-05 17:15:50 -04:00