aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2020-05-06btrack_orconn_cevent.c: Add a missing "break;"Nick Mathewson
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.1 version.)
2020-05-06Merge branch 'bug34078_prelim_035' into bug34078_prelim_041Nick Mathewson
2020-05-06Replace some "fall through" comments not at the end of a case.Nick Mathewson
2020-05-06Replace a "fall through" comment that was outside a switch.Nick Mathewson
2020-04-30Fix a GCC 10.0.1 compilation warning.Nick Mathewson
Fixes 34077 for 0.4.1; bugfix on 0.4.0.3-alpha. (Specifically, GCC first gives this warning for 9eeff921ae7b786d960ea4286d5bba56)
2020-03-17Merge branch 'trove_2020_002_041' into maint-0.4.1Nick Mathewson
2020-03-17Merge branch 'trove_2020_002_035' into maint-0.3.5Nick Mathewson
2020-03-17Merge branch 'maint-0.3.5' into maint-0.4.1Nick Mathewson
2020-03-17Fix TROVE-2020-003.George Kadianakis
Given that ed25519 public key validity checks are usually not needed and (so far) they are only necessary for onion addesses in the Tor protocol, we decided to fix this specific bug instance without modifying the rest of the codebase (see below for other fix approaches). In our minimal fix we check that the pubkey in hs_service_add_ephemeral() is valid and error out otherwise.
2020-03-17Trivial bugfixes found during TROVE investigation.George Kadianakis
2020-02-12Merge branch 'maint-0.3.5' into maint-0.4.1teor
2020-02-12Lowercase the BridgeDistribution value from torrc in descriptors.Alexander Færøy
This patch ensures that we always lowercase the BridgeDistribution from torrc in descriptors before submitting it. See: https://bugs.torproject.org/32753
2020-02-05Merge branch 'trove_2020_002_035' into trove_2020_002_041Nick Mathewson
Resolved Conflicts: src/feature/dirparse/parsecommon.c
2020-02-05When parsing tokens, reject early on spurious keys.Nick Mathewson
2020-02-05When parsing, reject >1024-bit RSA private keys sooner.Nick Mathewson
Private-key validation is fairly expensive for long keys in openssl, so we need to avoid it sooner.
2019-11-25Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-11-25Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1396' into maint-0.4.0teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1464' into maint-0.3.5teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1395' into maint-0.3.5teor
2019-11-06Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-11-06Merge remote-tracking branch 'tor-github/pr/1340' into maint-0.3.5teor
2019-10-24hs-v3: Remove a BUG() caused by an acceptable raceDavid Goulet
hs_client_purge_state() and hs_cache_clean_as_client() can remove a descriptor from the client cache with a NEWNYM or simply when the descriptor expires. Which means that for an INTRO circuit being established during that time, once it opens, we lookup the descriptor to get the IP object but hey surprised, no more descriptor. The approach here is minimalist that is accept the race and close the circuit since we can not continue. Before that, the circuit would stay opened and the client wait the SockTimeout. Fixers #28970. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-23Merge branch 'pr1450_squashed' into maint-0.4.1teor
2019-10-23Authorities reject relays running unsupported Tor release series.Nick Mathewson
Our minimum version is now 0.2.9.5-alpha. Series 0.3.0, 0.3.1, 0.3.2, 0.3.3, and 0.3.4 are now rejected. Also, extract this version-checking code into a new function, so we can test it. Closes ticket 31549. Also reject 0.3.5.0 through 0.3.5.6-rc as unstable.
2019-10-23Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-10-23Merge remote-tracking branch 'tor-github/pr/1284' into maint-0.3.5teor
2019-10-23Merge remote-tracking branch 'tor-github/pr/1256' into maint-0.3.5teor
2019-10-22Merge remote-tracking branch 'tor-github/pr/1341' into maint-0.4.1Nick Mathewson
2019-10-22Merge remote-tracking branch 'tor-github/pr/1346' into maint-0.4.1Nick Mathewson
2019-10-17Remove overly strict assertions in transports.c.Alexander Færøy
This patch removes an overly strict tor_assert() and an ignorable BUG() expression. Both of these would trigger if a PT was unable to configure itself during startup. The easy way to trigger this is to configure an obfs4 bridge where you make the obfs4 process try to bind on a port number under 1024. See: https://bugs.torproject.org/31091
2019-10-07hs-v3: Make service pick the exact amount of intro pointsDavid Goulet
When encoding introduction points, we were not checking if that intro points had an established circuit. When botting up, the service will pick, by default, 3 + 2 intro points and the first 3 that establish, we use them and upload the descriptor. However, the intro point is removed from the service descriptor list only when the circuit has opened and we see that we have already enough intro points, it is then removed. But it is possible that the service establishes 3 intro points successfully before the other(s) have even opened yet. This lead to the service encoding extra intro points in the descriptor even though the circuit is not opened or might never establish (#31561). Fixes #31548 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-09-26lock: Avoid some undefined behaviour when freeing mutexes.teor
Fixes bug 31736; bugfix on 0.0.7.
2019-09-18Merge branch 'bug30916_035' into bug30916_041Nick Mathewson
2019-09-18Avoid a crash if our "current" and "old" ntor onion keys are equalNick Mathewson
Our dimap code asserts if you try to add the same key twice; this can't happen if everything is running smoothly, but it's possible if you try to start a relay where secret_onion_key_ntor is the same as secret_onion_key_ntor.old. Fixes bug 30916; bugfix on 0.2.4.8-alpha when ntor keys were introduced.
2019-09-18Extract expressions in construct_ntor_key_map()Nick Mathewson
No behavioral change here: this is just refactoring.
2019-09-18Merge branch 'bug31772_041' into maint-0.4.1Nick Mathewson
2019-09-17Merge branch 'maint-0.4.0' into maint-0.4.1Nick Mathewson
2019-09-17Merge branch 'maint-0.3.5' into maint-0.4.0Nick Mathewson
2019-09-17Correct the syntax description for the MAPADDRESS command.Nick Mathewson
In 0.4.1.1-alpha I introduced a bug where we would require and ignore a single positional argument. Fixes bug 31772.
2019-09-17Merge branch 'ticket31552_041' into maint-0.4.1Nick Mathewson
2019-09-06entrynodes: Make routine descriptor expiry notice logs less alarmingteor
When tor is missing descriptors for some primary entry guards, make the log message less alarming. It's normal for descriptors to expire, as long as tor fetches new ones soon after. Fixes bug 31657; bugfix on 0.3.3.1-alpha.
2019-09-02Merge branch 'ticket12399_035' into maint-0.4.1Nick Mathewson
2019-09-02Change loglevel of message 'Hash of session info was not as expected'rl1987
2019-08-30Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-08-30Merge remote-tracking branch 'tor-github/pr/1181' into maint-0.3.5teor
2019-08-30Merge remote-tracking branch 'tor-github/pr/1117' into maint-0.3.5teor
2019-08-29Stub more functions in dirvote headers to fix more of 31552.Nick Mathewson
2019-08-29Stub out some more functions in dirvote/*.h, fix compilation.Nick Mathewson
This fixes LTO compilation for Android and -O0 compilation in general, when --disable-module-dirauth is provided. Fixes bug 31552; bugfix on 0.4.1.1-alpha.