aboutsummaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2019-11-06Merge remote-tracking branch 'tor-github/pr/1342' into maint-0.2.9teor
2019-09-18Add a rate-limit to our warning about the disabled .exit notationNick Mathewson
This warning would previously be given every time we tried to open a connection to a foo.exit address, which could potentially be used to flood the logs. Now, we don't allow this warning to appear more than once every 15 minutes. Fixes bug 31466; bugfix on 0.2.2.1-alpha, when .exit was first deprecated.
2019-09-17Treat an unexpected constant-sized VERSIONS cell as a PROTOCOL_WARN.Nick Mathewson
We previously used tor_fragile_assert() to declare that this case could not happen: VERSIONS cells are always supposed to be variable-sized, right? This is incorrect, though. On a v1 link protocol connection, all cells are fixed-sized. There aren't supposed to be any VERSIONS cells with this version of the protocol, but apparently, somebody was messing up. (The v1 link protocol is obsolete, so probably the implementer responsible didn't mean to be using it.) Fixes bug 31107. Bugfix on 0.2.4.4-alpha, when we introduced a tor_fragile_assert() for this case.
2019-08-15dirauth: Change dizum IP addressDavid Goulet
New IP address from 194.109.206.212 to 45.66.33.45. Signed request from Alex de Joode, operator of dizum: https://trac.torproject.org/projects/tor/ticket/31406 Published descriptor by dizum on August 12th, 2019: -- r dizum fqbq1v2DCDxTj0QDi7+gd1h911U GZmZtCLaPDQNxkhIFj8UcgTRAuA 2019-08-12 15:28:40 45.66.33.45 443 80 s Authority Fast Running Stable V2Dir Valid v Tor 0.4.0.5 pr Cons=1-2 Desc=1-2 DirCache=1-2 HSDir=1-2 HSIntro=3-4 HSRend=1-2 Link=1-5 LinkAuth=1,3 Microdesc=1-2 Relay=1-2 Padding=1 w Bandwidth=20 Unmeasured=1 p reject 1-65535 -- Finally, confirmed by DNS: $ dig +short tor.dizum.com 45.66.33.45 Closes #31406 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-10Merge remote-tracking branch 'tor-github/pr/1078' into maint-0.2.9teor
2019-08-10Merge remote-tracking branch 'tor-github/pr/1229' into maint-0.2.9teor
2019-08-10Modify "Protect buffers against INT_MAX datalen overflows." for 0.2.9Nick Mathewson
2019-08-09Merge remote-tracking branch 'tor-github/pr/957' into maint-0.2.9teor
2019-08-08Fix another time_t/long warning for 31343.Nick Mathewson
2019-08-08Restore proper behavior of netinfo skew checkNick Mathewson
My previous fix removed a comparison, which would have caused us to warn about every skew instead of skews of over an hour.
2019-08-06Avoid using labs() on time_t in channeltls.cNick Mathewson
On some windows builds, time_t is 64 bits but long is not. This is causing appveyor builds to fail. Also, one of our uses of labs() on time_t was logically incorrect: it was telling us to accept NETINFO cells up to three minutes _before_ the message they were responding to, which doesn't make sense. This patch adds a time_abs() function that we should eventually move to intmath.h or something. For now, though, it will make merges easier to have it file-local in channeltls.c. Fixes bug 31343; bugfix on 0.2.4.4-alpha.
2019-06-28fallback: apply the second fallback list from 2019teor
Update the fallback directory mirrors by merging the current list with: fallback_dirs_2019-06-28-08-58-39_AU_f0437a39ddbc8459.inc Part of 28795, see that ticket for logs.
2019-06-28fallback: apply the first fallback list from 2019teor
Update the fallback directory mirrors by replacing the old list with: fallback_dirs_2019-06-25-11-49-10_AU_a37adb956fbb5cd2.inc Part of 28795, see that ticket for logs.
2019-06-06dirparse: Stop crashing when parsing unknown descriptor purpose annotationsteor
We think this bug can only be triggered by modifying a local file. Fixes bug 30781; bugfix on 0.2.0.8-alpha.
2019-04-19Merge remote-tracking branch 'tor-github/pr/792' into maint-0.2.9teor
2019-04-19Merge remote-tracking branch 'tor-github/pr/772' into maint-0.2.9teor
2019-04-16rephist: fix an undeclared type compilation errorteor
In 0.3.4 and later, we declare write_array as: extern struct bw_array_t *write_array; ... typedef struct bw_array_t bw_array_t; But in 0.2.9, we declare write_array as: typedef struct bw_array_t bw_array_t; extern bw_array_t *write_array; And then again in rephist.c: typedef struct bw_array_t bw_array_t; So some compilers fail with a duplicate declaration error. We backport 684b396ce5, which removes the duplicate declaration. And this commit deals with the undeclared type error. Backports a single line from merge commit 813019cc57. Fixes bug 30184; not in any released version of Tor.
2019-04-16Remove another needless typedefNick Mathewson
2019-04-09Check return value of buf_move_to_buf for error.Tobias Stoeckmann
If the concatenation of connection buffer and the buffer of linked connection exceeds INT_MAX bytes, then buf_move_to_buf returns -1 as an error value. This value is currently casted to size_t (variable n_read) and will erroneously lead to an increasement of variable "max_to_read". This in turn can be used to call connection_buf_read_from_socket to store more data inside the buffer than expected and clogging the connection buffer. If the linked connection buffer was able to overflow INT_MAX, the call of buf_move_to_buf would have previously internally triggered an integer overflow, corrupting the state of the connection buffer. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-04-09Protect buffers against INT_MAX datalen overflows.Tobias Stoeckmann
Many buffer functions have a hard limit of INT_MAX for datalen, but this limitation is not enforced in all functions: - buf_move_all may exceed that limit with too many chunks - buf_move_to_buf exceeds that limit with invalid buf_flushlen argument - buf_new_with_data may exceed that limit (unit tests only) This patch adds some annotations in some buf_pos_t functions to guarantee that no out of boundary access could occur even if another function lacks safe guards against datalen overflows. [This is a backport of the submitted patch to 0.2.9, where the buf_move_to_buf and buf_new_with_data functions did not exist.]
2019-03-20Merge remote-tracking branch 'tor-github/pr/774' into maint-0.2.9teor
2019-03-14relays shouldn't close idle rend circuitsRoger Dingledine
Allow connections to single onion services to remain idle without being disconnected. Relays acting as rendezvous points for single onion services were mistakenly closing idle established rendezvous circuits after 60 seconds, thinking that they are unused directory-fetching circuits that had served their purpose. Fixes bug 29665; bugfix on 0.2.1.26.
2019-03-14Merge remote-tracking branch 'tor-github/pr/770' into maint-0.2.9teor
2019-03-14Merge remote-tracking branch 'tor-github/pr/765' into maint-0.2.9teor
2019-03-14Merge remote-tracking branch 'tor-github/pr/746' into maint-0.2.9teor
2019-03-09test/sr: Free SRVs before replacing them in test_sr_setup_srv()teor
Stop leaking parts of the shared random state in the shared-random unit tests. The previous fix in 29599 was incomplete. Fixes bug 29706; bugfix on 0.2.9.1-alpha.
2019-03-08hs-v2: Copy needed information between service on prunningDavid Goulet
Turns out that when reloading a tor configured with hidden service(s), we weren't copying all the needed information between the old service object to the new one. For instance, the desc_is_dirty timestamp wasn't which could lead to the service uploading its descriptor much later than it would need to. The replaycache wasn't also moved over and some intro point information as well. Fixes #23790 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-03-01Merge remote-tracking branch 'tor-github/pr/749' into maint-0.2.9teor
2019-03-01Merge remote-tracking branch 'tor-github/pr/747' into maint-0.2.9teor
2019-03-01Bug 25733: Avoid assert failure if all circuits time out.Mike Perry
Prior to #23100, we were not counting HS circuit build times in our calculation of the timeout. This could lead to a condition where our timeout was set too low, based on non HS circuit build times, and then we would abandon all HS circuits, storing no valid timeouts in the histogram. This commit avoids the assert.
2019-01-10rend: stop warning when clients send multiple rend establish cellsteor
Stop logging "Tried to establish rendezvous on non-OR circuit..." as a warning. Instead, log it as a protocol warning, because there is nothing that relay operators can do to fix it. Fixes bug 29029; bugfix on 0.2.5.7-rc.
2019-01-04Merge branch 'bug21394_029_redux' into maint-0.2.9Nick Mathewson
2018-12-10Fallbacks: Update the hard-coded fallback list in December 2018teor
Merge Phoul's two lists into teor's list. Replace the 150 fallbacks originally introduced in Tor 0.3.3.1-alpha in January 2018 (of which ~115 were still functional), with a list of 157 fallbacks (92 new, 65 existing, 85 removed) generated in December 2018. Closes ticket 24803.
2018-12-07Fallbacks: Update the hard-coded fallback list in December 2018teor
Replace the 150 fallbacks originally introduced in Tor 0.3.3.1-alpha in January 2018 (of which ~115 were still functional), with a list of 148 fallbacks (89 new, 59 existing, 91 removed) generated in December 2018. Closes ticket 24803.
2018-11-15Merge remote-tracking branch 'public/bug24104_029_squashed' into maint-0.2.9Nick Mathewson
Resolved conflicts with the 26269 fix in 015fcd0e1191aa6f.
2018-10-25Fix two other cases of (buf + N > end) patternNick Mathewson
Related to fix for 28202.
2018-10-25Fix possible UB in an end-of-string check in get_next_token().Nick Mathewson
Remember, you can't check to see if there are N bytes left in a buffer by doing (buf + N < end), since the buf + N computation might take you off the end of the buffer and result in undefined behavior. Fixes 28202; bugfix on 0.2.0.3-alpha.
2018-09-20Fix a pair of errors in bug23512Nick Mathewson
2018-09-17Bug 23512: Test recording bytes in circ queues.Mike Perry
2018-09-17Bug 23512: Report queued cells on or circs as written.Mike Perry
This avoids asymmetry in our public relay stats, which can be exploited for guard discovery and other attacks.
2018-09-17Promote rep_hist bw functions to uint64_t.Mike Perry
The rest of rephist uses uint64_t internally. Let's make these take it too, so we don't have to worry about overflowing size_t on 32 bit systems.
2018-09-14protover: reject invalid protocol namescypherpunks
The spec only allows the characters [A-Za-z0-9-]. Fix on b2b2e1c7f24d9b65059e3d089768d6c49ba4f58f. Fixes #27316; bugfix on 0.2.9.4-alpha.
2018-09-07Merge remote-tracking branch 'teor/bug27461-029' into maint-0.2.9Nick Mathewson
2018-09-07Windows: Stop calling SetProcessDEPPolicy() on 64-bit Windowsteor
It is not supported, and always fails. Some compilers warn about the function pointer cast on 64-bit Windows. Fixes bug 27461; bugfix on 0.2.2.23-alpha.
2018-09-07hs: Silence a spurious warning in rend_client_send_introduction()teor
gcc 8 warns that extend_info_t.nickname might be truncated by strncpy(). But it doesn't know that nickname can either contain a hex id, or a nicknames. hex ids are only used for general and HSDir circuits. Fixes bug 27463; bugfix on 0.1.1.2-alpha.
2018-09-01Check descriptor bandwidth changed if not hibernatingjuga0
There should be a separate check to update descriptor when start or end hibernating.
2018-09-01Allow mocking rep_hist_bandwidth_assessjuga0
2018-09-01Make bandwidth change factor a constantjuga0
used to determine large changes in bandwidth.
2018-08-22Mark cert_matches_key as not-intrusive; fix stretch compilation.Nick Mathewson
2018-07-25Stop logging link auth warnings on Single Onion Services and Tor2webteor
Instead, log a protocol warning when single onion services or Tor2web clients fail to authenticate direct connections to relays. Fixes bug 26924; bugfix on 0.2.9.1-alpha.